Commit d030931173a2d8c9038c45950d72900097013ecb
1 parent
825bd5f8
automatic floppy boot
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@563 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
2 deletions
vl.c
@@ -3461,8 +3461,12 @@ int main(int argc, char **argv) | @@ -3461,8 +3461,12 @@ int main(int argc, char **argv) | ||
3461 | help(); | 3461 | help(); |
3462 | 3462 | ||
3463 | /* boot to cd by default if no hard disk */ | 3463 | /* boot to cd by default if no hard disk */ |
3464 | - if (hd_filename[0] == '\0' && boot_device == 'c') | ||
3465 | - boot_device = 'd'; | 3464 | + if (hd_filename[0] == '\0' && boot_device == 'c') { |
3465 | + if (fd_filename[0] != '\0') | ||
3466 | + boot_device = 'a'; | ||
3467 | + else | ||
3468 | + boot_device = 'd'; | ||
3469 | + } | ||
3466 | 3470 | ||
3467 | #if !defined(CONFIG_SOFTMMU) | 3471 | #if !defined(CONFIG_SOFTMMU) |
3468 | /* must avoid mmap() usage of glibc by setting a buffer "by hand" */ | 3472 | /* must avoid mmap() usage of glibc by setting a buffer "by hand" */ |