In cdrom_prepare() do not overwrite media list by DISK medias. Instead,
make get_medias() report DISK too when asked for CDROM.
This commit is contained in:
parent
75416657d2
commit
6d837a25c6
5
cdrom.c
5
cdrom.c
@ -178,11 +178,6 @@ enum return_type cdrom_prepare(void)
|
||||
}
|
||||
if ((i = try_automatic(medias, medias_models)) != -1)
|
||||
return do_with_device(medias[i], medias_models[i]);
|
||||
/* detect hybrid iso images (those dumped to a USB stick) */
|
||||
get_medias(DISK, &medias, &medias_models);
|
||||
if ((i = try_automatic(medias, medias_models)) != -1) {
|
||||
return do_with_device(medias[i], medias_models[i]);
|
||||
}
|
||||
|
||||
if (count == 0) {
|
||||
/* too bad, let's recount one more time */
|
||||
|
@ -246,7 +246,8 @@ void get_medias(enum media_type media, char *** names, char *** models)
|
||||
|
||||
count = 0;
|
||||
while (m && m->name) {
|
||||
if (m->type == media) {
|
||||
/* detect hybrid iso images (those dumped to a USB stick) */
|
||||
if ((m->type == media) || ((media == CDROM) && (m->type == DISK))) {
|
||||
tmp_names[count] = strdup(m->name);
|
||||
tmp_models[count++] = strdup(m->model);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user