From 3f6f3174e9bd7671a97b88b90e50595a8c3c4231 Mon Sep 17 00:00:00 2001 From: Paul Fox Date: Tue, 19 Jul 2005 20:55:37 +0000 Subject: applying fix from: 0000068: mount limited to max 8 loop devices (patch provided) (made minor wording change for config help message) --- libbb/loop.c | 2 +- util-linux/Config.in | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libbb/loop.c b/libbb/loop.c index 8c3ad2ce0..19bbf3674 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) { diff --git a/util-linux/Config.in b/util-linux/Config.in index b54165409..7007915ba 100644 --- a/util-linux/Config.in +++ b/util-linux/Config.in @@ -349,6 +349,14 @@ config CONFIG_FEATURE_MOUNT_LOOP if you need to do something advanced, such as specify an offset or cryptographic options to the loopback device. +config CONFIG_FEATURE_MOUNT_LOOP_MAX + int " max number of loop devices" + default 7 + depends on CONFIG_FEATURE_MOUNT_LOOP + help + This option sets the highest numbered loop device to be used + automatically by the '-o loop' feature of mount. + config CONFIG_FEATURE_MTAB_SUPPORT bool " Support for a /etc/mtab file (instead of symlink to /proc/mounts)" default n -- cgit v1.2.3