diff options
author | Milton Miller <miltonm@bga.com> | 2007-03-21 11:02:44 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-26 01:11:20 -0400 |
commit | 6a923216aac01d0f3eeea606377b81541f1a2773 (patch) | |
tree | 77e88aa9ce939ba895d49c17ca7dcb28fe8672df /arch/powerpc/boot/of.c | |
parent | 3771f2d9a46ca3b57e473afe929196efad7f3aa6 (diff) |
[POWERPC] bootwrapper: Add a fatal error helper
Add a macro fatal that calls printf then exit. User must include stdio.h.
Typically replaces 3 lines with 1, although I added back some whitespace.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/of.c')
-rw-r--r-- | arch/powerpc/boot/of.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c index c6f0d9701485..2cec5c17fb60 100644 --- a/arch/powerpc/boot/of.c +++ b/arch/powerpc/boot/of.c | |||
@@ -212,10 +212,9 @@ static void *of_vmlinux_alloc(unsigned long size) | |||
212 | { | 212 | { |
213 | void *p = malloc(size); | 213 | void *p = malloc(size); |
214 | 214 | ||
215 | if (!p) { | 215 | if (!p) |
216 | printf("Can't allocate memory for kernel image!\n\r"); | 216 | fatal("Can't allocate memory for kernel image!\n\r"); |
217 | exit(); | 217 | |
218 | } | ||
219 | return p; | 218 | return p; |
220 | } | 219 | } |
221 | 220 | ||