From 5bec34040a3b76317eb98cb106a68afea9609687 Mon Sep 17 00:00:00 2001 From: yoe Date: Sat, 27 Jan 2007 23:53:04 +0000 Subject: [PATCH] r233: Fix 64bit stuff (again) --- nbd-server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nbd-server.c b/nbd-server.c index 281a14f..e3dabeb 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -735,16 +735,16 @@ void sigterm_handler(int s) { **/ off_t size_autodetect(int fhandle) { off_t es; - u32 es32; + unsigned long sectors; struct stat stat_buf; int error; #ifdef HAVE_SYS_MOUNT_H #ifdef HAVE_SYS_IOCTL_H #ifdef BLKGETSIZE - DEBUG("looking for fhandle size with ioctl BLKGETSIZE\n"); - if (!ioctl(fhandle, BLKGETSIZE, &es32) && es32) { - es = (off_t)es32 * (off_t)512; + DEBUG("looking for export size with ioctl BLKGETSIZE\n"); + if (!ioctl(fhandle, BLKGETSIZE, §ors) && sectors) { + es = (off_t)sectors * (off_t)512; return es; } #endif /* BLKGETSIZE */ -- 1.7.10.4