diff options
author | Karel Zak | 2013-06-25 16:40:01 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:47:04 +0200 |
commit | c10937dcaf58a03844ace4e081becb77fad71dac (patch) | |
tree | 0b20635eb295a2f0bc3afe6d0338b0ccec8f4d12 /libfdisk/src/context.c | |
parent | fdisk: (dos) cleanup public function names (diff) | |
download | kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.tar.gz kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.tar.xz kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.zip |
fdisk: remove nowarn global variable
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/context.c')
-rw-r--r-- | libfdisk/src/context.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 4ee4e0f1b..f44505a5b 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -255,6 +255,29 @@ int fdisk_context_display_details(struct fdisk_context *cxt) return cxt->display_details == 1; } +/** + * fdisk_context_enable_listonly: + * cxt: context + * enable: true/flase + * + * Just list partition only, don't care about another details, mistakes, ... + * + * Returns: 0 on success, < 0 on error. + */ +int fdisk_context_enable_listonly(struct fdisk_context *cxt, int enable) +{ + assert(cxt); + cxt->listonly = enable ? 1 : 0; + return 0; +} + +int fdisk_context_listonly(struct fdisk_context *cxt) +{ + assert(cxt); + return cxt->listonly == 1; +} + + /* * @str: "cylinder" or "sector". * |