Static-ify a variable. make du work with all the human-readable variants
[oweals/busybox.git] / syslogd.c
index 3c36f68e874f1db63cc0a90240c69e9e0f11a365..8049fc5d1675777c5b599b1631808f03f21e491e 100644 (file)
--- a/syslogd.c
+++ b/syslogd.c
@@ -2,7 +2,7 @@
 /*
  * Mini syslogd 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>
  *
  * Copyright (C) 2000 by Karl M. Hegbloom <karlheg@debian.org>
@@ -23,7 +23,6 @@
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -56,6 +55,7 @@ static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
 #else
 # include <sys/klog.h>
 #endif
+#include "busybox.h"
 
 
 
@@ -182,7 +182,7 @@ static const int IOV_COUNT = 2;
 
                if ( -1 == writev(remotefd,iov, IOV_COUNT)){
                        error_msg_and_die("syslogd: cannot write to remote file handle on" 
-                                       "%s:%d\n",RemoteHost,RemotePort);
+                                       "%s:%d",RemoteHost,RemotePort);
                }
        }
        if (local_logging == TRUE)
@@ -264,13 +264,13 @@ static void init_RemoteLog (void){
   remotefd = socket(AF_INET, SOCK_DGRAM, 0);
 
   if (remotefd < 0) {
-    error_msg_and_die("syslogd: cannot create socket\n");
+    error_msg_and_die("syslogd: cannot create socket");
   }
 
   hostinfo = (struct hostent *) gethostbyname(RemoteHost);
 
   if (!hostinfo) {
-    error_msg_and_die("syslogd: cannot resolve remote host name [%s]\n", RemoteHost);
+    error_msg_and_die("syslogd: cannot resolve remote host name [%s]", RemoteHost);
   }
 
   remoteaddr.sin_family = AF_INET;
@@ -282,7 +282,7 @@ static void init_RemoteLog (void){
      for future operations
   */
   if ( 0 != (connect(remotefd, (struct sockaddr *) &remoteaddr, len))){
-    error_msg_and_die("syslogd: cannot connect to remote host %s:%d\n", RemoteHost, RemotePort);
+    error_msg_and_die("syslogd: cannot connect to remote host %s:%d", RemoteHost, RemotePort);
   }
 
 }
@@ -519,7 +519,7 @@ extern int syslogd_main(int argc, char **argv)
                                break;
 #endif
                        default:
-                               usage(syslogd_usage);
+                               show_usage();
                }
        }