summaryrefslogtreecommitdiffstats
path: root/misc-utils/findmnt.c
diff options
context:
space:
mode:
authorKarel Zak2014-04-03 16:09:57 +0200
committerKarel Zak2014-04-03 16:09:57 +0200
commit0925a9dd6cd65feb8cb2d4d66551363f4af161e9 (patch)
tree9981e45aee1274f959a9b32f3cbdffabc8a45d8c /misc-utils/findmnt.c
parentfdisk: print table header as bold (diff)
downloadkernel-qcow2-util-linux-0925a9dd6cd65feb8cb2d4d66551363f4af161e9.tar.gz
kernel-qcow2-util-linux-0925a9dd6cd65feb8cb2d4d66551363f4af161e9.tar.xz
kernel-qcow2-util-linux-0925a9dd6cd65feb8cb2d4d66551363f4af161e9.zip
libsmartcols: clean up flags usage
* rename flags functions to scols_table_enable_* * rename *_no_foo() functions to _nofoo() * output formats are mutually exclusive, so don't use flags there * don't assume symbols in scols_new_table(), use scols_table_set_symbols() Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/findmnt.c')
-rw-r--r--misc-utils/findmnt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 238907bdb..3386061cb 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -1464,15 +1464,15 @@ int main(int argc, char *argv[])
/*
* initialize output formatting (libsmartcols.h)
*/
- table = scols_new_table(NULL);
+ table = scols_new_table();
if (!table) {
warn(_("failed to initialize output table"));
goto leave;
}
- scols_table_set_raw(table, !!(flags & FL_RAW));
- scols_table_set_export(table, !!(flags & FL_EXPORT));
- scols_table_set_ascii(table, !!(flags & FL_ASCII));
- scols_table_set_no_headings(table, !!(flags & FL_NOHEADINGS));
+ scols_table_enable_raw(table, !!(flags & FL_RAW));
+ scols_table_enable_export(table, !!(flags & FL_EXPORT));
+ scols_table_enable_ascii(table, !!(flags & FL_ASCII));
+ scols_table_enable_noheadings(table, !!(flags & FL_NOHEADINGS));
for (i = 0; i < ncolumns; i++) {
int fl = get_column_flags(i);