Implement optional syslog logging using ordinary
[oweals/busybox.git] / networking / udhcp / pidfile.c
index d656c7ad0ee2e85a8588d15b404a914450f3db72..148b07b342a42ff67457b9cc5ab1cda4469174bc 100644 (file)
@@ -1,8 +1,9 @@
+/* vi: set sw=4 ts=4: */
 /* pidfile.c
  *
  * Functions to assist in the writing and removing of pidfiles.
  *
- * Russ Dill <Russ.Dill@asu.edu> Soptember 2001
+ * Russ Dill <Russ.Dill@asu.edu> September 2001
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,8 +27,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "pidfile.h"
 #include "common.h"
+#include "pidfile.h"
 
 static char *saved_pidfile;
 
@@ -44,7 +45,7 @@ int pidfile_acquire(const char *pidfile)
 
        pid_fd = open(pidfile, O_CREAT | O_WRONLY, 0644);
        if (pid_fd < 0) {
-               LOG(LOG_ERR, "Unable to open pidfile %s: %m\n", pidfile);
+               bb_perror_msg("Unable to open pidfile %s", pidfile);
        } else {
                lockf(pid_fd, F_LOCK, 0);
                if (!saved_pidfile)