/*
* Mini logger implementation for busybox
*
- * Copyright (C) 1999,2000 by Lineo, inc.
+ * Copyright (C) 1999,2000,2001 by Lineo, inc.
* Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
*
* This program is free software; you can redistribute it and/or modify
#include <sys/types.h>
#include <fcntl.h>
#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
#if !defined BB_SYSLOGD
while ((c = getc(stdin)) != EOF && i < sizeof(buf)) {
buf[i++] = c;
}
+ buf[i++] = '\0';
message = buf;
} else {
len = 1; /* for the '\0' */
openlog(name, option, (pri | LOG_FACMASK));
syslog(pri, "%s", message);
closelog();
-
return EXIT_SUCCESS;
}