diff options
author | 2008-03-02 19:05:34 +0000 | |
---|---|---|
committer | 2008-03-02 19:05:34 +0000 | |
commit | aeaaf4a6d4457144b8913fa123ca6dda7b5f2733 (patch) | |
tree | 41ef0bdd08abde4f75eea9828f78bb0e93fcb3bf /usr.bin/cvs/diff.c | |
parent | Use a union to ensure alignment of the cmsg. (diff) | |
download | wireguard-openbsd-aeaaf4a6d4457144b8913fa123ca6dda7b5f2733.tar.xz wireguard-openbsd-aeaaf4a6d4457144b8913fa123ca6dda7b5f2733.zip |
Print the right synopsis for commands on error (especially if commands
share the same function: (r)tag, etc.).
ok joris
Diffstat (limited to 'usr.bin/cvs/diff.c')
-rw-r--r-- | usr.bin/cvs/diff.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 6d6eea4d087..21a84a0187a 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.132 2008/03/01 21:29:36 deraadt Exp $ */ +/* $OpenBSD: diff.c,v 1.133 2008/03/02 19:05:34 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -89,7 +89,9 @@ cvs_diff(int argc, char **argv) if (RCS_KWEXP_INVAL(kflag)) { cvs_log(LP_ERR, "invalid RCS keyword expension mode"); - fatal("%s", cvs_cmd_add.cmd_synopsis); + fatal("%s", cvs_cmdop == CVS_OP_DIFF ? + cvs_cmd_diff.cmd_synopsis : + cvs_cmd_rdiff.cmd_synopsis); } break; case 'l': @@ -127,7 +129,9 @@ cvs_diff(int argc, char **argv) fatal("the -V option is obsolete " "and should not be used"); default: - fatal("%s", cvs_cmd_diff.cmd_synopsis); + fatal("%s", cvs_cmdop == CVS_OP_DIFF ? + cvs_cmd_diff.cmd_synopsis : + cvs_cmd_rdiff.cmd_synopsis); } } |