From 34971f0f8cff99825a130a47a329d96d67095edd Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 28 Aug 2001 18:48:38 +0000 Subject: [PATCH] * mount.cc (main): Issue correct warning for 'not enough arguments'. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/mount.cc | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index ad3be304a..6fac50bd8 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 28 14:45:02 2001 Christopher Faylor + + * mount.cc (main): Issue correct warning for 'not enough arguments'. + 2001-08-14 Joerg Schaible * cygpath.cc (main): Support -w for Windows (System) directories and diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc index b82501233..de2f5094a 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))