aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/mboot.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-26 15:42:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-26 15:42:53 -0700
commit5ed6ee3a7c56f3b24c713ba695487259ab7b06bd (patch)
treeaf3c5b4936f7a6686102499a19d75a96bb805dc2 /com32/mboot/mboot.c
parentfbfc9121043951d019ea89971638a4f5ca63a812 (diff)
downloadsyslinux-5ed6ee3a7c56f3b24c713ba695487259ab7b06bd.tar.gz
syslinux-5ed6ee3a7c56f3b24c713ba695487259ab7b06bd.tar.xz
syslinux-5ed6ee3a7c56f3b24c713ba695487259ab7b06bd.zip
mboot: make sure we actually succeed when we finished
When we actually finished mapping the image, return 0 and don't bail. Add error messages to most failure cases. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/mboot/mboot.c')
-rw-r--r--com32/mboot/mboot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c
index 60bdaaaf..77b864cd 100644
--- a/com32/mboot/mboot.c
+++ b/com32/mboot/mboot.c
@@ -160,8 +160,10 @@ int main(int argc, char *argv[])
/* Load the files */
nmodules = get_modules(argv+1, &modules);
- if (nmodules < 1)
+ if (nmodules < 1) {
+ error("No modules found!\n");
return 1; /* Failure */
+ }
/*
* Map the primary image. This should be done before mapping anything
@@ -178,8 +180,10 @@ int main(int argc, char *argv[])
/* Map the mbinfo structure */
regs.ebx = map_data(&mbinfo, sizeof mbinfo, 4, false);
- if (!regs.ebx)
+ if (!regs.ebx) {
+ error("Failed to map Multiboot info structure!\n");
return 1;
+ }
/* Map the primary command line */
if (modules[0].cmdline) {