bump copyright date on affected files and version
[AROS.git] / arch / all-hosted / bootstrap / log.c
blob369d8ae63e3a6b289c6d94402647aedf65cb63bd
1 #include <fcntl.h>
2 #include <unistd.h>
4 #include "log.h"
6 int SetLog(const char *c)
8 /*
9 * Redirect stderr on filedescriptor level.
10 * Redirecting on streams level does not work with Android's Bionic
12 int fd = open(c, O_WRONLY|O_CREAT|O_APPEND, 0644);
14 if (fd == -1)
15 return -1;
17 if (dup2(fd, STDERR_FILENO) == -1)
19 close(fd);
20 return -1;
23 return 0;