[PATCH 1/2] scriptreplay: improve error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 term-utils/scriptreplay.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c
index b4549ef..51985cd 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;
-- 
2.8.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux