Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f27db
)
Branch b1_5
author
nathan
<nathan>
Fri, 23 Jun 2006 19:02:32 +0000
(19:02 +0000)
committer
nathan
<nathan>
Fri, 23 Jun 2006 19:02:32 +0000
(19:02 +0000)
b=8007
ia64 doesn't have BLKGETSIZE64
lustre/utils/mkfs_lustre.c
patch
|
blob
|
history
diff --git
a/lustre/utils/mkfs_lustre.c
b/lustre/utils/mkfs_lustre.c
index
13a5aea
..
7972fc6
100644
(file)
--- 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",