diff options
author | ru <ru@FreeBSD.org> | 2004-03-17 11:06:40 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-03-17 11:06:40 +0000 |
commit | 1837ea9bf5bf3a6b9f4de47c768de2dd89be4130 (patch) | |
tree | c86e7e662c888cd06b742a637a24b95d03d90691 /usr.bin/xinstall | |
parent | 50bea8bbbe9f58a500dcfb2e0e9a8e748ef4431b (diff) | |
download | FreeBSD-src-1837ea9bf5bf3a6b9f4de47c768de2dd89be4130.zip FreeBSD-src-1837ea9bf5bf3a6b9f4de47c768de2dd89be4130.tar.gz |
Improved incorrect usage diagnostics.
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 41a3bf1..441c108 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)) |