summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-05-07 17:55:28 +0000
committerjhb <jhb@FreeBSD.org>2008-05-07 17:55:28 +0000
commit0a5997816c443b9948bffe1d6ba8b27f379f9b71 (patch)
tree9cb573874d19aed13de54f7990d436e7205908f8 /usr.bin/fstat
parentced693ce3c32463d97137e4a965d1e4b8da75929 (diff)
downloadFreeBSD-src-0a5997816c443b9948bffe1d6ba8b27f379f9b71.zip
FreeBSD-src-0a5997816c443b9948bffe1d6ba8b27f379f9b71.tar.gz
The debug.sizeof.znode sysctl returns an int, not a size_t. This can cause
a hang on 64-bit platforms. MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/zfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/fstat/zfs.c b/usr.bin/fstat/zfs.c
index cb9744d..123fdc2 100644
--- a/usr.bin/fstat/zfs.c
+++ b/usr.bin/fstat/zfs.c
@@ -69,7 +69,8 @@ zfs_filestat(struct vnode *vp, struct filestat *fsp)
void *znodeptr, *vnodeptr;
char *dataptr;
int *zphys_addr;
- size_t len, size;
+ size_t len;
+ int size;
len = sizeof(size);
if (sysctlbyname("debug.sizeof.znode", &size, &len, NULL, 0) == -1) {
@@ -91,7 +92,7 @@ zfs_filestat(struct vnode *vp, struct filestat *fsp)
}
/*
- * z_id field is stored in the third pointer. We therefor skip the two
+ * z_id field is stored in the third pointer. We therefore skip the two
* first bytes.
*
* Pointer to the z_phys structure is the next last pointer. Therefore
OpenPOWER on IntegriCloud