[BusyBox] [PATCH] devfsd
Tito
farmatito at tiscali.it
Fri Nov 19 20:41:47 UTC 2004
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 at developers.alyz.com
> http://www.alyz.com
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>
>
More information about the busybox
mailing list