summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka2011-07-15 10:50:25 -0500
committerLuis R. Rodriguez2011-07-19 20:07:08 -0500
commit807b8b85d0d51abbb6cafd1bc964c29e2f8240f2 (patch)
tree812e5cef2b94a20071ac221e92b93da51ad465d6
parent7d35284cf37755408256ba0e0ede8cb961527d73 (diff)
downloadcompat-807b8b85d0d51abbb6cafd1bc964c29e2f8240f2.tar.gz
compat-807b8b85d0d51abbb6cafd1bc964c29e2f8240f2.tar.xz
compat-807b8b85d0d51abbb6cafd1bc964c29e2f8240f2.zip
compat: add pr_<level>_once macros
Add functions from 2.6.38 kernel commit: commit 16cb839f13324978bd58082e69de81a711802b11 Author: Joe Perches <joe@perches.com> Date: Wed Jan 12 16:59:46 2011 -0800 include/linux/printk.h: add pr_<level>_once macros Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
-rw-r--r--include/linux/compat-2.6.38.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/compat-2.6.38.h b/include/linux/compat-2.6.38.h
index 2dd1910..dfe1250 100644
--- a/include/linux/compat-2.6.38.h
+++ b/include/linux/compat-2.6.38.h
@@ -46,6 +46,31 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
46 return skb->csum_start - skb_headroom(skb); 46 return skb->csum_start - skb_headroom(skb);
47} 47}
48 48
49/* from include/linux/printk.h */
50#define pr_emerg_once(fmt, ...) \
51 printk_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
52#define pr_alert_once(fmt, ...) \
53 printk_once(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
54#define pr_crit_once(fmt, ...) \
55 printk_once(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
56#define pr_err_once(fmt, ...) \
57 printk_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
58#define pr_warn_once(fmt, ...) \
59 printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
60#define pr_notice_once(fmt, ...) \
61 printk_once(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
62#define pr_info_once(fmt, ...) \
63 printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
64#define pr_cont_once(fmt, ...) \
65 printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__)
66#if defined(DEBUG)
67#define pr_debug_once(fmt, ...) \
68 printk_once(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
69#else
70#define pr_debug_once(fmt, ...) \
71 no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
72#endif
73
49#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */ 74#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) */
50 75
51#endif /* LINUX_26_38_COMPAT_H */ 76#endif /* LINUX_26_38_COMPAT_H */