diff options
author | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2023-11-11 20:34:34 +0100 |
---|---|---|
committer | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2023-11-11 20:35:23 +0100 |
commit | 1f9d41f0066b21aab14518dc4cbc7d8980efd9c4 (patch) | |
tree | 313ef0482708ce531189228327fa2587a07bf238 /rpt.c | |
parent | a8abc24ce9dfa0bf85eeb405f98e29a3c76e647b (diff) |
better error messages
Diffstat (limited to 'rpt.c')
-rw-r--r-- | rpt.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -146,7 +146,6 @@ copy_stdin() } clone_fd = fileno(stdin_clone); - errno = 0; while ((nbytes = read(STDIN_FILENO, buf, BUFSIZE)) > 0) { @@ -198,7 +197,7 @@ main(int argc, char* argv[]) print_version(); return 0; case ':': - fprintf(stderr, "COUNT value missing.\n"); + fprintf(stderr, "rpt: COUNT value missing\n"); print_usage(stderr); return 1; /* invalid option */ default: @@ -214,7 +213,7 @@ main(int argc, char* argv[]) if (err && (*err != '\0')) { - fprintf(stderr, "Failed to read COUNT : '%s'.\n", + fprintf(stderr, "rpt: failed to convert COUNT : '%s'\n", strcount); return 2; } @@ -222,7 +221,7 @@ main(int argc, char* argv[]) if (optind >= argc) { - fprintf(stderr, "rpt: no command provided.\n"); + fprintf(stderr, "rpt: no command provided\n"); return 3; } |