From cc4117275a36d997ae9b937c82b550b7d093559d Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 13 Jul 2004 08:32:56 +0000 Subject: don't forget to umount ISO images --- mdk-stage1/directory.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/directory.c') diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c index 0ca78397a..e322c8379 100644 --- a/mdk-stage1/directory.c +++ b/mdk-stage1/directory.c @@ -92,7 +92,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me stage2_isos[stage2_iso_number++] = strdup(*file); } - umount(IMAGE_LOCATION); + umount(IMAGE_LOCATION); del_loop(loopdev); } @@ -150,11 +150,13 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me "(I need the subdirectory " RAMDISK_LOCATION ")\n" "Here's a short extract of the files in the directory:\n" "%s", extract_list_directory(IMAGE_LOCATION)); + umount(IMAGE_LOCATION); del_loop(loopdev); return RETURN_ERROR; } if (load_ramdisk() != RETURN_OK) { stg1_error_message("Could not load program into memory."); + umount(IMAGE_LOCATION); del_loop(loopdev); return RETURN_ERROR; } @@ -171,6 +173,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me "(I need the subdirectory " LIVE_LOCATION ")\n" "Here's a short extract of the files in the directory:\n" "%s", extract_list_directory(IMAGE_LOCATION)); + umount(IMAGE_LOCATION); del_loop(loopdev); return RETURN_ERROR; } @@ -179,6 +182,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me stg1_error_message("The " DISTRIB_NAME " Distribution seems to be copied on a Windows partition. " "You need more memory to perform an installation from a Windows partition. " "Another solution if to copy the " DISTRIB_NAME " Distribution on a Linux partition."); + umount(IMAGE_LOCATION); del_loop(loopdev); return RETURN_ERROR; } @@ -186,8 +190,10 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me } #endif - if (IS_RESCUE) - del_loop(loopdev); + if (IS_RESCUE) { + umount(IMAGE_LOCATION); + del_loop(loopdev); + } return RETURN_OK; } -- cgit v1.2.1