OSDN Git Service

* mount.cc (main): Issue correct warning for 'not enough arguments'.
authorcgf <cgf>
Tue, 28 Aug 2001 18:48:38 +0000 (18:48 +0000)
committercgf <cgf>
Tue, 28 Aug 2001 18:48:38 +0000 (18:48 +0000)
winsup/utils/ChangeLog
winsup/utils/mount.cc

index ad3be30..6fac50b 100644 (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>
 
        * cygpath.cc (main): Support -w for Windows (System) directories and
index b825012..de2f509 100644 (file)
@@ -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))