summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-15 20:05:28 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-15 20:05:28 +0000
commit52c148ad0b2a5210563422c4dc3d84ab074a5b9f (patch)
treeb04041ee5bf179656cc4903ff198905dab6ab07d /mdk-stage1
parent80c5067aeef81c19314ece1a260c4c415618fd59 (diff)
downloaddrakx-backup-do-not-use-52c148ad0b2a5210563422c4dc3d84ab074a5b9f.tar
drakx-backup-do-not-use-52c148ad0b2a5210563422c4dc3d84ab074a5b9f.tar.gz
drakx-backup-do-not-use-52c148ad0b2a5210563422c4dc3d84ab074a5b9f.tar.bz2
drakx-backup-do-not-use-52c148ad0b2a5210563422c4dc3d84ab074a5b9f.tar.xz
drakx-backup-do-not-use-52c148ad0b2a5210563422c4dc3d84ab074a5b9f.zip
really try to list partitions on USB keys or hard disks
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/thirdparty.c12
1 files 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;
}