aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fox <pgf@brightstareng.com>2005-07-19 20:55:37 +0000
committerPaul Fox <pgf@brightstareng.com>2005-07-19 20:55:37 +0000
commit3f6f3174e9bd7671a97b88b90e50595a8c3c4231 (patch)
tree865c0e6afb3e16c87ae1953a640e7613a6169bec
parent0a92bbf349c3a5f67182aca3932a7e29185ab3cf (diff)
downloadbusybox-w32-3f6f3174e9bd7671a97b88b90e50595a8c3c4231.tar.gz
busybox-w32-3f6f3174e9bd7671a97b88b90e50595a8c3c4231.tar.bz2
busybox-w32-3f6f3174e9bd7671a97b88b90e50595a8c3c4231.zip
applying fix from:
0000068: mount limited to max 8 loop devices (patch provided) (made minor wording change for config help message)
-rw-r--r--libbb/loop.c2
-rw-r--r--util-linux/Config.in8
2 files changed, 9 insertions, 1 deletions
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)
132 struct stat statbuf; 132 struct stat statbuf;
133 struct loop_info loopinfo; 133 struct loop_info loopinfo;
134 134
135 for (i = 0; i <= 7; i++) { 135 for (i = 0; i <= CONFIG_FEATURE_MOUNT_LOOP_MAX; i++) {
136 sprintf(dev, LOOP_FORMAT, i); 136 sprintf(dev, LOOP_FORMAT, i);
137 if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) { 137 if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
138 if ((fd = open(dev, O_RDONLY)) >= 0) { 138 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
349 if you need to do something advanced, such as specify an offset or cryptographic 349 if you need to do something advanced, such as specify an offset or cryptographic
350 options to the loopback device. 350 options to the loopback device.
351 351
352config CONFIG_FEATURE_MOUNT_LOOP_MAX
353 int " max number of loop devices"
354 default 7
355 depends on CONFIG_FEATURE_MOUNT_LOOP
356 help
357 This option sets the highest numbered loop device to be used
358 automatically by the '-o loop' feature of mount.
359
352config CONFIG_FEATURE_MTAB_SUPPORT 360config CONFIG_FEATURE_MTAB_SUPPORT
353 bool " Support for a /etc/mtab file (instead of symlink to /proc/mounts)" 361 bool " Support for a /etc/mtab file (instead of symlink to /proc/mounts)"
354 default n 362 default n