From a4af25bc0da1777f91ea0ae2674a4e64c7d1c83e Mon Sep 17 00:00:00 2001 From: Tom Schwindl Date: Fri, 26 Aug 2022 19:18:34 +0200 Subject: [PATCH] src/cmd: print all usage messages to stderr All utilities print their usage message to stderr, cmp(1) and getflags(8) should do the same. --- src/cmd/cmp.c | 2 +- src/cmd/getflags.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/cmp.c b/src/cmd/cmp.c index f06f12a5..368f37c5 100644 --- a/src/cmd/cmp.c +++ b/src/cmd/cmp.c @@ -107,6 +107,6 @@ main(int argc, char *argv[]) static void usage(void) { - print("Usage: cmp [-lsL] file1 file2 [offset1 [offset2] ]\n"); + fprint(2, "Usage: cmp [-lsL] file1 file2 [offset1 [offset2] ]\n"); exits("usage"); } diff --git a/src/cmd/getflags.c b/src/cmd/getflags.c index e97398a2..1a133879 100644 --- a/src/cmd/getflags.c +++ b/src/cmd/getflags.c @@ -4,7 +4,7 @@ void usage(void) { - print("status=usage\n"); + fprint(2, "status=usage\n"); exits(0); }