summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAndrew Boie <andrew.p.boie@intel.com>2016-08-18 12:57:59 -0700
committerAnas Nashif <anas.nashif@intel.com>2016-08-28 07:47:28 -0400
commit907a99933aa5ae506f314a27c936122357385c88 (patch)
tree5c20328c67fb48fd22aba854523e6c1325c6a08d /misc
parentad9d5265c3f596361346a9335420c98cfc44e466 (diff)
printk: "support" some modifier codes
We now allow modifier codes h, l, and z, although at the moment they are simply dropped. This is to allow us to warn on incorrect printk() usage by the compiler. These arguments get promoted to int when they are passed as arguments so this may never need to be addressed, although there may be implications for (future) support for systems with 16-bit integers. We still don't print 64-bit integers properly. but this is nothing new. Change-Id: I112d1257c4ec70c3fa7ae65dc56a6076ff29a8c0 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/printk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/printk.c b/misc/printk.c
index 4b681939c..2ac2b4fdc 100644
--- a/misc/printk.c
+++ b/misc/printk.c
@@ -85,6 +85,11 @@ static inline void _vprintk(const char *fmt, va_list ap)
}
} else {
switch (*fmt) {
+ case 'z':
+ case 'l':
+ case 'h':
+ /* FIXME: do nothing for these modifiers */
+ goto still_might_format;
case 'd':
case 'i': {
long d = va_arg(ap, long);
@@ -134,7 +139,7 @@ static inline void _vprintk(const char *fmt, va_list ap)
}
might_format = 0;
}
-
+still_might_format:
++fmt;
}
}