diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-20 15:25:25 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-20 15:25:25 +0000 |
commit | c7a3fb96d0936bbbedc428eafd3701edd219f70a (patch) | |
tree | 0215ecc98493231be315f1c8d0288d16b32c1cce /libbb | |
parent | b0cc0a6ca879781c3899731c70eb3261252c7fe3 (diff) | |
download | busybox-w32-c7a3fb96d0936bbbedc428eafd3701edd219f70a.tar.gz busybox-w32-c7a3fb96d0936bbbedc428eafd3701edd219f70a.tar.bz2 busybox-w32-c7a3fb96d0936bbbedc428eafd3701edd219f70a.zip |
Fix devfs loop device support
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/loop.c b/libbb/loop.c index 36b13d6e6..7e58b2f85 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -95,7 +95,7 @@ extern char *find_unused_loop_device(void) | |||
95 | struct loop_info loopinfo; | 95 | struct loop_info loopinfo; |
96 | 96 | ||
97 | for (i = 0; i <= 7; i++) { | 97 | for (i = 0; i <= 7; i++) { |
98 | sprintf(dev, "/dev/loop%d", i); | 98 | sprintf(dev, LOOP_FORMAT, i); |
99 | if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { | 99 | if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { |
100 | if ((fd = open(dev, O_RDONLY)) >= 0) { | 100 | if ((fd = open(dev, O_RDONLY)) >= 0) { |
101 | if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) != 0) { | 101 | if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) != 0) { |