summaryrefslogtreecommitdiffstats
path: root/loader2/hdinstall.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-03-20 16:51:12 -0400
committerJeremy Katz <katzj@redhat.com>2008-03-20 16:51:12 -0400
commit46de99a245db4778b70dd8c33972f918f39f3780 (patch)
treea06415a7aa5324f95fb6f76c0be739c2d78fa4a1 /loader2/hdinstall.c
parente1de255048cfed5dc120b6e7f77dfc65ebfaeaba (diff)
downloadanaconda-46de99a245db4778b70dd8c33972f918f39f3780.tar.gz
anaconda-46de99a245db4778b70dd8c33972f918f39f3780.tar.xz
anaconda-46de99a245db4778b70dd8c33972f918f39f3780.zip
Handle /dev being on hard drive devices in the second stage
Sometimes, we can have a device without the leading /dev (method= or stage2= for compatibility) and doing strrchr breaks on cciss too. So just pass whatever we got to the second stage and deal with it where we can at least use python string handling
Diffstat (limited to 'loader2/hdinstall.c')
-rw-r--r--loader2/hdinstall.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index 2eab4bc0e..1a34b294c 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -202,7 +202,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location) {
goto err;
} else {
rc = asprintf(&url, "hd:%s:%s:/%s",
- strrchr(device, '/')+1,
+ device,
*type, dirName ? dirName : ".");
return url;
}
@@ -230,7 +230,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location) {
} else {
queryIsoMediaCheck(path);
free(path);
- rc = asprintf(&url, "hd:%s:%s:/%s", strrchr(device, '/')+1,
+ rc = asprintf(&url, "hd:%s:%s:/%s", device,
*type, dirName ? dirName : ".");
return url;
}