diff options
author | Karel Zak | 2006-12-07 00:26:05 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:05 +0100 |
commit | 95f1bdeee42cd7b9ac49d64b27bcec49557a991e (patch) | |
tree | 5813d335771188c724c3d1bc9f9f9feb23c1d9ca /mount/lomount.c | |
parent | Imported from util-linux-2.11w tarball. (diff) | |
download | kernel-qcow2-util-linux-95f1bdeee42cd7b9ac49d64b27bcec49557a991e.tar.gz kernel-qcow2-util-linux-95f1bdeee42cd7b9ac49d64b27bcec49557a991e.tar.xz kernel-qcow2-util-linux-95f1bdeee42cd7b9ac49d64b27bcec49557a991e.zip |
Imported from util-linux-2.11x tarball.
Diffstat (limited to 'mount/lomount.c')
-rw-r--r-- | mount/lomount.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/lomount.c b/mount/lomount.c index 70a8ff0ab..97cd9a092 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -24,6 +24,7 @@ #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/mman.h> +#include <sys/sysmacros.h> #include "loop.h" #include "lomount.h" @@ -121,7 +122,7 @@ is_loop_device (const char *device) { #endif return (loopmajor && stat(device, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) && - (statbuf.st_rdev>>8) == loopmajor); + major(statbuf.st_rdev) == loopmajor); } #define SIZE(a) (sizeof(a)/sizeof(a[0])) @@ -174,7 +175,7 @@ find_unused_loop_device (void) { if (!somedev) error(_("mount: could not find any device /dev/loop#")); - else if(!someloop) { + else if (!someloop) { if (loop_known == 1) error(_( "mount: Could not find any loop device.\n" |