summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tobias.klauser@uzh.ch>2013-02-22 16:28:11 +0100
committerTobias Klauser <tobias.klauser@uzh.ch>2013-02-22 16:28:11 +0100
commit4b64fef4c41ae4432eb00b8b814ed4d4d746f794 (patch)
tree6fcf6fa13f946de4f0ab641a46ef684d2f1726be
parent97b46a1192352c564eabb841c21ad1284ad1d51b (diff)
Logger: Add warn() method
-rw-r--r--Logger.cpp12
-rw-r--r--Logger.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/Logger.cpp b/Logger.cpp
index b0850a6..b4f6bbf 100644
--- a/Logger.cpp
+++ b/Logger.cpp
@@ -45,6 +45,18 @@ int Logger::log(const char *fmt, ...)
return ret;
}
+int Logger::warn(const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ va_start(ap, fmt);
+ ret = _log_vfprintf(_f_err, "Warning", fmt, ap);
+ va_end(ap);
+
+ return ret;
+}
+
int Logger::err(const char *fmt, ...)
{
va_list ap;
diff --git a/Logger.h b/Logger.h
index 5ee5bd4..85f9f4c 100644
--- a/Logger.h
+++ b/Logger.h
@@ -25,6 +25,7 @@ public:
}
int log(const char *fmt, ...);
+ int warn(const char *fmt, ...);
int err(const char *fmt, ...);
private:
Logger() : _f_out(stdout), _f_err(stderr) { }
ing command lineMichal Simek1-7/+6 2012-06-27mtd/uclinux: Use generic __bss_stop instead of _ebssGeert Uytterhoeven1-2/+2 2012-03-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into nextMichal Simek1-3/+0 2012-03-28Merge tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub...Linus Torvalds1-1/+0 2012-03-28Disintegrate asm/system.h for MicroblazeDavid Howells1-1/+0 2012-03-28microblaze: Fix tlb_skip variable on noMMU systemMichal Simek1-0/+2 2012-03-27Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds1-1/+23 2012-03-23microblaze: Handle TLB skip size dynamicallyMichal Simek1-0/+13 2012-03-23microblaze: Improve TLB calculation for small systemsMichal Simek1-1/+10 2012-02-14irq_domain: convert microblaze from irq_host to irq_domainGrant Likely1-2/+0 2012-01-31Revert "microblaze: Add topology init"Michal Simek1-20/+1 2012-01-11microblaze: Add topology initMichal Simek1-1/+20 2012-01-05microblaze: Remove eprintk macroMichal Simek1-9/+9 2011-07-25microblaze: Get early printk console earlierMichal Simek1-0/+5 2011-03-15microblaze: Do not copy reset vectors/manual reset vector setupMichal Simek1-2/+10 2011-02-07microblaze: Fix msr instruction detectionMichal Simek1-2/+2 2010-10-21microblaze: Report if only one timer is usedMichal Simek1-6/+0 2010-07-24of: Merge of_platform_bus_type with platform_bus_typeGrant Likely1-6/+0