summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-15 11:29:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-15 11:29:22 +0000
commitd942c99d8cd13ee627b2e0ea04f7398240fbdfd5 (patch)
treeb98134aa1717ef0e4be848e4648fafd9152b6496 /mdk-stage1
parent2ace1ea3a747da72321c6b40feb8a48dfe334989 (diff)
downloaddrakx-backup-do-not-use-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar
drakx-backup-do-not-use-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.gz
drakx-backup-do-not-use-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.bz2
drakx-backup-do-not-use-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.xz
drakx-backup-do-not-use-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.zip
increase the number of loopbacks (needed for mandrakemove where the default (8) is much too low :)
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/lomount.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdk-stage1/lomount.c b/mdk-stage1/lomount.c
index 6b465758a..37b1373d3 100644
--- a/mdk-stage1/lomount.c
+++ b/mdk-stage1/lomount.c
@@ -119,12 +119,12 @@ set_loop (const char *device, const char *file, int gz)
char* find_free_loop()
{
- char ldev[] = "/dev/loop0";
struct loop_info loopinfo;
int i;
- for (i=0; i<8; i++) {
+ for (i=0; i<256; i++) {
int fd;
- ldev[strlen(ldev)-1] = '0' + i;
+ char ldev[100];
+ sprintf(ldev, "/dev/loop%d", i);
ensure_dev_exists(ldev);
fd = open(ldev, O_RDONLY);
if (!ioctl(fd, LOOP_GET_STATUS, &loopinfo)) {
@@ -171,7 +171,7 @@ lomount(char *loopfile, char *where, char **dev, int gz)
flag = MS_MGC_VAL;
flag |= MS_RDONLY;
- my_insmod("loop", ANY_DRIVER_TYPE, NULL, 1);
+ my_insmod("loop", ANY_DRIVER_TYPE, "max_loop=256", 1);
if (!(loopdev = find_free_loop())) {
log_message("could not find a free loop");