diff options
author | Karel Zak | 2014-03-21 12:35:21 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-21 12:35:21 +0100 |
commit | 881410671f24fc7910cfcec66f37abb94008bbfd (patch) | |
tree | e72c403befcca2cd89f86456eebc1dbe9b6273a6 /libfdisk/src/table.c | |
parent | libblkid: use new debug functions (diff) | |
download | kernel-qcow2-util-linux-881410671f24fc7910cfcec66f37abb94008bbfd.tar.gz kernel-qcow2-util-linux-881410671f24fc7910cfcec66f37abb94008bbfd.tar.xz kernel-qcow2-util-linux-881410671f24fc7910cfcec66f37abb94008bbfd.zip |
libfdisk: use new debug functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/table.c')
-rw-r--r-- | libfdisk/src/table.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libfdisk/src/table.c b/libfdisk/src/table.c index dfa5dc80e..5867e1e7a 100644 --- a/libfdisk/src/table.c +++ b/libfdisk/src/table.c @@ -18,7 +18,7 @@ struct fdisk_table *fdisk_new_table(void) if (!tb) return NULL; - DBG(TAB, dbgprint("alloc")); + DBG(TAB, ul_debug("alloc")); tb->refcount = 1; INIT_LIST_HEAD(&tb->parts); return tb; @@ -38,7 +38,7 @@ int fdisk_reset_table(struct fdisk_table *tb) if (!tb) return -EINVAL; - DBG(TAB, dbgprint("reset")); + DBG(TAB, ul_debug("reset")); while (!list_empty(&tb->parts)) { struct fdisk_partition *pa = list_entry(tb->parts.next, @@ -78,7 +78,7 @@ void fdisk_unref_table(struct fdisk_table *tb) if (tb->refcount <= 0) { fdisk_reset_table(tb); - DBG(TAB, dbgprint("free")); + DBG(TAB, ul_debug("free")); free(tb); } } @@ -192,7 +192,7 @@ int fdisk_table_add_partition(struct fdisk_table *tb, struct fdisk_partition *pa list_add_tail(&pa->parts, &tb->parts); tb->nents++; - DBG(TAB, dbgprint("add entry %p [start=%ju, end=%ju, size=%ju, %s %s %s]", + DBG(TAB, ul_debug("add entry %p [start=%ju, end=%ju, size=%ju, %s %s %s]", pa, pa->start, pa->end, pa->size, fdisk_partition_is_freespace(pa) ? "freespace" : "", fdisk_partition_is_nested(pa) ? "nested" : "", @@ -216,7 +216,7 @@ static int table_insert_partition( list_add(&pa->parts, &tb->parts); tb->nents++; - DBG(TAB, dbgprint("insert entry %p pre=%p [start=%ju, end=%ju, size=%ju, %s %s %s]", + DBG(TAB, ul_debug("insert entry %p pre=%p [start=%ju, end=%ju, size=%ju, %s %s %s]", pa, poz ? poz : NULL, pa->start, pa->end, pa->size, fdisk_partition_is_freespace(pa) ? "freespace" : "", fdisk_partition_is_nested(pa) ? "nested" : "", @@ -244,7 +244,7 @@ int fdisk_table_remove_partition(struct fdisk_table *tb, struct fdisk_partition if (!tb || !pa) return -EINVAL; - DBG(TAB, dbgprint("remove entry %p", pa)); + DBG(TAB, ul_debug("remove entry %p", pa)); list_del(&pa->parts); INIT_LIST_HEAD(&pa->parts); @@ -273,7 +273,7 @@ int fdisk_get_partitions(struct fdisk_context *cxt, struct fdisk_table **tb) if (!cxt->label->op->get_part) return -ENOSYS; - DBG(LABEL, dbgprint("get table")); + DBG(LABEL, ul_debug("get table")); if (!*tb && !(*tb = fdisk_new_table())) return -ENOMEM; @@ -391,7 +391,7 @@ static int table_add_freespace( } } if (!real_parent) { - DBG(LABEL, dbgprint("not found freespace parent (partno=%ju)", + DBG(LABEL, ul_debug("not found freespace parent (partno=%ju)", parent->partno)); fdisk_reset_iter(&itr, FDISK_ITER_FORWARD); } @@ -469,7 +469,7 @@ int fdisk_get_freespaces(struct fdisk_context *cxt, struct fdisk_table **tb) struct fdisk_partition *pa; struct fdisk_iter itr; - DBG(LABEL, dbgprint("get freespace")); + DBG(LABEL, ul_debug("get freespace")); if (!cxt || !cxt->label || !tb) return -EINVAL; @@ -488,7 +488,7 @@ int fdisk_get_freespaces(struct fdisk_context *cxt, struct fdisk_table **tb) while (rc == 0 && fdisk_table_next_partition(parts, &itr, &pa) == 0) { if (!pa->used || pa->wholedisk || fdisk_partition_is_nested(pa)) continue; - DBG(LABEL, dbgprint("freespace analyze: partno=%zu, start=%ju, end=%ju", + DBG(LABEL, ul_debug("freespace analyze: partno=%zu, start=%ju, end=%ju", pa->partno, pa->start, pa->end)); if (last + grain < pa->start) { rc = table_add_freespace(cxt, *tb, @@ -548,7 +548,7 @@ int fdisk_table_to_string(struct fdisk_table *tb, if (!cxt || !tb || !data) return -EINVAL; - DBG(TAB, dbgprint("generate string")); + DBG(TAB, ul_debug("generate string")); *data = NULL; if (!fdisk_table_get_nents(tb)) @@ -583,7 +583,7 @@ int fdisk_table_to_string(struct fdisk_table *tb, goto done; } - DBG(TAB, dbgprint(" string from part #%zu", pa->partno + 1)); + DBG(TAB, ul_debug(" string from part #%zu", pa->partno + 1)); /* set data for the columns */ for (j = 0; j < ncols; j++) { @@ -602,7 +602,7 @@ int fdisk_table_to_string(struct fdisk_table *tb, if (!tt_is_empty(tt)) rc = tt_print_table_to_string(tt, data); else - DBG(TAB, dbgprint("tt empty")); + DBG(TAB, ul_debug("tt empty")); done: if (org_cols != cols) free(cols); |