* mount.cc (main): Issue correct warning for 'not enough arguments'.

This commit is contained in:
Christopher Faylor 2001-08-28 18:48:38 +00:00
parent 830dc41f50
commit 34971f0f8c
2 changed files with 8 additions and 1 deletions

View File

@ -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> 2001-08-14 Joerg Schaible <joerg.schaible@gmx.de>
* cygpath.cc (main): Support -w for Windows (System) directories and * cygpath.cc (main): Support -w for Windows (System) directories and

View File

@ -214,7 +214,10 @@ main (int argc, char **argv)
default: default:
if (optind != (argc - 1)) 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 (); usage ();
} }
if (force || !mount_already_exists (argv[optind + 1], flags)) if (force || !mount_already_exists (argv[optind + 1], flags))