summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Costello <chris@FreeBSD.org>2000-06-28 19:18:25 +0000
committerChris Costello <chris@FreeBSD.org>2000-06-28 19:18:25 +0000
commit726bd7bebfa973757f7e9d5a7e291d6ba55247af (patch)
treea589eff1e161ab7dfbb42038444d4e720af069d8
parent0e8363eca9819011459bd0815521c8dbd50dfe63 (diff)
Notes
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c8
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index e0b61f701935..772a94ca3776 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -330,15 +330,11 @@ fdesc_getattr(ap)
break;
default:
+ bzero(&stb, sizeof(stb));
error = fo_stat(fp, &stb, ap->a_p);
if (error == 0) {
VATTR_NULL(vap);
- /* XXX Fake it! */
- if (fp->f_type != DTYPE_PIPE && fp->f_type != DTYPE_SOCKET)
- vap->va_type = VFIFO;
- else
- vap->va_type = IFTOVT(stb.st_mode);
-
+ vap->va_type = IFTOVT(stb.st_mode);
vap->va_mode = S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH;
vap->va_nlink = 1;
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index e0b61f701935..772a94ca3776 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -330,15 +330,11 @@ fdesc_getattr(ap)
break;
default:
+ bzero(&stb, sizeof(stb));
error = fo_stat(fp, &stb, ap->a_p);
if (error == 0) {
VATTR_NULL(vap);
- /* XXX Fake it! */
- if (fp->f_type != DTYPE_PIPE && fp->f_type != DTYPE_SOCKET)
- vap->va_type = VFIFO;
- else
- vap->va_type = IFTOVT(stb.st_mode);
-
+ vap->va_type = IFTOVT(stb.st_mode);
vap->va_mode = S_IRUSR | S_IWUSR | S_IRGRP |
S_IWGRP | S_IROTH | S_IWOTH;
vap->va_nlink = 1;