diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-30 10:26:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-30 15:33:22 +0200 |
commit | 930ce6e142354268d11ec9fe5cf6f4fc66a8f1f0 (patch) | |
tree | d924b3a215a8dac31e35c1e83ebf3440545d353e /drivers/base | |
parent | 6ae9a40c799dd341db985c95cc906ae2e0aacf97 (diff) | |
download | barebox-930ce6e142354268d11ec9fe5cf6f4fc66a8f1f0.tar.gz barebox-930ce6e142354268d11ec9fe5cf6f4fc66a8f1f0.tar.xz |
Introduce message logging support
This adds a buffer for log messages and a 'dmesg' command to
print the messages. The log buffer is implemented as log objects
rather than a string buffer. This makes it easy to implement
limiting the messages, cleaning the buffer and timestamping
the messages.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/driver.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 2cf3ee6892..9709415821 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -377,28 +377,6 @@ const char *dev_id(const struct device_d *dev) return buf; } -int dev_printf(int level, const struct device_d *dev, const char *format, ...) -{ - va_list args; - int ret = 0; - - if (level > barebox_loglevel) - return 0; - - if (dev->driver && dev->driver->name) - ret += printf("%s ", dev->driver->name); - - ret += printf("%s: ", dev_name(dev)); - - va_start(args, format); - - ret += vprintf(format, args); - - va_end(args); - - return ret; -} - void devices_shutdown(void) { struct device_d *dev; |