r4426 - trunk/src/target/opkg/libopkg
thomas at docs.openmoko.org
thomas at docs.openmoko.org
Mon May 12 17:11:24 CEST 2008
Author: thomas
Date: 2008-05-12 17:11:23 +0200 (Mon, 12 May 2008)
New Revision: 4426
Modified:
trunk/src/target/opkg/libopkg/opkg_message.c
Log:
opkg: add default message handler
Modified: trunk/src/target/opkg/libopkg/opkg_message.c
===================================================================
--- trunk/src/target/opkg/libopkg/opkg_message.c 2008-05-12 13:48:41 UTC (rev 4425)
+++ trunk/src/target/opkg/libopkg/opkg_message.c 2008-05-12 15:11:23 UTC (rev 4426)
@@ -26,11 +26,18 @@
va_list ap;
char ts[256];
+ va_start (ap, fmt);
+ vsnprintf (ts,256,fmt, ap);
+ va_end (ap);
+
if (opkg_cb_message)
{
- va_start (ap, fmt);
- vsnprintf (ts,256,fmt, ap);
- va_end (ap);
opkg_cb_message(conf,level,ts);
}
+ else
+ {
+ char *level_s[5] = {"ERROR", "NOTICE", "INFO", "DEBUG", "DEBUG2"};
+ if (level <= conf->verbosity)
+ printf ("opkg-%s: %s", level_s[level], ts);
+ }
}
More information about the commitlog
mailing list