Skip to content

Commit

Permalink
Add -no_dvd parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
BiatuAutMiahn committed Nov 28, 2023
1 parent 800eb46 commit 21eab43
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions softmmu/vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,18 @@ void qemu_init(int argc, char **argv)
}
}

if (strlen(dvd_path) > 0) {
// Allow clearing the dvd path on boot.
for (int i = 1; i < argc; i++) {
if (argv[i] && strcmp(argv[i], "-no_dvd") == 0) {
argv[i] = NULL;
dvd_path = "";
xemu_settings_set_string(&g_config.sys.files.dvd_path, "");
break;
}
}
}

if (strlen(dvd_path) > 0) {
if (xemu_check_file(dvd_path) || strcmp(dvd_path, hdd_path) == 0) {
char *msg = g_strdup_printf("Failed to open DVD image file '%s'. Please check machine settings.", dvd_path);
Expand Down

0 comments on commit 21eab43

Please sign in to comment.