diff options
author | Christopher Faylor <me@cgf.cx> | 2001-08-28 18:48:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-08-28 18:48:38 +0000 |
commit | 34971f0f8cff99825a130a47a329d96d67095edd (patch) | |
tree | 2069875029d1206c23f455358610dc9b5c845ee0 /winsup/utils | |
parent | 830dc41f50d792cc83ad6b81210220f6ccc9ae54 (diff) | |
download | newlib-34971f0f8cff99825a130a47a329d96d67095edd.zip newlib-34971f0f8cff99825a130a47a329d96d67095edd.tar.gz newlib-34971f0f8cff99825a130a47a329d96d67095edd.tar.bz2 |
* mount.cc (main): Issue correct warning for 'not enough arguments'.
Diffstat (limited to 'winsup/utils')
-rw-r--r-- | winsup/utils/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/utils/mount.cc | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index ad3be30..6fac50b 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 28 14:45:02 2001 Christopher Faylor <cgf@cygnus.com> + + * mount.cc (main): Issue correct warning for 'not enough arguments'. + 2001-08-14 Joerg Schaible <joerg.schaible@gmx.de> * cygpath.cc (main): Support -w for Windows (System) directories and diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc index b825012..de2f509 100644 --- a/winsup/utils/mount.cc +++ b/winsup/utils/mount.cc @@ -214,7 +214,10 @@ main (int argc, char **argv) default: if (optind != (argc - 1)) { - fprintf (stderr, "%s: too many arguments\n", progname); + if (optind >= argc) + fprintf (stderr, "%s: not enough arguments\n", progname); + else + fprintf (stderr, "%s: too many arguments\n", progname, optind, argc); usage (); } if (force || !mount_already_exists (argv[optind + 1], flags)) |