summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 6c43a58e1..7b52203a7 100644
--- a/vl.c
+++ b/vl.c
@@ -3461,8 +3461,12 @@ int main(int argc, char **argv)
help();
/* boot to cd by default if no hard disk */
- if (hd_filename[0] == '\0' && boot_device == 'c')
- boot_device = 'd';
+ if (hd_filename[0] == '\0' && boot_device == 'c') {
+ if (fd_filename[0] != '\0')
+ boot_device = 'a';
+ else
+ boot_device = 'd';
+ }
#if !defined(CONFIG_SOFTMMU)
/* must avoid mmap() usage of glibc by setting a buffer "by hand" */