diff options
author | Karel Zak | 2017-05-18 11:39:34 +0200 |
---|---|---|
committer | Karel Zak | 2017-05-18 11:39:34 +0200 |
commit | 780ce22cdad01128139c1edfceb8f86338bf3dda (patch) | |
tree | bca21a46c58d6bf60ecaf59a4fa669c5a487d688 /sys-utils/swapon.c | |
parent | tests: Fix UDF test output after changing UUID algorithm (diff) | |
download | kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.tar.gz kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.tar.xz kernel-qcow2-util-linux-780ce22cdad01128139c1edfceb8f86338bf3dda.zip |
misc: consolidate smartcols error messages
... just to keep translators happy
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/swapon.c')
-rw-r--r-- | sys-utils/swapon.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index f6005e67d..f4ca781d8 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -173,7 +173,8 @@ static void add_scols_line(const struct swapon_ctl *ctl, struct libscols_table * line = scols_table_new_line(table, NULL); if (!line) - err(EXIT_FAILURE, _("failed to initialize output line")); + err(EXIT_FAILURE, _("failed to allocate output line")); + data = mnt_fs_get_source(fs); if (access(data, R_OK) == 0) pr = get_swap_prober(data); @@ -219,8 +220,8 @@ static void add_scols_line(const struct swapon_ctl *ctl, struct libscols_table * break; } - if (str) - scols_line_refer_data(line, i, str); + if (str && scols_line_refer_data(line, i, str)) + err(EXIT_FAILURE, _("failed to add output data")); } if (pr) blkid_free_probe(pr); @@ -277,7 +278,7 @@ static int show_table(struct swapon_ctl *ctl) table = scols_new_table(); if (!table) - err(EXIT_FAILURE, _("failed to initialize output table")); + err(EXIT_FAILURE, _("failed to allocate output table")); scols_table_enable_raw(table, ctl->raw); scols_table_enable_noheadings(table, ctl->no_heading); @@ -286,7 +287,7 @@ static int show_table(struct swapon_ctl *ctl) struct colinfo *col = get_column_info(ctl, i); if (!scols_table_new_column(table, col->name, col->whint, col->flags)) - err(EXIT_FAILURE, _("failed to initialize output column")); + err(EXIT_FAILURE, _("failed to allocate output column")); } while (mnt_table_next_fs(st, itr, &fs) == 0) |