diff options
author | Karel Zak | 2014-08-15 12:34:42 +0200 |
---|---|---|
committer | Karel Zak | 2014-08-15 12:34:42 +0200 |
commit | 2ae3d038b9fa4ec79cf6319a83093b817796f524 (patch) | |
tree | 60dfe3e5156b6806e60634419a86c891a3a46136 /libfdisk/src/ask.c | |
parent | fdisk: use libfdisk public API only (diff) | |
download | kernel-qcow2-util-linux-2ae3d038b9fa4ec79cf6319a83093b817796f524.tar.gz kernel-qcow2-util-linux-2ae3d038b9fa4ec79cf6319a83093b817796f524.tar.xz kernel-qcow2-util-linux-2ae3d038b9fa4ec79cf6319a83093b817796f524.zip |
libfdisk: move fdisk_ask_partnum() to API
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/ask.c')
-rw-r--r-- | libfdisk/src/ask.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libfdisk/src/ask.c b/libfdisk/src/ask.c index da5746c68..eb386ace9 100644 --- a/libfdisk/src/ask.c +++ b/libfdisk/src/ask.c @@ -280,7 +280,16 @@ static char *mk_string_list(char *ptr, size_t *len, size_t *begin, return ptr; } -/* returns: 1=0 on success, < 0 on error, 1 if no free/used partition */ +/** + * fdisk_ask_partnum: + * @cxt: context + * @partnum: returns partition number + * @wantnew: 0|1 + * + * This function uses libfdisk Ask API to get a partition number. + * + * Returns: 0 on success, < 0 on error, 1 if no free/used partition + */ int fdisk_ask_partnum(struct fdisk_context *cxt, size_t *partnum, int wantnew) { int rc = 0, inchar = 0; |