summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--loader2/cdinstall.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 425826009..30df08dfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* isys/imount.c (doPwMount): Log why mount failed.
+ * loader2/cdinstall.c (setupCdrom): Better error handling and
+ logging.
+
2006-08-03 Jeremy Katz <katzj@redhat.com>
* scripts/upd-instroot: Add libvolume_id for gfs2-utils
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 519b405ab..0bcda9906 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -309,9 +309,14 @@ char * setupCdrom(char * location, struct loaderData_s * loaderData,
if (!devices[i]->device)
continue;
- logMessage(INFO,"trying to mount CD device %s",devices[i]->device);
+ logMessage(INFO,"trying to mount CD device %s", devices[i]->device);
+
+ if (devMakeInode(devices[i]->device, "/tmp/cdrom") != 0) {
+ logMessage(ERROR, "unable to create device node for %s",
+ devices[i]->device);
+ continue;
+ }
- devMakeInode(devices[i]->device, "/tmp/cdrom");
if (!doPwMount("/tmp/cdrom", "/mnt/source", "iso9660",
IMOUNT_RDONLY, NULL)) {
if (!access("/mnt/source/images/stage2.img", R_OK) &&
@@ -335,6 +340,8 @@ char * setupCdrom(char * location, struct loaderData_s * loaderData,
/* if we failed, umount /mnt/source and keep going */
if (rc) {
+ logMessage(INFO, "mounting stage2 failed");
+
umount("/mnt/source");
if (rc == -1)
foundinvalid = 1;