[BusyBox] [PATCH] devfsd - last minute fix n2

Tito farmatito at tiscali.it
Fri Nov 19 21:52:46 UTC 2004


Ops ,
one more  last minute fix. ;-)
Hope is the last one for today.
 
Ciao,
Tito
diff -uN miscutils/devfsd_orig.c miscutils/devfsd.c
--- miscutils/devfsd_orig.c     2004-11-19 21:30:36.000000000 +0100
+++ miscutils/devfsd.c  2004-11-19 22:45:41.745316672 +0100
@@ -306,22 +306,26 @@
 #if defined(CONFIG_DEVFSD_VERBOSE) || defined(CONFIG_DEBUG)
 static void msg_logger(int die, int pri, const char * fmt, ... )
 {
+       int errno_save = errno;
        va_list ap;

        va_start(ap, fmt);
-       if (access ("/dev/log", F_OK) == 0)
-       {
+       if (access ("/dev/log", F_OK) == 0) {
                openlog(bb_applet_name, 0, LOG_DAEMON);
                vsyslog( pri , fmt , ap);
                closelog();
-       }
-#ifndef CONFIG_DEBUG
-       else
-#endif
+#ifndef CONFIG_DEBUG
+       } else {
                bb_verror_msg(fmt, ap);
+       }
+#else
+       }
+       bb_verror_msg(fmt, ap);
+#endif
        va_end(ap);
        if(die==DIE)
                exit(EXIT_FAILURE);
+       errno = errno_save;
 }
 #endif

 ----- end of patch -----



More information about the busybox mailing list