[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] [PATCH] devfsd
From:       Tito <farmatito () tiscali ! it>
Date:       2004-11-19 20:41:47
Message-ID: 200411192141.47528.farmatito () tiscali ! it
[Download RAW message or body]

Hi, Allen
this is just a slightly modified patch that saves one line of code
and cleans the coding style a liittle.

 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 21:35:54.933808768 +0100
@@ -306,22 +306,25 @@
 #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 -----

Ciao,
Tito
> -- 
> Allen Chan
> allen@developers.alyz.com
> http://www.alyz.com
> _______________________________________________
> busybox mailing list
> busybox@mail.busybox.net
> http://codepoet.org/mailman/listinfo/busybox
> 
> 
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic