diff options
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/disk.c | 71 | ||||
-rw-r--r-- | mdk-stage1/disk.h | 3 | ||||
-rw-r--r-- | mdk-stage1/stage1.c | 9 | ||||
-rw-r--r-- | mdk-stage1/tools.c | 1 |
4 files changed, 1 insertions, 83 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c index 1060cd199..8318bb6f4 100644 --- a/mdk-stage1/disk.c +++ b/mdk-stage1/disk.c @@ -315,74 +315,3 @@ enum return_type disk_prepare(void) return RETURN_BACK; return disk_prepare(); } - -#ifndef MANDRAKE_MOVE -int -process_recovery(void) -{ - char ** medias, ** medias_models; - int count, i; - - log_message("trying the automatic recovery of oem installs"); - - count = get_disks(&medias, &medias_models); - - for (i=0; i<count; i++) { - char * parts[50]; - char * parts_comments[50]; - char ** part, ** comment; - log_message("examining disk %s (%s)", medias[i], medias_models[i]); - - if (list_partitions(medias[i], parts, parts_comments)) { - log_message("could not read partitions information, bailing out"); - return 0; - } - - part = parts; - comment = parts_comments; - while (part && *part) { - char * disk_own_mount = "/tmp/hdimage"; - log_message("examining partition %s (%s)", *part, *comment); - if (try_mount(*part, disk_own_mount)) - log_message("couldn't mount it"); - else { - FILE *f; - char buf[500]; - char location[500]; - strcpy(location, disk_own_mount); - strcat(location, "/VERSION"); - if (!(f = fopen(location, "rb")) || !fgets(buf, sizeof(buf), f)) { - log_perror("could not fopen or fgets VERSION"); - goto examine_next_part; - } - fclose(f); - if (!strstr(buf, VERSION)) { - log_message("mismatching VERSION contents"); - goto examine_next_part; - } - strcpy(location, disk_own_mount); - strcat(location, "/install/stage2"); - if (access(location, R_OK)) { - log_message("install/stage2 is not here"); - goto examine_next_part; - } - - log_message("going on with a recovery on disk %s partition %s", medias[i], *part); - - symlink(disk_own_mount, IMAGE_LOCATION); - may_load_clp(); /* no error check */ - - add_to_env("METHOD", "disk"); - return 1; - } - - examine_next_part: - umount(disk_own_mount); - part++; - comment++; - } - } - - return 0; -} -#endif diff --git a/mdk-stage1/disk.h b/mdk-stage1/disk.h index 91cfbb2fd..fae890894 100644 --- a/mdk-stage1/disk.h +++ b/mdk-stage1/disk.h @@ -23,8 +23,5 @@ #define _DISK_H_ enum return_type disk_prepare(void); -#ifndef MANDRAKE_MOVE -int process_recovery(void); -#endif #endif diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index c25e3d68f..9768bce56 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -640,15 +640,8 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)) if (total_memory() < MEM_LIMIT_MOVE) stg1_info_message(DISTRIB_NAME " typically needs more than %d Mbytes of memory (detected %d Mbytes). You may proceed, but the machine may crash or lock up for no apparent reason. Continue at your own risk. Alternatively, you may reboot your system now.", MEM_LIMIT_MOVE, total_memory()); -#else -#ifndef DISABLE_DISK - if (IS_RECOVERY && streq(get_auto_value("method"), "cdrom")) { - if (!process_recovery()) - method_select_and_prepare(); - } else -#endif #endif - method_select_and_prepare(); + method_select_and_prepare(); #ifndef MANDRAKE_MOVE if (access(STAGE2_LOCATION, R_OK) != 0) diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index be1043798..45cafcfad 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -107,7 +107,6 @@ void process_cmdline(void) if (!strcmp(name, "rescue")) set_param(MODE_RESCUE); if (!strcmp(name, "noauto")) set_param(MODE_NOAUTO); if (!strcmp(name, "netauto")) set_param(MODE_NETAUTO); - if (!strcmp(name, "recovery")) set_param(MODE_RECOVERY); if (!strcmp(name, "debugstage1")) set_param(MODE_DEBUGSTAGE1); if (!strcmp(name, "automatic")) { set_param(MODE_AUTOMATIC); |