summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-07-31 13:57:07 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-07-31 13:57:07 +0000
commit83b8528e868256757835067d9a945186933958e8 (patch)
treed218f3deb66221d75987c44f865740d5b34018b4 /mdk-stage1
parentc5df0a5b487c8beb4b57311527960f67eb5bedb6 (diff)
downloaddrakx-83b8528e868256757835067d9a945186933958e8.tar
drakx-83b8528e868256757835067d9a945186933958e8.tar.gz
drakx-83b8528e868256757835067d9a945186933958e8.tar.bz2
drakx-83b8528e868256757835067d9a945186933958e8.tar.xz
drakx-83b8528e868256757835067d9a945186933958e8.zip
hopefully fix "device or resource busy" problem in cdrom
automatic mode (I messed up between truth value and number in a list... the first value is numbered "0" whicih is "false"...)
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/cdrom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c
index a4f9f2e84..ba0341b30 100644
--- a/mdk-stage1/cdrom.c
+++ b/mdk-stage1/cdrom.c
@@ -127,7 +127,7 @@ int try_automatic(char ** medias, char ** medias_models)
model++;
i++;
}
- return 0;
+ return -1;
}
enum return_type cdrom_prepare(void)
@@ -141,16 +141,16 @@ enum return_type cdrom_prepare(void)
if (IS_AUTOMATIC) {
get_medias(CDROM, &medias, &medias_models, BUS_IDE);
- if ((i = try_automatic(medias, medias_models)))
+ if ((i = try_automatic(medias, medias_models)) != -1)
return do_with_device(medias[i], medias_models[i]);
my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL);
get_medias(CDROM, &medias, &medias_models, BUS_SCSI);
- if ((i = try_automatic(medias, medias_models)))
+ if ((i = try_automatic(medias, medias_models)) != -1)
return do_with_device(medias[i], medias_models[i]);
get_medias(CDROM, &medias, &medias_models, BUS_USB);
- if ((i = try_automatic(medias, medias_models)))
+ if ((i = try_automatic(medias, medias_models)) != -1)
return do_with_device(medias[i], medias_models[i]);
unset_param(MODE_AUTOMATIC);