From 0222d5bc2d4f8ee4b5f985c990d7ecad73904f6d Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 17 Mar 2004 11:06:40 +0000 Subject: [PATCH] Improved incorrect usage diagnostics. --- usr.bin/xinstall/xinstall.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 41a3bf173516..441c108413c6 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -169,8 +169,10 @@ main(int argc, char *argv[]) argv += optind; /* some options make no sense when creating directories */ - if (dostrip && dodir) + if (dostrip && dodir) { + warnx("-d and -s may not be specified together"); usage(); + } /* must have at least two arguments, except when creating directories */ if (argc == 0 || (argc == 1 && !dodir)) @@ -213,8 +215,10 @@ main(int argc, char *argv[]) } /* can't do file1 file2 directory/file */ - if (argc != 2) + if (argc != 2) { + warnx("wrong number or types of arguments"); usage(); + } if (!no_target) { if (stat(*argv, &from_sb))