aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/mboot.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-02 13:47:29 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-02 13:50:17 -0700
commit01c5b4edde1409dfc5cc84c71342ef671399022c (patch)
treefcc8a0657516aa2ca77fa4436b2e308a47d7cc8a /com32/mboot/mboot.c
parent873e07fbf78344e0041f29892e08f31820da87a4 (diff)
downloadsyslinux-01c5b4edde1409dfc5cc84c71342ef671399022c.tar.gz
syslinux-01c5b4edde1409dfc5cc84c71342ef671399022c.tar.xz
syslinux-01c5b4edde1409dfc5cc84c71342ef671399022c.zip
mboot: move map initialization out of map_image()
The amap/mmap initialization were buried randomly inside map_image(), which at the very least makes the code needlessly hard to read. Furthermore, it is at least possible that we may want to be able to map multiple images in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/mboot/mboot.c')
-rw-r--r--com32/mboot/mboot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c
index b1b2c77a..7103b3a3 100644
--- a/com32/mboot/mboot.c
+++ b/com32/mboot/mboot.c
@@ -185,6 +185,9 @@ int main(int argc, char *argv[])
return 1; /* Failure */
}
+ if (init_map())
+ return 1; /* Failed to allocate intitial map */
+
/*
* Map the primary image. This should be done before mapping anything
* else, since it will have fixed address requirements.