diff options
Diffstat (limited to 'mdk-stage1/disk.c')
-rw-r--r-- | mdk-stage1/disk.c | 71 |
1 files changed, 0 insertions, 71 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 |