diff options
| author | 2011-06-16 16:02:37 +0000 | |
|---|---|---|
| committer | 2011-06-16 16:02:37 +0000 | |
| commit | b607f0b7ae64a6908894c127e920f3db1101f507 (patch) | |
| tree | 41cbf8679ffd4241b0a42fd79c56b535189f39d4 /src | |
| parent | 1d5f8e5e49d7c93e201810954082e982fcc44593 (diff) | |
Added handling "automount" feature (no whatsnew)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/clifront.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/emu/clifront.c b/src/emu/clifront.c index 91ad0346fd7..5ac368f12bb 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -202,26 +202,29 @@ int cli_frontend::execute(int argc, char **argv) if (swinfo!=NULL) { for (software_part *swpart = software_find_part(swinfo, NULL, NULL); swpart != NULL; swpart = software_part_next(swpart)) { - // loop trough all parts - // search for a device with the right interface - const device_image_interface *image = NULL; - for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image)) - { - const char *interface = image->image_interface(); - if (interface != NULL) - { - if (!strcmp(interface, swpart->interface_)) - { - const char *option = m_options.value(image->brief_instance_name()); - // mount only if not already mounted - if (strlen(option)==0) { - astring val; - astring error; - val.printf("%s:%s",m_options.software_name(),swpart->name); - m_options.set_value(image->brief_instance_name(), val.cstr(), OPTION_PRIORITY_CMDLINE, error); - assert(!error); + const char *mount = software_part_get_feature(swpart, "automount"); + if (mount==NULL || strcmp(mount,"no")!=0) { + // loop trough all parts + // search for a device with the right interface + const device_image_interface *image = NULL; + for (bool gotone = config.devicelist().first(image); gotone; gotone = image->next(image)) + { + const char *interface = image->image_interface(); + if (interface != NULL) + { + if (!strcmp(interface, swpart->interface_)) + { + const char *option = m_options.value(image->brief_instance_name()); + // mount only if not already mounted + if (strlen(option)==0) { + astring val; + astring error; + val.printf("%s:%s",m_options.software_name(),swpart->name); + m_options.set_value(image->brief_instance_name(), val.cstr(), OPTION_PRIORITY_CMDLINE, error); + assert(!error); + } + break; } - break; } } } |
