Fix a logger bug.
-Erik
This commit is contained in:
parent
ac6e71f0c4
commit
9a9a261569
@ -2,6 +2,9 @@
|
|||||||
* Fixed a bug in both cp and mv preventing 'cp foo/README bar'
|
* Fixed a bug in both cp and mv preventing 'cp foo/README bar'
|
||||||
type commands (file in a directory to another directory)
|
type commands (file in a directory to another directory)
|
||||||
from working.
|
from working.
|
||||||
|
* Fixed a logger bug that caused garbage to be written to the syslog
|
||||||
|
(unless you used busybox syslog, which hid the bug). Thanks
|
||||||
|
to Alex Holden <alex@linuxhacker.org> for the fix.
|
||||||
|
|
||||||
-Erik Andersen,
|
-Erik Andersen,
|
||||||
|
|
||||||
|
2
logger.c
2
logger.c
@ -186,7 +186,7 @@ extern int logger_main(int argc, char **argv)
|
|||||||
if (toStdErrFlag==TRUE)
|
if (toStdErrFlag==TRUE)
|
||||||
fprintf(stderr, "%s\n", buf);
|
fprintf(stderr, "%s\n", buf);
|
||||||
|
|
||||||
write( fd, buf, sizeof(buf));
|
write( fd, buf, strlen(buf)+1);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
exit( TRUE);
|
exit( TRUE);
|
||||||
|
@ -186,7 +186,7 @@ extern int logger_main(int argc, char **argv)
|
|||||||
if (toStdErrFlag==TRUE)
|
if (toStdErrFlag==TRUE)
|
||||||
fprintf(stderr, "%s\n", buf);
|
fprintf(stderr, "%s\n", buf);
|
||||||
|
|
||||||
write( fd, buf, sizeof(buf));
|
write( fd, buf, strlen(buf)+1);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
exit( TRUE);
|
exit( TRUE);
|
||||||
|
Loading…
Reference in New Issue
Block a user