From ef052622fc841e966bb8953b92f6397aae0cffd2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Nov 2004 12:08:06 +0000 Subject: use image_has_stage2() (even if not equivalent for rescue since we now check the stage2 stuff instead, but it should do) --- mdk-stage1/directory.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c index 6a5bc96f9..9faa5e1dc 100644 --- a/mdk-stage1/directory.c +++ b/mdk-stage1/directory.c @@ -62,7 +62,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me log_message("\"%s\" exists and is a directory, looking for iso files", directory); for (file = list_directory(directory); *file; file++) { - char isofile[500], install_location[600]; + char isofile[500]; if (strstr(*file, ".iso") != *file + strlen(*file) - 4) /* file doesn't end in .iso, skipping */ @@ -77,18 +77,11 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me continue; } - strcpy(install_location, IMAGE_LOCATION); - - if (IS_RESCUE || ramdisk_possible()) - strcat(install_location, get_ramdisk_realname()); /* RAMDISK install */ - else - strcat(install_location, LIVE_LOCATION); /* LIVE install */ - - if (access(install_location, R_OK)) { - log_message("ISO image \"%s\" doesn't contain stage2 installer", isofile); - } else { + if (image_has_stage2()) { log_message("stage2 installer found in ISO image \"%s\"", isofile); stage2_isos[stage2_iso_number++] = strdup(*file); + } else { + log_message("ISO image \"%s\" doesn't contain stage2 installer", isofile); } umount(IMAGE_LOCATION); -- cgit v1.2.1