summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/loop.c b/libbb/loop.c
index 8c3ad2c..19bbf36 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -132,7 +132,7 @@ extern char *find_unused_loop_device(void)
struct stat statbuf;
struct loop_info loopinfo;
- for (i = 0; i <= 7; i++) {
+ for (i = 0; i <= CONFIG_FEATURE_MOUNT_LOOP_MAX; i++) {
sprintf(dev, LOOP_FORMAT, i);
if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
if ((fd = open(dev, O_RDONLY)) >= 0) {