summaryrefslogtreecommitdiffstats
path: root/common/misc.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:30 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:30 +0200
commitf9a07ee39b8c3a16ba5a3ed1d34d419f38b34eda (patch)
tree2d91e38c0eaae563d9476585cc298aaaf073778a /common/misc.c
parentd8c247e00dfeec16ea90125fdaa62d38339271aa (diff)
downloadbarebox-f9a07ee39b8c3a16ba5a3ed1d34d419f38b34eda.tar.gz
svn_rev_181
add perror function (which does not do much yet)
Diffstat (limited to 'common/misc.c')
-rw-r--r--common/misc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/misc.c b/common/misc.c
index 8133e68..0d19366 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -23,10 +23,16 @@ void *sbrk (ptrdiff_t increment)
ulong old = mem_malloc_brk;
ulong new = old + increment;
- if ((new < mem_malloc_start) || (new > mem_malloc_end)) {
- return (NULL);
+ if ((new < mem_malloc_start) || (new > mem_malloc_end)) {
+ return (NULL);
}
mem_malloc_brk = new;
return ((void *) old);
}
+
+void perror(char *s, int errno)
+{
+ printf("%s failed with %d\n", s, errno);
+}
+