diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-06-15 11:29:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-06-15 11:29:22 +0000 |
commit | d942c99d8cd13ee627b2e0ea04f7398240fbdfd5 (patch) | |
tree | b98134aa1717ef0e4be848e4648fafd9152b6496 | |
parent | 2ace1ea3a747da72321c6b40feb8a48dfe334989 (diff) | |
download | drakx-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar drakx-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.gz drakx-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.bz2 drakx-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.tar.xz drakx-d942c99d8cd13ee627b2e0ea04f7398240fbdfd5.zip |
increase the number of loopbacks (needed for mandrakemove where the default (8) is much too low :)
-rw-r--r-- | mdk-stage1/lomount.c | 8 | ||||
-rw-r--r-- | perl-install/devices.pm | 2 |
2 files changed, 5 insertions, 5 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"); diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 434397a61..8a3654566 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -38,7 +38,7 @@ sub del_loop { run_program::run("losetup", "-d", $dev); } sub find_free_loop() { - foreach (0..7) { + foreach (0..255) { my $dev = make("loop$_"); sysopen(my $F, $dev, 2) or next; !ioctl($F, c::LOOP_GET_STATUS(), my $_tmp) && $! == 6 or next; #- 6 == ENXIO |