diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-02-24 12:25:08 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-02-24 12:25:08 -0800 |
commit | 61ff02512824f0c9b41b51e52f7f1208a67d5d3a (patch) | |
tree | 5f5923c52722baca09b5e468b0ac3de406bab0a6 /usb | |
parent | 1f2a657df7fd3d0a55c9820bd16a6fe16339bc01 (diff) | |
download | patches-61ff02512824f0c9b41b51e52f7f1208a67d5d3a.tar.gz |
header file patches
Diffstat (limited to 'usb')
-rw-r--r-- | usb/usb-reduce-syslog-clutter.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/usb/usb-reduce-syslog-clutter.patch b/usb/usb-reduce-syslog-clutter.patch new file mode 100644 index 00000000000000..8e94ab9329f266 --- /dev/null +++ b/usb/usb-reduce-syslog-clutter.patch @@ -0,0 +1,40 @@ +From linux-usb-devel-admin@lists.sourceforge.net Fri Feb 24 01:51:08 2006 +Message-ID: <43FED6FC.3090604@imap.cc> +From: Tilman Schmidt <tilman@imap.cc> +Cc: <hjlipp@web.de> +Subject: USB: reduce syslog clutter +Date: Fri, 24 Feb 2006 10:50:52 +0100 + +The current versions of the err() / info() / warn() syslog macros +insert __FILE__ at the beginning of the message, which expands to +the complete path name of the source file within the kernel tree. + +With the following patch, when used in a module, they'll insert the +module name instead, which is significantly shorter and also tends to +be more useful to users trying to make sense of a particular message. + +Signed-off-by: Tilman Schmidt <tilman@imap.cc> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + include/linux/usb.h | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- gregkh-2.6.orig/include/linux/usb.h ++++ gregkh-2.6/include/linux/usb.h +@@ -1198,11 +1198,13 @@ extern void usb_unregister_notify(struct + #endif + + #define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \ +- __FILE__ , ## arg) ++ THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg) + #define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , \ +- __FILE__ , ## arg) ++ THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg) + #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \ +- __FILE__ , ## arg) ++ THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg) ++#define notice(format, arg...) printk(KERN_NOTICE "%s: " format "\n" , \ ++ THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg) + + + #endif /* __KERNEL__ */ |