summaryrefslogtreecommitdiffstats
path: root/sys-utils/prlimit.c
diff options
context:
space:
mode:
authorKarel Zak2017-05-18 11:39:34 +0200
committerKarel Zak2017-05-18 11:39:34 +0200
commit780ce22cdad01128139c1edfceb8f86338bf3dda (patch)
treebca21a46c58d6bf60ecaf59a4fa669c5a487d688 /sys-utils/prlimit.c
parenttests: Fix UDF test output after changing UUID algorithm (diff)
downloadkernel-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/prlimit.c')
-rw-r--r--sys-utils/prlimit.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index c96d38589..a62d457fe 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -226,7 +226,7 @@ static void add_scols_line(struct libscols_table *table, struct prlimit *l)
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"));
for (i = 0; i < ncolumns; i++) {
char *str = NULL;
@@ -257,8 +257,8 @@ static void add_scols_line(struct libscols_table *table, struct prlimit *l)
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"));
}
}
@@ -294,7 +294,7 @@ static int show_limits(struct list_head *lims)
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, raw);
scols_table_enable_noheadings(table, no_headings);
@@ -303,10 +303,9 @@ static int show_limits(struct list_head *lims)
struct colinfo *col = get_column_info(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"));
}
-
list_for_each_safe(p, pnext, lims) {
struct prlimit *lim = list_entry(p, struct prlimit, lims);