Patchwork [v2,for-1.2,01/27] puv3: Require -kernel

login
register
mail settings
Submitter Markus Armbruster
Date Aug. 15, 2012, 7:17 p.m.
Message ID <1345058260-16229-2-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/177787/
State New
Headers show

Comments

Markus Armbruster - Aug. 15, 2012, 7:17 p.m.
Without it, puv3_load_kernel() asserts.

Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>

Suppress default floppy, CD-ROM and SD card drives for machine puv3.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/puv3.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/hw/puv3.c b/hw/puv3.c
index 43f7216..8aad17f 100644
--- a/hw/puv3.c
+++ b/hw/puv3.c
@@ -97,6 +97,11 @@  static void puv3_init(ram_addr_t ram_size, const char *boot_device,
 {
     CPUUniCore32State *env;
 
+    if (!kernel_filename) {
+        fprintf(stderr, "Kernel image must be specified\n");
+        exit(1);
+    }
+
     if (initrd_filename) {
         hw_error("Please use kernel built-in initramdisk.\n");
     }