diff options
author | Karel Zak | 2014-08-22 10:25:35 +0200 |
---|---|---|
committer | Karel Zak | 2014-08-22 10:25:35 +0200 |
commit | 385810d22a31fe968fcf76e1b608ac3031ddd4fa (patch) | |
tree | aa4a36ac4f97eab30144171612c5e724e3812b64 /libfdisk/src/table.c | |
parent | mountpoint: clarify that it works on files (diff) | |
download | kernel-qcow2-util-linux-385810d22a31fe968fcf76e1b608ac3031ddd4fa.tar.gz kernel-qcow2-util-linux-385810d22a31fe968fcf76e1b608ac3031ddd4fa.tar.xz kernel-qcow2-util-linux-385810d22a31fe968fcf76e1b608ac3031ddd4fa.zip |
libfdisk: remove debug dump function, cleanup API
The fdisk_dump_* prefix will be used for sfdisk-like functionality.
The patch also add FDISK_ prefix to fdisk_get_unit() options.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/table.c')
-rw-r--r-- | libfdisk/src/table.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/libfdisk/src/table.c b/libfdisk/src/table.c index eb0983895..28540b9e0 100644 --- a/libfdisk/src/table.c +++ b/libfdisk/src/table.c @@ -291,27 +291,6 @@ int fdisk_get_partitions(struct fdisk_context *cxt, struct fdisk_table **tb) return 0; } -int fdisk_dump_table(struct fdisk_table *tb, FILE *f) -{ - struct fdisk_partition *pa; - struct fdisk_iter itr; - int i = 0; - - assert(tb); - assert(f); - - fdisk_reset_iter(&itr, FDISK_ITER_FORWARD); - - fprintf(f, "--table--%p\n", tb); - while (fdisk_table_next_partition(tb, &itr, &pa) == 0) { - fprintf(f, "%d: ", i++); - fdisk_dump_partition(pa, f); - } - fputs("-----\n", f); - return 0; -} - - typedef int (*fdisk_partcmp_t)(struct fdisk_partition *, struct fdisk_partition *); static int cmp_parts_wrapper(struct list_head *a, struct list_head *b, void *data) @@ -524,7 +503,6 @@ int fdisk_get_freespaces(struct fdisk_context *cxt, struct fdisk_table **tb) } } - DBG(LABEL, fdisk_dump_table(*tb, stderr)); done: fdisk_unref_table(parts); return rc; @@ -552,3 +530,4 @@ int fdisk_table_wrong_order(struct fdisk_table *tb) } return 0; } + |