diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-11-01 10:31:00 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-11-01 15:32:52 +0800 |
commit | 089d0a6eb769d531129a7cd1061493a1a24b4bef (patch) | |
tree | 62e6b58e6a9cd9b19ac9f7a8986b9d01cfe5ec70 /ui/ncurses | |
parent | 896da834e7126759ef69c33347055c593abedde3 (diff) | |
download | talos-petitboot-089d0a6eb769d531129a7cd1061493a1a24b4bef.tar.gz talos-petitboot-089d0a6eb769d531129a7cd1061493a1a24b4bef.zip |
logging: Clean up debug logs
We have quite a few pb_logs which should be pb_debug. This change moves
developer-specific info to pb_debug.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses')
-rw-r--r-- | ui/ncurses/nc-cui.c | 8 | ||||
-rw-r--r-- | ui/ncurses/nc-menu.h | 16 | ||||
-rw-r--r-- | ui/ncurses/nc-scr.h | 9 | ||||
-rw-r--r-- | ui/ncurses/ps3-main.c | 2 |
4 files changed, 11 insertions, 24 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c index da97fd9..e02c6a6 100644 --- a/ui/ncurses/nc-cui.c +++ b/ui/ncurses/nc-cui.c @@ -60,7 +60,7 @@ void cui_abort(struct cui *cui) void cui_resize(struct cui *cui) { - pb_log("%s: resizing\n", __func__); + pb_debug("%s: resizing\n", __func__); cui->resize = 1; } @@ -112,7 +112,7 @@ static int cui_boot(struct pmenu_item *item) assert(cui->current == &cui->main->scr); - pb_log("%s: %s\n", __func__, cod->name); + pb_debug("%s: %s\n", __func__, cod->name); nc_scr_status_printf(cui->current, "Booting %s...", cod->name); @@ -302,7 +302,7 @@ static void cui_handle_resize(struct cui *cui) return; } - pb_log("%s: {%u,%u}\n", __func__, ws.ws_row, ws.ws_col); + pb_debug("%s: {%u,%u}\n", __func__, ws.ws_row, ws.ws_col); wclear(cui->current->main_ncw); resize_term(ws.ws_row, ws.ws_col); @@ -331,7 +331,7 @@ static int cui_boot_option_add(struct device *dev, struct boot_option *opt, ITEM *selected; int result; - pb_log("%s: %p %s\n", __func__, opt, opt->id); + pb_debug("%s: %p %s\n", __func__, opt, opt->id); selected = current_item(cui->main->ncm); diff --git a/ui/ncurses/nc-menu.h b/ui/ncurses/nc-menu.h index 3b7bc88..4beffb0 100644 --- a/ui/ncurses/nc-menu.h +++ b/ui/ncurses/nc-menu.h @@ -114,26 +114,18 @@ static inline struct pmenu *pmenu_from_scr(struct nc_scr *scr) /* debug routines */ -#if defined(DEBUG) -enum {do_debug = 1}; -#else -enum {do_debug = 0}; -#endif - static inline void pmenu_dump_item(const ITEM *item) { - if (do_debug) - pb_log("%p %s\n", item, (item ? item->name.str : "(null)")); + pb_debug("%p %s\n", item, (item ? item->name.str : "(null)")); } static inline void pmenu_dump_items(ITEM *const *items, unsigned int count) { unsigned int i; - if (do_debug) - for (i = 0; i < count; i++) - pb_log("%u: %p %s\n", i, items[i], - (items[i] ? items[i]->name.str : "(null)")); + for (i = 0; i < count; i++) + pb_debug("%u: %p %s\n", i, items[i], + (items[i] ? items[i]->name.str : "(null)")); } #endif diff --git a/ui/ncurses/nc-scr.h b/ui/ncurses/nc-scr.h index 298aa7d..9f80e65 100644 --- a/ui/ncurses/nc-scr.h +++ b/ui/ncurses/nc-scr.h @@ -34,14 +34,9 @@ # error "Curses header file not found." #endif -#ifdef DEBUG -#define DBG(fmt, args...) pb_log("DBG: " fmt, ## args) +#define DBG(fmt, args...) pb_debug("DBG: " fmt, ## args) #define DBGS(fmt, args...) \ - pb_log("DBG:%s:%d: " fmt, __func__, __LINE__, ## args) -#else -#define DBG(fmt, args...) -#define DBGS(fmt, args...) -#endif + pb_debug("DBG:%s:%d: " fmt, __func__, __LINE__, ## args) enum pb_nc_sig { diff --git a/ui/ncurses/ps3-main.c b/ui/ncurses/ps3-main.c index c4a3892..1269549 100644 --- a/ui/ncurses/ps3-main.c +++ b/ui/ncurses/ps3-main.c @@ -275,7 +275,7 @@ static int ps3_boot_cb(struct cui *cui, struct cui_opt_data *cod) int altered_args; char *orig_args; - pb_log("%s: %s\n", __func__, cod->name); + pb_debug("%s: %s\n", __func__, cod->name); assert(ps3->cui->current == &ps3->cui->main->scr); |