diff options
author | Karel Zak | 2015-12-10 13:02:03 +0100 |
---|---|---|
committer | Karel Zak | 2015-12-10 13:02:03 +0100 |
commit | 6d6b6d185e7427e2b5590349edd76d019b0fe920 (patch) | |
tree | c939298915cfafd1da489166f3990213ddaccf40 /libsmartcols/src/column.c | |
parent | libmount: add comment, remove TODO item (diff) | |
download | kernel-qcow2-util-linux-6d6b6d185e7427e2b5590349edd76d019b0fe920.tar.gz kernel-qcow2-util-linux-6d6b6d185e7427e2b5590349edd76d019b0fe920.tar.xz kernel-qcow2-util-linux-6d6b6d185e7427e2b5590349edd76d019b0fe920.zip |
libsmartcols: add SCOLS_FL_HIDDEN
Export "don't print this column" functionality by public API.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/column.c')
-rw-r--r-- | libsmartcols/src/column.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c index c7af6347c..269ceea0c 100644 --- a/libsmartcols/src/column.c +++ b/libsmartcols/src/column.c @@ -259,6 +259,21 @@ int scols_column_set_cmpfunc(struct libscols_column *cl, } /** + * scols_column_is_hidden: + * @cl: a pointer to a struct libscols_column instance + * + * Gets the value of @cl's flag hidden. + * + * Returns: hidden flag value, negative value in case of an error. + */ +int scols_column_is_hidden(struct libscols_column *cl) +{ + if (!cl) + return -EINVAL; + return cl->flags & SCOLS_FL_HIDDEN; +} + +/** * scols_column_is_trunc: * @cl: a pointer to a struct libscols_column instance * |