From 52c148ad0b2a5210563422c4dc3d84ab074a5b9f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 15 Apr 2005 20:05:28 +0000 Subject: really try to list partitions on USB keys or hard disks --- mdk-stage1/thirdparty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c index b8b731dfd..176a24f1c 100644 --- a/mdk-stage1/thirdparty.c +++ b/mdk-stage1/thirdparty.c @@ -129,15 +129,18 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only) return results; } - /* a floppy is selected, don't try to list partitions */ if (streq(*device, floppy_dev)) { + /* a floppy is selected, don't try to list partitions */ return RETURN_OK; } #ifndef DISABLE_CDROM - /* a cdrom is selected, don't try to list partitions */ - if (device >= cdrom_medias) { - return RETURN_OK; + for (ptr = cdrom_medias; ptr < cdrom_medias + cdrom_count; ptr++) { + if (*device == *ptr) { + /* a cdrom is selected, don't try to list partitions */ + log_message("thirdparty: a cdrom is selected, using it (%s)", *device); + return RETURN_OK; + } } #endif @@ -155,6 +158,7 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only) /* only one partition has been discovered, don't ask which one to use */ if (parts[1] == NULL) { + log_message("thirdparty: found only one partition on device (%s)", parts[0]); *device = parts[0]; return RETURN_OK; } -- cgit v1.2.1