summaryrefslogtreecommitdiff
path: root/libbb/loop.c
diff options
context:
space:
mode:
authorEric Andersen2002-03-20 15:25:25 +0000
committerEric Andersen2002-03-20 15:25:25 +0000
commitc7a3fb96d0936bbbedc428eafd3701edd219f70a (patch)
tree0215ecc98493231be315f1c8d0288d16b32c1cce /libbb/loop.c
parentb0cc0a6ca879781c3899731c70eb3261252c7fe3 (diff)
downloadbusybox-c7a3fb96d0936bbbedc428eafd3701edd219f70a.zip
busybox-c7a3fb96d0936bbbedc428eafd3701edd219f70a.tar.gz
Fix devfs loop device support
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 36b13d6..7e58b2f 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -95,7 +95,7 @@ extern char *find_unused_loop_device(void)
struct loop_info loopinfo;
for (i = 0; i <= 7; i++) {
- sprintf(dev, "/dev/loop%d", i);
+ sprintf(dev, LOOP_FORMAT, i);
if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
if ((fd = open(dev, O_RDONLY)) >= 0) {
if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) != 0) {