summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-01-12 14:19:06 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-01-12 14:19:06 +0000
commit4ad14a53da79108882420e88ad839c929da5be8f (patch)
treef5a6ce56805082d92b25e58942e9023386a9b7c5
parentf899a16061692d79ed2dcecb5b90578da54a7014 (diff)
downloaddrakx-4ad14a53da79108882420e88ad839c929da5be8f.tar
drakx-4ad14a53da79108882420e88ad839c929da5be8f.tar.gz
drakx-4ad14a53da79108882420e88ad839c929da5be8f.tar.bz2
drakx-4ad14a53da79108882420e88ad839c929da5be8f.tar.xz
drakx-4ad14a53da79108882420e88ad839c929da5be8f.zip
- fix behaviour with bad ISO images (DISK installs)
- better dialogs for DISK installs
-rw-r--r--mdk-stage1/disk.c8
-rw-r--r--mdk-stage1/lomount.c1
-rw-r--r--mdk-stage1/mount.c6
3 files changed, 8 insertions, 7 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index df2552bd5..7c8f2406c 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -59,7 +59,7 @@ static char * list_directory(char * direct)
static enum return_type try_with_device(char *dev_name)
{
- char * questions_location[] = { "Directory", NULL };
+ char * questions_location[] = { "Directory or ISO image", NULL };
char ** answers_location;
char device_fullname[50];
char location_full[500];
@@ -139,7 +139,7 @@ static enum return_type try_with_device(char *dev_name)
if (!stat(location_full, &statbuf) && !S_ISDIR(statbuf.st_mode)) {
log_message("%s exists and is not a directory, assuming this is an ISO image", location_full);
if (lomount(location_full, IMAGE_LOCATION)) {
- error_message("Could not mount ISO image.");
+ error_message("Could not mount file %s as an ISO image of the " DISTRIB_NAME " Distribution.", answers_location[0]);
umount(disk_own_mount);
return try_with_device(dev_name);
}
@@ -150,7 +150,7 @@ static enum return_type try_with_device(char *dev_name)
/* RAMDISK install */
if (access(IMAGE_LOCATION RAMDISK_LOCATION, R_OK)) {
error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
- "(I need the directory " RAMDISK_LOCATION ")\n"
+ "(I need the subdirectory " RAMDISK_LOCATION ")\n"
"Here's a short extract of the files in the directory:\n"
"%s", list_directory(IMAGE_LOCATION));
umount(disk_own_mount);
@@ -166,7 +166,7 @@ static enum return_type try_with_device(char *dev_name)
char p;
if (access(IMAGE_LOCATION LIVE_LOCATION, R_OK)) {
error_message("I can't find the " DISTRIB_NAME " Distribution in the specified directory. "
- "(I need the directory " LIVE_LOCATION ")\n"
+ "(I need the subdirectory " LIVE_LOCATION ")\n"
"Here's a short extract of the files in the directory:\n"
"%s", list_directory(IMAGE_LOCATION));
umount(disk_own_mount);
diff --git a/mdk-stage1/lomount.c b/mdk-stage1/lomount.c
index bf152af26..281de4a93 100644
--- a/mdk-stage1/lomount.c
+++ b/mdk-stage1/lomount.c
@@ -145,7 +145,6 @@ lomount(char *loopfile, char *where)
}
if (my_mount(loopdev, where, "iso9660")) {
- log_message("mount failed: %s", strerror(errno));
del_loop(loopdev);
return 1;
}
diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c
index 7ee55832f..bcdc069ca 100644
--- a/mdk-stage1/mount.c
+++ b/mdk-stage1/mount.c
@@ -172,8 +172,10 @@ int my_mount(char *dev, char *location, char *fs)
rc = mount(dev, location, fs, flags, opts);
- if (rc != 0)
- log_perror(dev);
+ if (rc != 0) {
+ log_perror("mount failed");
+ rmdir(location);
+ }
return rc;
}