[PATCH 14/17] setterm: improve error messages

Sami Kerola
2014-05-18T14:06:24Z

Reuse messages to make translation work easier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
term-utils/setterm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/term-utils/setterm.c b/term-utils/setterm.c
index 2a0162e..2b1901f 100644
--- a/term-utils/setterm.c
+++ b/term-utils/setterm.c
@@ -262,7 +262,7 @@ static int parse_ulhb_color(char **argv, int *optind)
else {
color = strtoint_or_err(color_name);
if (color < BLACK || DEFAULT < color)
- errx(EXIT_FAILURE, _("argument error"));
+ errx(EXIT_FAILURE, _("argument error: %s"), color_name);
}
if (bright && (color == BLACK || color == GREY))
errx(EXIT_FAILURE, _("argument error: bright %s is not supported"), color_name);
@@ -720,7 +720,7 @@ static void show_tabs(void)

static void __attribute__((__noreturn__)) read_error(struct setterm_control *ctl)
{
- err(EXIT_DUMPFILE, _("Couldn't read %s"), ctl->in_device);
+ err(EXIT_DUMPFILE, _("cannot read %s"), ctl->in_device);
}

static int open_snapshot_device(struct setterm_control *ctl)
--
1.9.2