diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-04-08 14:54:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-04-08 14:54:58 +0000 |
commit | c164380cc83b394918c5ffbe5e0e4f6abf9473e8 (patch) | |
tree | 13a3ef0ca533d2803007817a890826cfd110d10d /mdk-stage1 | |
parent | d62275dc1b1807e34224ea1d33439438e4d28435 (diff) | |
download | drakx-backup-do-not-use-c164380cc83b394918c5ffbe5e0e4f6abf9473e8.tar drakx-backup-do-not-use-c164380cc83b394918c5ffbe5e0e4f6abf9473e8.tar.gz drakx-backup-do-not-use-c164380cc83b394918c5ffbe5e0e4f6abf9473e8.tar.bz2 drakx-backup-do-not-use-c164380cc83b394918c5ffbe5e0e4f6abf9473e8.tar.xz drakx-backup-do-not-use-c164380cc83b394918c5ffbe5e0e4f6abf9473e8.zip |
- no need for chloop device anymore, my kernel patch applies directly on the default loop module :)
- gzloop needs cryptoloop and zlib_inflate (why must i handle this by hand? is my gzloop ugly?...)
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/lomount.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/mdk-stage1/lomount.c b/mdk-stage1/lomount.c index 1ad05cbee..6b465758a 100644 --- a/mdk-stage1/lomount.c +++ b/mdk-stage1/lomount.c @@ -80,6 +80,8 @@ set_loop (const char *device, const char *file, int gz) loopinfo.lo_name[LO_NAME_SIZE - 1] = 0; loopinfo.lo_offset = 0; if (gz) { + my_insmod("cryptoloop", ANY_DRIVER_TYPE, NULL, 1); + my_insmod("zlib_inflate", ANY_DRIVER_TYPE, NULL, 1); my_insmod("gzloop", ANY_DRIVER_TYPE, NULL, 1); loopinfo.lo_encrypt_type = 13; /* LO_CRYPT_GZ */ } @@ -115,11 +117,9 @@ set_loop (const char *device, const char *file, int gz) } -char* find_free_loop(int chloop) +char* find_free_loop() { - char loopdev[] = "/dev/loop0"; - char chloopdev[] = "/dev/chloop0"; - char * ldev = chloop ? chloopdev : loopdev; + char ldev[] = "/dev/loop0"; struct loop_info loopinfo; int i; for (i=0; i<8; i++) { @@ -167,19 +167,13 @@ lomount(char *loopfile, char *where, char **dev, int gz) long int flag; char * loopdev; - int chloop = 0; flag = MS_MGC_VAL; flag |= MS_RDONLY; -#ifdef MANDRAKE_MOVE - my_insmod("change_loop", ANY_DRIVER_TYPE, NULL, 1); - chloop = 1; -#else my_insmod("loop", ANY_DRIVER_TYPE, NULL, 1); -#endif - if (!(loopdev = find_free_loop(chloop))) { + if (!(loopdev = find_free_loop())) { log_message("could not find a free loop"); return 1; } |