summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-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;
}