summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-04-30 21:25:30 +0000
committerMike Fulbright <msf@redhat.com>2003-04-30 21:25:30 +0000
commitfd6865c9fa4358fae79fdf85acfe4b29de5c99a8 (patch)
tree3bf432c6c748925137c84937e59f0b7cb21273f1 /loader2
parent515bedbc3515fe453d3b2c440ef1d17698516736 (diff)
downloadanaconda-fd6865c9fa4358fae79fdf85acfe4b29de5c99a8.tar.gz
anaconda-fd6865c9fa4358fae79fdf85acfe4b29de5c99a8.tar.xz
anaconda-fd6865c9fa4358fae79fdf85acfe4b29de5c99a8.zip
oops we werent unmounting partition if we failed to find a set of ISOs
Diffstat (limited to 'loader2')
-rw-r--r--loader2/hdinstall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index 54ccec89f..170884808 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -345,6 +345,7 @@ static char * setupIsoImages(char * device, char * dirName, int flags) {
}
}
#ifndef HD_USE_LOOPBACK_STAGE2
+ /* if we copied stage2 into RAM we can now umount image */
umountLoopback("/tmp/loopimage", "loop0");
#endif
@@ -353,7 +354,12 @@ static char * setupIsoImages(char * device, char * dirName, int flags) {
}
#ifndef HD_USE_LOOPBACK_STAGE2
+ /* if we copied stage2 into RAM we can now umount partition */
umount("/tmp/hdimage");
+#else
+ /* only unmount if there was an error */
+ if (rc)
+ umount("/tmp/hdimage");
#endif
if (rc)