diff options
author | Chris Lumens <clumens@redhat.com> | 2006-08-03 17:25:54 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-08-03 17:25:54 +0000 |
commit | bf1e115a17b43e251f3ca881650bd78be2e427da (patch) | |
tree | bc48566b74582a487ec5132abb27f7c882e582c8 /loader2 | |
parent | 0e2775464d1b10c7c03b0f7b083962e80be982ea (diff) | |
download | anaconda-bf1e115a17b43e251f3ca881650bd78be2e427da.tar.gz anaconda-bf1e115a17b43e251f3ca881650bd78be2e427da.tar.xz anaconda-bf1e115a17b43e251f3ca881650bd78be2e427da.zip |
Better error handling and logging.
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/cdinstall.c | 11 |
1 files changed, 9 insertions, 2 deletions
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; |