From: nathan Date: Fri, 23 Jun 2006 19:02:32 +0000 (+0000) Subject: Branch b1_5 X-Git-Tag: v1_7_100~1^90~8^2~69 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=465ad7d411a28b850a75fc25a95031e7bfb8b1f4;p=fs%2Flustre-release.git Branch b1_5 b=8007 ia64 doesn't have BLKGETSIZE64 --- diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 13a5aea..7972fc6 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -301,8 +301,17 @@ __u64 get_device_size(char* device) return 0; } +#ifdef BLKGETSIZE64 /* size in bytes. bz5831 */ ret = ioctl(fd, BLKGETSIZE64, (void*)&size); +#else + { + __u32 lsize = 0; + /* size in blocks */ + ret = ioctl(fd, BLKGETSIZE, (void*)&lsize); + size = (__u64)lsize * 512; + } +#endif close(fd); if (ret < 0) { fprintf(stderr, "%s: size ioctl failed: %s\n",