introduction of dmesg support
Subsystems (7)
v4 cover introduction of dmesg support
HI,
v4: remove a debug info
v3: add more swtich
we currently have 2 fifo at comsole level one for input one for output we fill the output fifo before any console is registered and then empty it
Now we introduce a new mecanism as in the kernel dmesg
we will always fill the dmesg kfifo with drivers output
as in barebox we have 2 world
device/drivers and applicaiotn (commands)
the verbositty of the printk can be selected at runtime and compilation
so for now on drivers will have to use pr_xxx and dev_xxx and application will use printf
dmesg will print the kfifo at any time
we will extend this later with more control of what the drivers output on the console or just in the fifo
This new feature is optionnal if dmes is disable we continue as before
The following changes since commit 94e71b843f6456abacc2fe76a5c375a461fabdf7:
libubi: Use global mtd_all_ff function (2013-03-04 10:54:46 +0100)
are available in the git repository at:
git://git.jcrosoft.org/barebox.git delivery/dmesg
for you to fetch changes up to b79c3fdbf9dcba5b38befc249663236890e3d295:
barebox_banner: switch to pr_info (2013-03-04 19:33:49 +0800)
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (9):
kfifo: introduce kfifo_dump_str to dump the fifo
console: switch to kfifo_dump_str
intoduce dmesg to print the barebox printk to dmesg ring buffer
startup: switch to pr_xxx
at91: clock switch to pr_info
meminfo: switch to pr_xxx
net/console: switch to pr_xxx
startup: switch to pr_xxx
barebox_banner: switch to pr_info
arch/arm/mach-at91/clock.c | 2 +- commands/Kconfig | 19 +++++++++++++++++++ common/console.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- common/meminfo.c | 6 +++--- common/startup.c | 12 ++++++------ common/version.c | 4 ++-- drivers/base/driver.c | 18 ++++++++++++------ include/kfifo.h | 2 ++ include/linux/barebox-wrapper.h | 11 ----------- include/printk.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-------------------- lib/kfifo.c | 21 +++++++++++++++++++++ net/netconsole.c | 4 ++-- 12 files changed, 238 insertions(+), 54 deletions(-)
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 1/9 kfifo: introduce kfifo_dump_str to dump the fifo
This will allow to implement a dmesg mecanism in barebox
--- include/kfifo.h | 2 ++ lib/kfifo.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+)
include/kfifo.h +2 -0
@@ -74,5 +74,7 @@ static inline unsigned int kfifo_len(struct kfifo *fifo)void kfifo_putc (struct kfifo *fifo,unsigned char c);unsigned int kfifo_getc (struct kfifo *fifo,unsigned char *c); +void kfifo_dump_str (struct kfifo *fifo,void (*dump)(unsigned char c)); +#endif
lib/kfifo.c +21 -0
@@ -154,3 +154,24 @@ unsigned int kfifo_getc(struct kfifo *fifo, unsigned char *c)return 0 ; } +void kfifo_dump_str (struct kfifo *fifo,void (*dump)(unsigned char c)) +{ +int i; +unsigned char *c; +unsigned int l; +unsigned int len; + + len = fifo->in - fifo->out; + +/* first get the data from fifo->out until the end of the buffer */ + l =min (len, fifo->size - (fifo->out & (fifo->size -1 ))); + c = fifo->buffer + (fifo->out & (fifo->size -1 )); +for (i =0 ; i < l; i++) +dump (c[i]); + +/* then get the rest (if any) from the beginning of the buffer */ + c = fifo->buffer; + l = len - l; +for (i =0 ; i < l; i++) +dump (c[i]); +}
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 2/9 console: switch to kfifo_dump_str
--- common/console.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
common/console.c +6 -3
@@ -55,6 +55,11 @@ static struct kfifo __console_output_fifo;static struct kfifo *console_input_fifo = &__console_input_fifo;static struct kfifo *console_output_fifo = &__console_output_fifo; +static void console_output_dump (unsigned char ch) +{ +console_putc (CONSOLE_STDOUT , ch); +} +static int console_std_set (struct device_d *dev,struct param_d *param,const char *val) {
@@ -86,14 +91,12 @@ static int console_std_set(struct device_d *dev, struct param_d *param,dev_param_set_generic (dev, param, active);if (initialized <CONSOLE_INIT_FULL ) { -char ch; initialized =CONSOLE_INIT_FULL ;PUTS_LL ("Switch to console [" );PUTS_LL (dev_name (dev));PUTS_LL ("]\n" );barebox_banner (); -while (kfifo_getc (console_output_fifo, &ch) ==0 ) -console_putc (CONSOLE_STDOUT , ch); +kfifo_dump_str (console_output_fifo, console_output_dump); }return 0 ;
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 3/9 intoduce dmesg to print the barebox printk to dmesg ring buffer
In reply to Jean-Christophe PLAGNIOL-VILLARDthe size can be configured vai DMESG_KFIFO_OSIZE
1024 by default
4096 if DEBUG_INFO
the verbosity of the printk can now be change at runtime and default via PRINTK_LEVEL
rename dev_printf to dev_printk and update to printk
--- commands/Kconfig | 19 +++++++ common/console.c | 116 +++++++++++++++++++++++++++++++++++++++ drivers/base/driver.c | 18 ++++-- include/linux/barebox-wrapper.h | 11 ---- include/printk.h | 68 ++++++++++++++++------- 5 files changed, 195 insertions(+), 37 deletions(-)
commands/Kconfig +19 -0
@@ -122,6 +122,25 @@ config CMD_TIME checking for ctrl-c, so the time command can be used with commands which are interruptible with ctrl-c. +config CMD_DMESG + bool "dmesg" + depends on CONSOLE_FULL + help + print the barebox output ring buffer + +if CMD_DMESG +config PRINTK_LEVEL + int "printk level" + range 0 7 + default 7 + +config DMESG_KFIFO_SIZE + prompt "kfifo dmesg size" + int + default 4086 if DEBUG_INFO + default 1024 +endif + config CMD_LINUX_EXEC bool "linux exec" depends on LINUX
common/console.c +116 -0
122 lines not on this page · raw message
drivers/base/driver.c +12 -6
@@ -364,23 +364,29 @@ const char *dev_id(const struct device_d *dev)return buf; } -int dev_printf (const struct device_d *dev,const char *format, ...) +#define PREFIX + +int dev_printk(const struct device_d *dev, int level, const char *format, ...) {va_list args; -int ret =0 ; +char printbuffer[CFG_PBSIZE ]; +char *s = printbuffer;if (dev->driver && dev->driver->name) - ret +=printf ("%s " , dev->driver->name); + s +=sprintf (s,"%s " , dev->driver->name); - ret +=printf ("%s: " ,dev_name (dev)); + s +=sprintf (s,"%s: " ,dev_name (dev));va_start (args, format); - ret +=vprintf (format, args); +vsprintf (s, format, args);va_end (args); -return ret; +if (IS_ENABLED (CONFIG_CMD_DMESG )) +return printk (KERN_SOH "%d%s" , level, printbuffer); +else +return printk ("%s" , printbuffer); }void devices_shutdown (void )
include/linux/barebox-wrapper.h +0 -11
@@ -9,17 +9,6 @@#define kfree (ptr) free(ptr)#define vfree (ptr) free(ptr) -#define KERN_EMERG ""/* system is unusable */ -#define KERN_ALERT ""/* action must be taken immediately */ -#define KERN_CRIT ""/* critical conditions */ -#define KERN_ERR ""/* error conditions */ -#define KERN_WARNING ""/* warning conditions */ -#define KERN_NOTICE ""/* normal but significant condition */ -#define KERN_INFO ""/* informational */ -#define KERN_DEBUG ""/* debug-level messages */ - -#define printk printf -#define pr_warn pr_warning#define __init
include/printk.h +48 -20
95 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/9] intoduce dmesg to print the barebox printk to dmesg ring buffer
Quoted 33 lines · Jean-Christophe PLAGNIOL-VILLARD
the size can be configured vai
DMESG_KFIFO_OSIZE1024 by default
4096 ifDEBUG_INFOthe verbosity of the printk can now be change at runtime and default via
PRINTK_LEVELrename
dev_printftodev_printkand update to printkSigned-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- commands/Kconfig | 19 +++++++ common/console.c | 116 +++++++++++++++++++++++++++++++++++++++ drivers/base/driver.c | 18 ++++-- include/linux/barebox-wrapper.h | 11 ---- include/printk.h | 68 ++++++++++++++++------- 5 files changed, 195 insertions(+), 37 deletions(-)commands/Kconfig +6
-0@@ -122,6 +122,25 @@ config CMD_TIME checking for ctrl-c, so the time command can be used with commands which are interruptible with ctrl-c. +config CMD_DMESG + bool "dmesg" + depends on CONSOLE_FULL + help + print the barebox output ring buffer +
commands/Kconfig config CMD_TIME · line 140
Quoted 10 lines
commands/Kconfig +10
-0+if CMD_DMESG +config PRINTK_LEVEL + int "printk level" + range 0 7 + default 7 + +config DMESG_KFIFO_SIZE + prompt "kfifo dmesg size" + int + default 4086 if DEBUG_INFO
Why 4086?
Quoted 28 lines
commands/Kconfig +3
-0+ default 1024 +endif + config CMD_LINUX_EXEC bool "linux exec" depends on LINUXcommon/console.c +10
-0@@ -1,3 +1,4 @@ +/* * (C) Copyright 2000 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), [email protected] @@ -349,3 +350,118 @@ int ctrlc (void) }EXPORT_SYMBOL (ctrlc);#endif /* ARCH_HAS_CTRC */ + +#ifdef CONFIG_CMD_DMESG +#include <command.h> +#include <complete.h> +#include <init.h> +#include <globalvar.h> + +static char dmesg_output_buffer[CONFIG_DMESG_KFIFO_SIZE ]; +static struct kfifo __dmesg_output_fifo;
common/console.c int ctrlc (void) · line 371
Quoted 10 lines
common/console.c +10
-0+static struct kfifo *dmesg_output_fifo = &__dmesg_output_fifo; +static int printk_level =CONFIG_PRINTK_LEVEL ; +static char printk_level_str[2 ] =__stringify (CONFIG_PRINTK_LEVEL ); + +static int printk_level_set (struct device_d *dev,struct param_d *p,const char *val) +{ +int level =simple_strtoul (val,NULL ,10 ); + +if (level <0 || level >7 ) +return -EINVAL ;
simple_strtoul returns an unsigned type which is assigned to a signed type and tested for < 0 then. Use unsigned directly.
Quoted 64 lines
common/console.c +64
-0+ + printk_level = level; + printk_level_str[0 ] = level +'0' ; + +return 0 ; +} + +const char *printk_level_get (struct device_d *d,struct param_d *p) +{ +return printk_level_str; +} + +static int printk_init (void ) +{ +return globalvar_add ("printk_level" , printk_level_set, printk_level_get,0 ); +} +coredevice_initcall (printk_init); + +static int printk_fifo_init (void ) +{ +kfifo_init (dmesg_output_fifo, dmesg_output_buffer, +CONFIG_DMESG_KFIFO_SIZE ); + +return 0 ; +} +pure_initcall (printk_fifo_init); + +static int do_dmesg (int argc,char *argv[]) +{ +kfifo_dump_str (dmesg_output_fifo, console_output_dump); + +return 0 ; +} + +static const __maybe_unused char cmd_dmesg_help[] = +"print the barebox output ring buffer\n" ; + +BAREBOX_CMD_START (dmesg) + .cmd = do_dmesg, + .usage = "dmesg", + BAREBOX_CMD_HELP(cmd_dmesg_help) + BAREBOX_CMD_COMPLETE(empty_complete) +BAREBOX_CMD_END + +int vprintk (const char *fmt, va_list args) +{ +uint i; +char printbuffer[CFG_PBSIZE ]; +char *s = printbuffer; +int level; + +/* For this to work, printbuffer must be larger than +* anything we ever want to print. +*/ + i =vsprintf (printbuffer, fmt, args); + + level =printk_get_level (printbuffer); +if (level) { + s +=2 ; +kfifo_putc (dmesg_output_fifo,'<' ); +kfifo_putc (dmesg_output_fifo, level); +kfifo_putc (dmesg_output_fifo,'>' ); + } +
common/console.c int ctrlc (void) · line 445
Quoted 10 lines
common/console.c +10
-0+/* Print the string */ +if (level <= printk_level +'0' ) +puts (s); + +while (*s) { +if (*s =='\n' ) +kfifo_putc (dmesg_output_fifo,'\r' ); +kfifo_putc (dmesg_output_fifo, *s); + s++; + }
the '\r' should be added during outputting the on the serial line, not while putting it into the buffer. Otherwise we have this in the logs should we ever want to safe them to a file. catting these files would then lead to double '\r'.
Also, wouldn't a kfifo_puts implementation make things easier and more efficient here?
Quoted 6 lines
common/console.c +6
-0+ +return i; +} +EXPORT_SYMBOL (vprintk); + +int printk (const char *fmt, ...)
common/console.c int ctrlc (void) · line 461
Quoted 10 lines
common/console.c +10
-0+{ +va_list args; +uint i; + +va_start (args, fmt); + + i =vprintk (fmt, args); +/* For this to work, printbuffer must be larger than +* anything we ever want to print. +*/
There is no printbuffer in this function.
Quoted 11 lines
common/console.c +6
-0+va_end (args); + + return i; +} +EXPORT_SYMBOL (printk); +#endif drivers/base/driver.c +0
-0
drivers/base/driver.c const char *dev_id(const struct device_d *dev) · line 367
Quoted 5 lines
drivers/base/driver.c +1
-1@@ -364,23 +364,29 @@ const char *dev_id(const struct device_d *dev)return buf; } -int dev_printf (const struct device_d *dev,const char *format, ...) +#define PREFIX
Trailing whitespace
Quoted 15 lines
drivers/base/driver.c +6
-3+ +int dev_printk (const struct device_d *dev,int level,const char *format, ...) {va_list args; -int ret =0 ; +char printbuffer[CFG_PBSIZE ]; +char *s = printbuffer;if (dev->driver && dev->driver->name) - ret +=printf ("%s " , dev->driver->name); + s +=sprintf (s,"%s " , dev->driver->name); - ret +=printf ("%s: " ,dev_name (dev)); + s +=sprintf (s,"%s: " ,dev_name (dev));
drivers/base/driver.c const char *dev_id(const struct device_d *dev) · line 387
Quoted 10 lines
drivers/base/driver.c +3
-2va_start (args, format); - ret +=vprintf (format, args); +vsprintf (s, format, args);va_end (args); -return ret; +if (IS_ENABLED (CONFIG_CMD_DMESG )) +return printk (KERN_SOH "%d%s" , level, printbuffer);
What is this KERN_SOH? It's defined nowhere in this patch.
Quoted 11 lines
drivers/base/driver.c +2
-0+else +return printk ("%s" , printbuffer); }void devices_shutdown (void )include/linux/barebox-wrapper.h +0
-0@@ -9,17 +9,6 @@#define kfree (ptr) free(ptr)
include/linux/barebox-wrapper.h line 19
Quoted 10 lines
include/linux/barebox-wrapper.h +0
-8#define vfree (ptr) free(ptr) -#define KERN_EMERG ""/* system is unusable */ -#define KERN_ALERT ""/* action must be taken immediately */ -#define KERN_CRIT ""/* critical conditions */ -#define KERN_ERR ""/* error conditions */ -#define KERN_WARNING ""/* warning conditions */ -#define KERN_NOTICE ""/* normal but significant condition */ -#define KERN_INFO ""/* informational */ -#define KERN_DEBUG ""/* debug-level messages */
Removing these will probably lead t compile failures.
Quoted 34 lines
include/linux/barebox-wrapper.h +0
-3- -#define printk printf -#define pr_warn pr_warning#define __initinclude/printk.h +13
-0@@ -1,6 +1,8 @@#ifndef __PRINTK_H#define __PRINTK_H +#include <linux/kern_levels.h> +#define MSG_EMERG 0/* system is unusable */ #define MSG_ALERT 1/* action must be taken immediately */ #define MSG_CRIT 2/* critical conditions */ @@ -16,41 +18,67 @@#define LOGLEVEL CONFIG_COMPILE_LOGLEVEL#endif +#ifdef CONFIG_CMD_DMESG +int printk (const char *fmt, ...) __attribute__ ((format (__printf__,1 ,2 ))); +int vprintk (const char *fmt,va_list args); +#define __pr_printk(level, format, args...) \ + ({ \ + int ret = 0; \ + if (level <= LOGLEVEL) \ + ret = printk(KERN_SOH "%d" format, level, ##args); \ + ret; \ + }) +#else
include/printk.h line 41
Quoted 10 lines
include/printk.h +10
-0+#define printk printf +#define vprintk vprintf +#define __pr_printk(level, format, args...) \ + ({ \ + int ret = 0; \ + if (level <= LOGLEVEL) \ + ret = printk(format, ##args); \ + ret; \ + }) +#endif
Please rebase this on the brown-paper-bag-bugfix I just sent to the list.
include/printk.h line 45
Quoted 3 lines
include/printk.h +3
-0+static inline int printk_get_level (const char *buffer) +{ +if (buffer[0 ] ==KERN_SOH_ASCII && buffer[1 ]) {
KERN_SOH_ASCII also is defined nowhere.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 4/9 startup: switch to pr_xxx
In reply to Jean-Christophe PLAGNIOL-VILLARD--- common/startup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/startup.c +2 -2
@@ -105,14 +105,14 @@ void __noreturn start_barebox(void)for (initcall = __barebox_initcalls_start; initcall < __barebox_initcalls_end; initcall++) { -debug ("initcall-> %pS\n" , *initcall); +pr_debug ("initcall-> %pS\n" , *initcall); result = (*initcall)();if (result)pr_err ("initcall %pS failed: %s\n" , *initcall,strerror (-result)); } -debug ("initcalls done\n" ); +pr_debug ("initcalls done\n" );if (IS_ENABLED (CONFIG_ENV_HANDLING )) {int ret;
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 5/9 at91: clock switch to pr_info
In reply to Jean-Christophe PLAGNIOL-VILLARD--- arch/arm/mach-at91/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/clock.c +1 -1
@@ -756,7 +756,7 @@ static int at91_clock_display(void)if (pll_overclock)pr_info ("Clocks: PLLA overclocked, %ld MHz\n" , plla.rate_hz /1000000 ); -printf ("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n" , +pr_info ("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n" , cpu_freq /1000000 , (unsigned ) mck.rate_hz /1000000 , (unsigned ) main_clk.rate_hz /1000000 , ((unsigned ) main_clk.rate_hz %1000000 ) /1000 );
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 6/9 meminfo: switch to pr_xxx
In reply to Jean-Christophe PLAGNIOL-VILLARD--- common/meminfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
common/meminfo.c +3 -3
@@ -10,9 +10,9 @@ static int display_meminfo(void)ulong mend =mem_malloc_end ();ulong msize = mend - mstart +1 ; -debug ("barebox code: 0x%p -> 0x%p\n" , _stext, _etext -1 ); -debug ("bss segment: 0x%p -> 0x%p\n" , __bss_start, __bss_stop -1 ); -printf ("malloc space: 0x%08lx -> 0x%08lx (size %s)\n" , +pr_debug ("barebox code: 0x%p -> 0x%p\n" , _stext, _etext -1 ); +pr_debug ("bss segment: 0x%p -> 0x%p\n" , __bss_start, __bss_stop -1 ); +pr_info ("malloc space: 0x%08lx -> 0x%08lx (size %s)\n" , mstart, mend,size_human_readable (msize));return 0 ; }
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 7/9 net/console: switch to pr_xxx
In reply to Jean-Christophe PLAGNIOL-VILLARD--- net/netconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netconsole.c +2 -2
@@ -185,7 +185,7 @@ static int netconsole_init(void) ret =console_register (cdev);if (ret) { -printf ("netconsole: registering failed with %s\n" ,strerror (-ret)); +pr_err ("netconsole: registering failed with %s\n" ,strerror (-ret));kfree (priv);return ret; }
@@ -194,7 +194,7 @@ static int netconsole_init(void)dev_add_param (&cdev->class_dev,"port" , nc_port_set,NULL ,0 );dev_set_param (&cdev->class_dev,"port" ,"6666" ); -printf ("registered netconsole as %s%d\n" , cdev->class_dev.name, cdev->class_dev.id); +pr_info ("registered netconsole as %s%d\n" , cdev->class_dev.name, cdev->class_dev.id);return 0 ; }
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 7/9] net/console: switch to pr_xxx
Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- net/netconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)net/netconsole.c +0
-0
net/netconsole.c static int netconsole_init(void) · line 188
Quoted 5 lines
net/netconsole.c +1
-1@@ -185,7 +185,7 @@ static int netconsole_init(void) ret =console_register (cdev);if (ret) { -printf ("netconsole: registering failed with %s\n" ,strerror (-ret)); +pr_err ("netconsole: registering failed with %s\n" ,strerror (-ret));
When you rework the printfs please add a:
#define pr_fmt(fmt) "netconsole: " fmt
to get a consistent layout of the pr_* messages.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 8/9 startup: switch to pr_xxx
In reply to Jean-Christophe PLAGNIOL-VILLARD--- common/startup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
common/startup.c +4 -4
@@ -120,7 +120,7 @@ void __noreturn start_barebox(void) ret =envfs_load (default_environment_path,"/env" ,0 );if (ret &&IS_ENABLED (CONFIG_DEFAULT_ENVIRONMENT )) { -printf ("no valid environment found on %s. " +pr_err ("no valid environment found on %s. " "Using default environment\n" , default_environment_path);envfs_load ("/dev/defaultenv" ,"/env" ,0 );
@@ -128,17 +128,17 @@ void __noreturn start_barebox(void) }if (IS_ENABLED (CONFIG_COMMAND_SUPPORT )) { -printf ("running /env/bin/init...\n" ); +pr_info ("running /env/bin/init...\n" );if (!stat ("/env/bin/init" , &s)) {run_command ("source /env/bin/init" ,0 ); }else { -printf ("not found\n" ); +pr_err ("/env/bin/init not found\n" ); } }if (!barebox_main) { -printf ("No main function! aborting.\n" ); +pr_err ("No main function! aborting.\n" );hang (); }
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v4 9/9 barebox_banner: switch to pr_info
In reply to Jean-Christophe PLAGNIOL-VILLARD--- common/version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
common/version.c +2 -2
@@ -16,6 +16,6 @@ void barebox_banner (void)if (!board) board =CONFIG_BOARDINFO ; -printf ("\n\n%s\n\n" , version_string); -printf ("Board: %s\n" , board); +pr_info ("\n\n%s\n\n" , version_string); +pr_info ("Board: %s\n" , board); }
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox