From 780ce22cdad01128139c1edfceb8f86338bf3dda Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 May 2017 11:39:34 +0200 Subject: misc: consolidate smartcols error messages ... just to keep translators happy Signed-off-by: Karel Zak --- sys-utils/swapon.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys-utils/swapon.c') 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) -- cgit v1.2.3-55-g7522