ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit e49d1d286c2e79e439bab51897a9a236548ec0b7
parent 203c02cd2a815ec5eba5b0863ffc1486d87b06de
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon Feb  2 19:56:17 +0100

chvt: usage using argv0

Diffstat:
chvt.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/chvt.c b/chvt.c @@ -25,7 +25,7 @@ static char *vts[] = { static void usage(void) { - eprintf("usage: chvt N\n"); + eprintf("usage: %s N\n", argv0); } int @@ -35,6 +35,9 @@ main(int argc, char *argv[]) int fd; char c; + ARGBEGIN { + } ARGEND; + if (argc != 2 || strspn(argv[1], "1234567890") != strlen(argv[1])) usage();