From d96ae03bd924f7d6b8911024f0e787ad4a4c876f Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 1 Nov 2012 12:45:23 -0200 Subject: [PATCH] modprobe: prefix log messages to stderr with modprobe --- tools/modprobe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/modprobe.c b/tools/modprobe.c index 5bfba57..8340951 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -213,7 +213,7 @@ static void log_modprobe(void *data, int priority, const char *file, int line, (void)data; } -static inline void _log(int prio, const char *fmt, ...) +static void _log(int prio, const char *fmt, ...) { const char *prioname; char *msg; @@ -232,9 +232,9 @@ static inline void _log(int prio, const char *fmt, ...) prioname = prio_to_str(prio); if (use_syslog) - syslog(LOG_NOTICE, "%s: %s", prioname, msg); + syslog(prio, "%s: %s", prioname, msg); else - fprintf(stderr, "%s: %s", prioname, msg); + fprintf(stderr, "modprobe: %s: %s", prioname, msg); free(msg); if (prio <= LOG_CRIT) -- 2.7.4