From 922791261762e71711d666e572aa996b839b4366 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 7 May 2008 17:55:28 +0000 Subject: [PATCH] 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 --- usr.bin/fstat/zfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/fstat/zfs.c b/usr.bin/fstat/zfs.c index cb9744d28cb1..123fdc23b9e7 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