summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--loader2/cdinstall.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 97c3169e2..165348ae2 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -242,13 +242,16 @@ char * setupCdrom(char * location, struct loaderData_s * loaderData,
/* JKFIXME: ASSERT -- we have a cdrom device when we get here */
do {
for (i = 0; devices[i]; i++) {
- char *tmp;
+ char *tmp = NULL;
if (!devices[i]->device)
continue;
- r = asprintf(&tmp, "/dev/%s", devices[i]->device);
- free(devices[i]->device);
- devices[i]->device = tmp;
+
+ if (strncmp("/dev/", devices[i]->device, 5)) {
+ r = asprintf(&tmp, "/dev/%s", devices[i]->device);
+ free(devices[i]->device);
+ devices[i]->device = tmp;
+ }
logMessage(INFO,"trying to mount CD device %s on %s", devices[i]->device, location);