diff options
author | Karel Zak | 2013-05-02 11:23:25 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:46:53 +0200 |
commit | a5c1b0fa2079b3584c8b71548f95391879b685b0 (patch) | |
tree | 09132e0d50ee79c3e103992841df5e5c0d6a1c44 /libfdisk/src/context.c | |
parent | libfdisk: add list() label operation (diff) | |
download | kernel-qcow2-util-linux-a5c1b0fa2079b3584c8b71548f95391879b685b0.tar.gz kernel-qcow2-util-linux-a5c1b0fa2079b3584c8b71548f95391879b685b0.tar.xz kernel-qcow2-util-linux-a5c1b0fa2079b3584c8b71548f95391879b685b0.zip |
libfdisk: add fdisk_context_enable_details()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/context.c')
-rw-r--r-- | libfdisk/src/context.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c index 7569e5b52..e77274bae 100644 --- a/libfdisk/src/context.c +++ b/libfdisk/src/context.c @@ -237,6 +237,27 @@ int fdisk_context_set_ask(struct fdisk_context *cxt, return 0; } +/** + * fdisk_context_enable_details: + * cxt: context + * enable: true/flase + * + * Enables or disables "details" display mode. + * + * Returns: 0 on success, < 0 on error. + */ +int fdisk_context_enable_details(struct fdisk_context *cxt, int enable) +{ + assert(cxt); + cxt->display_details = enable ? 1 : 0; + return 0; +} + +int fdisk_context_display_details(struct fdisk_context *cxt) +{ + assert(cxt); + return cxt->display_details == 1; +} /* * @str: "cylinder" or "sector". |