projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fae7984
)
r56: check for BLKGETSIZE anyway, because it might not exist (and does not,
author
yoe <yoe>
Fri, 23 Apr 2004 18:41:38 +0000
(18:41 +0000)
committer
yoe <yoe>
Fri, 23 Apr 2004 18:41:38 +0000
(18:41 +0000)
on FreeBSD)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
212ed9f
..
6891a1a
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-409,13
+409,15
@@
off_t size_autodetect(int export)
#ifdef HAVE_SYS_MOUNT_H
#ifdef HAVE_SYS_IOCTL_H
#ifdef HAVE_SYS_MOUNT_H
#ifdef HAVE_SYS_IOCTL_H
+#ifdef BLKGETSIZE
DEBUG("looking for export size with ioctl BLKGETSIZE\n");
if (!ioctl(export, BLKGETSIZE, &es32) && es32) {
es = (off_t)es32 * (off_t)512;
return es;
}
DEBUG("looking for export size with ioctl BLKGETSIZE\n");
if (!ioctl(export, BLKGETSIZE, &es32) && es32) {
es = (off_t)es32 * (off_t)512;
return es;
}
-#endif
-#endif
+#endif /* BLKGETSIZE */
+#endif /* HAVE_SYS_IOCTL_H */
+#endif /* HAVE_SYS_MOUNT_H */
DEBUG("looking for export size with fstat\n");
stat_buf.st_size = 0;
DEBUG("looking for export size with fstat\n");
stat_buf.st_size = 0;