diff options
author | Karel Zak | 2014-04-03 16:09:57 +0200 |
---|---|---|
committer | Karel Zak | 2014-04-03 16:09:57 +0200 |
commit | 0925a9dd6cd65feb8cb2d4d66551363f4af161e9 (patch) | |
tree | 9981e45aee1274f959a9b32f3cbdffabc8a45d8c /disk-utils/partx.c | |
parent | fdisk: print table header as bold (diff) | |
download | kernel-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 'disk-utils/partx.c')
-rw-r--r-- | disk-utils/partx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/disk-utils/partx.c b/disk-utils/partx.c index 036e4cd3d..830af1f32 100644 --- a/disk-utils/partx.c +++ b/disk-utils/partx.c @@ -626,14 +626,14 @@ static int show_parts(blkid_partlist ls, int scols_flags, int lower, int upper) if (!nparts) return 0; - table = scols_new_table(NULL); + table = scols_new_table(); if (!table) { warn(_("failed to initialize output table")); return -1; } - scols_table_set_raw(table, !!(scols_flags & PARTX_RAW)); - scols_table_set_export(table, !!(scols_flags & PARTX_EXPORT)); - scols_table_set_no_headings(table, !!(scols_flags & PARTX_NOHEADINGS)); + scols_table_enable_raw(table, !!(scols_flags & PARTX_RAW)); + scols_table_enable_export(table, !!(scols_flags & PARTX_EXPORT)); + scols_table_enable_noheadings(table, !!(scols_flags & PARTX_NOHEADINGS)); for (i = 0; i < ncolumns; i++) { struct colinfo *col = get_column_info(i); |