From 3fed6c84e76f2df4060d107280cc29607e617689 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 23 Mar 2018 19:32:49 -0500 Subject: Add the extra info we've got back to the error message. --- toys/other/vmstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/vmstat.c b/toys/other/vmstat.c index 4aa2144b..ef560fa9 100644 --- a/toys/other/vmstat.c +++ b/toys/other/vmstat.c @@ -66,7 +66,7 @@ static void get_vmstat_proc(struct vmstat_proc *vmstat_proc) continue; } else p = strafter(file, vmstuff[i]); if (!p || 1!=sscanf(p, "%"PRIu64"%n", new++, &j)) - error_exit("Bad %sin %s", vmstuff[i], name); + error_exit("Bad %sin %s: %s", vmstuff[i], name, p ? p : ""); p += j; } free(file); -- cgit v1.2.3