[coreboot] [commit] r6359 - in trunk/payloads/libpayload: include libc
repository service
svn at coreboot.org
Mon Feb 14 20:26:23 CET 2011
Author: oxygene
Date: Mon Feb 14 20:26:22 2011
New Revision: 6359
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6359
Log:
Use fprintf(stderr, ...) in library
Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
Modified:
trunk/payloads/libpayload/include/assert.h
trunk/payloads/libpayload/libc/lib.c
Modified: trunk/payloads/libpayload/include/assert.h
==============================================================================
--- trunk/payloads/libpayload/include/assert.h Mon Feb 14 20:25:27 2011 (r6358)
+++ trunk/payloads/libpayload/include/assert.h Mon Feb 14 20:26:22 2011 (r6359)
@@ -28,6 +28,7 @@
*/
#include <stdlib.h>
+#include <stdio.h>
// assert's existence depends on NDEBUG state on _last_ inclusion of assert.h,
// so don't guard this against double-includes.
@@ -35,5 +36,5 @@
// Heisenbugs appear if statement has side-effects. This could be worked around but does the standard allow for that?
#define assert(statement)
#else
-#define assert(statement) if ((statement) == 0) { printf("assertion failed in file %s, function %s(), line %s\n", __FILE__, __FUNCTION__, __LINE__); abort(); }
+#define assert(statement) if ((statement) == 0) { fprintf(stderr, "assertion failed in file %s, function %s(), line %s\n", __FILE__, __FUNCTION__, __LINE__); abort(); }
#endif
Modified: trunk/payloads/libpayload/libc/lib.c
==============================================================================
--- trunk/payloads/libpayload/libc/lib.c Mon Feb 14 20:25:27 2011 (r6358)
+++ trunk/payloads/libpayload/libc/lib.c Mon Feb 14 20:26:22 2011 (r6359)
@@ -109,7 +109,7 @@
*/
void fatal(const char *msg)
{
- printf("%s",msg);
+ fprintf(stderr, "%s",msg);
halt();
}
More information about the coreboot
mailing list