Update for fileops.fo_stat() addition. Note, this would panic if

it saw a DTYPE_PIPE.  This isn't quite right but should stop a crash.
This commit is contained in:
Peter Wemm 1999-11-08 03:36:29 +00:00
parent bb63a8f5a5
commit 1949905f8b
2 changed files with 6 additions and 4 deletions

View File

@ -382,11 +382,12 @@ fdesc_attr(fd, vap, cred, p)
}
break;
case DTYPE_PIPE:
case DTYPE_SOCKET:
error = soo_stat((struct socket *)fp->f_data, &stb);
error = fo_stat(fp, &stb, p);
if (error == 0) {
vattr_null(vap);
vap->va_type = VSOCK;
vap->va_type = VSOCK; /* XXX pipe? */
vap->va_mode = stb.st_mode;
vap->va_nlink = stb.st_nlink;
vap->va_uid = stb.st_uid;

View File

@ -382,11 +382,12 @@ fdesc_attr(fd, vap, cred, p)
}
break;
case DTYPE_PIPE:
case DTYPE_SOCKET:
error = soo_stat((struct socket *)fp->f_data, &stb);
error = fo_stat(fp, &stb, p);
if (error == 0) {
vattr_null(vap);
vap->va_type = VSOCK;
vap->va_type = VSOCK; /* XXX pipe? */
vap->va_mode = stb.st_mode;
vap->va_nlink = stb.st_nlink;
vap->va_uid = stb.st_uid;