summaryrefslogtreecommitdiffstats
path: root/term-utils/scriptreplay.c
diff options
context:
space:
mode:
authorSami Kerola2016-05-02 00:56:04 +0200
committerKarel Zak2016-05-05 11:46:54 +0200
commitba660b99110d5d7fc018a1bdbea314be0bba98a4 (patch)
tree616cfd7fa42fade5b9d883a5bfd1649dee0ebc41 /term-utils/scriptreplay.c
parentsfdisk: exit with error if rereading partition table fails (diff)
downloadkernel-qcow2-util-linux-ba660b99110d5d7fc018a1bdbea314be0bba98a4.tar.gz
kernel-qcow2-util-linux-ba660b99110d5d7fc018a1bdbea314be0bba98a4.tar.xz
kernel-qcow2-util-linux-ba660b99110d5d7fc018a1bdbea314be0bba98a4.zip
scriptreplay: improve error message
Use human numbering for lines - that is start counting from 1. And tell in error message what the number means. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/scriptreplay.c')
-rw-r--r--term-utils/scriptreplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c
index b4549ef16..51985cda8 100644
--- a/term-utils/scriptreplay.c
+++ b/term-utils/scriptreplay.c
@@ -211,7 +211,7 @@ main(int argc, char *argv[])
/* ignore the first typescript line */
while((c = fgetc(sfile)) != EOF && c != '\n');
- for(line = 0; ; line++) {
+ for(line = 1; ; line++) {
double delay;
size_t blk;
char nl;
@@ -223,7 +223,7 @@ main(int argc, char *argv[])
err(EXIT_FAILURE,
_("failed to read timing file %s"), tname);
errx(EXIT_FAILURE,
- _("timings file %s: %lu: unexpected format"),
+ _("timing file %s: line %lu: unexpected format"),
tname, line);
}
delay /= divi;