diff options
author | Karel Zak | 2013-05-21 15:30:16 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:46:56 +0200 |
commit | 36050e7001d7a44ac64a3e0513665fba649ff054 (patch) | |
tree | 7826f33877cc1ce501805495d0759220265b0278 /fdisks/fdisk-menu.c | |
parent | fdisk: add GPT specific callback to menu (diff) | |
download | kernel-qcow2-util-linux-36050e7001d7a44ac64a3e0513665fba649ff054.tar.gz kernel-qcow2-util-linux-36050e7001d7a44ac64a3e0513665fba649ff054.tar.xz kernel-qcow2-util-linux-36050e7001d7a44ac64a3e0513665fba649ff054.zip |
libfdisk: add FDISK_DEBUG_FRONTEND
Currently we use private libfdisk in fdisk code, because the library
API is not stable yet. Let's add debug flag to make it obvious in the
debug output what is from libfdisk and what is from fdisk frontend.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk-menu.c')
-rw-r--r-- | fdisks/fdisk-menu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fdisks/fdisk-menu.c b/fdisks/fdisk-menu.c index b8cea8237..0ea3dc1d3 100644 --- a/fdisks/fdisk-menu.c +++ b/fdisks/fdisk-menu.c @@ -266,15 +266,15 @@ static int menu_detect_collisions(struct fdisk_context *cxt) r = get_fdisk_menu_entry(cxt, e->key, NULL); if (!r) { - DBG(CONTEXT, dbgprint("warning: not found " + DBG(FRONTEND, dbgprint("warning: not found " "entry for %c", e->key)); return -1; } if (r != e) { - DBG(CONTEXT, dbgprint("warning: duplicate key '%c'", + DBG(FRONTEND, dbgprint("warning: duplicate key '%c'", e->key)); - DBG(CONTEXT, dbgprint(" %s", e->title)); - DBG(CONTEXT, dbgprint(" %s", r->title)); + DBG(FRONTEND, dbgprint(" %s", e->title)); + DBG(FRONTEND, dbgprint(" %s", r->title)); abort(); } } @@ -287,7 +287,7 @@ int print_fdisk_menu(struct fdisk_context *cxt) struct menu_context mc = MENU_CXT_EMPTY; const struct menu_entry *e; - ON_DBG(CONTEXT, menu_detect_collisions(cxt)); + ON_DBG(FRONTEND, menu_detect_collisions(cxt)); if (fdisk_context_display_details(cxt)) printf(_("\nHelp (expert commands):\n")); @@ -340,7 +340,7 @@ int process_fdisk_menu(struct fdisk_context *cxt) return -EINVAL; } - DBG(CONTEXT, dbgprint("selected: key=%c, entry='%s'", + DBG(FRONTEND, dbgprint("selected: key=%c, entry='%s'", key, ent->title)); /* hardcoded help */ if (key == 'm') { @@ -370,7 +370,7 @@ static int gpt_menu_cb(struct fdisk_context *cxt, assert(ent); assert(fdisk_is_disklabel(cxt, GPT)); - DBG(CONTEXT, dbgprint("enter GPT menu")); + DBG(FRONTEND, dbgprint("enter GPT menu")); rc = fdisk_ask_partnum(cxt, &n, FALSE); if (rc) |