Update internal.h to conditionally include asm/string.h
[oweals/busybox.git] / logger.c
index a9e0afcc8380e638e004947422ef7390e89cd771..d32ccaaf34e936213dd3a9dcb8469dc1538d43b8 100644 (file)
--- a/logger.c
+++ b/logger.c
@@ -2,7 +2,7 @@
 /*
  * Mini logger implementation for busybox
  *
- * Copyright (C) 1999 by Lineo, inc.
+ * Copyright (C) 1999,2000 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
@@ -48,14 +48,17 @@ extern CODE facilitynames[];
 #endif
 
 static const char logger_usage[] =
-       "logger [OPTION]... [MESSAGE]\n\n"
-       "Write MESSAGE to the system log.  If MESSAGE is '-', log stdin.\n\n"
+       "logger [OPTION]... [MESSAGE]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+       "\nWrite MESSAGE to the system log.  If MESSAGE is '-', log stdin.\n\n"
        "Options:\n"
        "\t-s\tLog to stderr as well as the system log.\n"
        "\t-t\tLog using the specified tag (defaults to user name).\n"
 
        "\t-p\tEnter the message with the specified priority.\n"
-       "\t\tThis may be numerical or a ``facility.level'' pair.\n";
+       "\t\tThis may be numerical or a ``facility.level'' pair.\n"
+#endif
+       ;
 
 
 /* Decode a symbolic name to a numeric value 
@@ -115,7 +118,7 @@ extern int logger_main(int argc, char **argv)
        int option = 0;
        int fromStdinFlag = FALSE;
        int stopLookingAtMeLikeThat = FALSE;
-       char *message, buf[1024], name[128];
+       char *message=NULL, buf[1024], name[128];
 
        /* Fill out the name string early (may be overwritten later */
        my_getpwuid(name, geteuid());
@@ -172,5 +175,5 @@ extern int logger_main(int argc, char **argv)
        syslog(pri, message);
        closelog();
 
-       exit(TRUE);
+       return(TRUE);
 }