Added WD XTA BIOS revision selection using the new CONFIG_BIOS infrastructure and some related fixes in the Win32 code.
This commit is contained in:
33
src/device.c
33
src/device.c
@@ -347,6 +347,39 @@ device_available(const device_t *d)
|
||||
return (0);
|
||||
}
|
||||
|
||||
const char *
|
||||
device_get_bios_file(const device_t *d, const char *internal_name, int file_no)
|
||||
{
|
||||
device_config_t *config = NULL;
|
||||
device_config_bios_t *bios = NULL;
|
||||
|
||||
if (d != NULL) {
|
||||
config = (device_config_t *) d->config;
|
||||
if (config != NULL) {
|
||||
while (config->type != -1) {
|
||||
if (config->type == CONFIG_BIOS) {
|
||||
bios = (device_config_bios_t *) config->bios;
|
||||
|
||||
/* Go through the ROM's in the device configuration. */
|
||||
while (bios->files_no != 0) {
|
||||
if (!strcmp(internal_name, bios->internal_name)) {
|
||||
if (file_no < bios->files_no)
|
||||
return bios->files[file_no];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
bios++;
|
||||
}
|
||||
}
|
||||
config++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* A NULL device is never available. */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
int
|
||||
device_has_config(const device_t *d)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user