summaryrefslogtreecommitdiff
path: root/libbb/loop.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-05-19 00:39:17 +0200
committerDenys Vlasenko2010-05-19 00:39:17 +0200
commit92510141e24251a1d72fbdeef4e2ed2b2b25b433 (patch)
tree16ed5ab37f2bcf1500514ab4e08a4672405c8ce3 /libbb/loop.c
parent42c4b2e3b535314ae8a7b65c3223afb26872d5a2 (diff)
downloadbusybox-92510141e24251a1d72fbdeef4e2ed2b2b25b433.zip
busybox-92510141e24251a1d72fbdeef4e2ed2b2b25b433.tar.gz
losetup: support /dev/loop10 and higher. closes bug 1627
function old new delta query_loop 91 95 +4 losetup_main 288 285 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/loop.c')
-rw-r--r--libbb/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/loop.c b/libbb/loop.c
index b69d9d9..eb7016d 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -56,7 +56,7 @@ char* FAST_FUNC query_loop(const char *device)
fd = open(device, O_RDONLY);
if (fd >= 0) {
if (ioctl(fd, BB_LOOP_GET_STATUS, &loopinfo) == 0) {
- dev = xasprintf("%lu %s", (long) loopinfo.lo_offset,
+ dev = xasprintf("%"OFF_FMT"u %s", (off_t) loopinfo.lo_offset,
(char *)loopinfo.lo_file_name);
}
close(fd);