diff options
author | Karel Zak | 2013-12-18 10:38:43 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-11 11:35:13 +0100 |
commit | 9f670072f42d7e0e8403385defc69e93b636cb93 (patch) | |
tree | 05a7ba02cbbe607874f09fde3af3f9e53475bc05 /libfdisk/src/ask.c | |
parent | libfdisk: use fdisk_table to generate output (diff) | |
download | kernel-qcow2-util-linux-9f670072f42d7e0e8403385defc69e93b636cb93.tar.gz kernel-qcow2-util-linux-9f670072f42d7e0e8403385defc69e93b636cb93.tar.xz kernel-qcow2-util-linux-9f670072f42d7e0e8403385defc69e93b636cb93.zip |
libfdisk: remove tt stuff from API
The include/tt.h has to be used only internally by the library (for
example to convert fdisk_table to string).
The fdisk_ask API should not be more used for complex tasks like print
partition table. The application has to use fdisk_get_table() and
fdisk_table_to_string() or something else.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/ask.c')
-rw-r--r-- | libfdisk/src/ask.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/libfdisk/src/ask.c b/libfdisk/src/ask.c index 872c8da38..23e6263c6 100644 --- a/libfdisk/src/ask.c +++ b/libfdisk/src/ask.c @@ -490,34 +490,6 @@ int fdisk_ask_yesno_set_result(struct fdisk_ask *ask, uint64_t result) return 0; } -struct tt *fdisk_ask_get_table(struct fdisk_ask *ask) -{ - assert(ask); - assert(fdisk_is_ask(ask, TABLE)); - return ask->data.table; -} - -int fdisk_print_table(struct fdisk_context *cxt, struct tt *tb) -{ - struct fdisk_ask *ask; - int rc; - - assert(cxt); - assert(tb); - - ask = fdisk_new_ask(); - if (!ask) - return -ENOMEM; - - fdisk_ask_set_type(ask, FDISK_ASKTYPE_TABLE); - ask->data.table = tb; - - rc = fdisk_do_ask(cxt, ask); - - fdisk_free_ask(ask); - return rc; -} - #define is_print_ask(a) (fdisk_is_ask(a, WARN) || fdisk_is_ask(a, WARNX) || fdisk_is_ask(a, INFO)) int fdisk_ask_print_get_errno(struct fdisk_ask *ask) |