diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-09-11 16:24:26 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-09-11 16:24:26 +0000 |
commit | 59a7603554ea394683ce65bd044cb901ac4857c7 (patch) | |
tree | c1da51c1b9d3c17cdcbc419fc6e72419c68823e2 /winsup/utils/cygcheck.cc | |
parent | 88092a3ea1325f08c41d71d4f8fab3176a9d5974 (diff) | |
download | cygnal-59a7603554ea394683ce65bd044cb901ac4857c7.tar.gz cygnal-59a7603554ea394683ce65bd044cb901ac4857c7.tar.bz2 cygnal-59a7603554ea394683ce65bd044cb901ac4857c7.zip |
* cygcheck.cc (dump_only): New global variable.
(usage): Add "--dump-only" option, fix "--verbose" line.
(longopts, opts): Add "--dump-only" option.
(main): Process the "--dump-only" flag. Add new semantic check.
Pass dump_only information to dump_setup().
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r-- | winsup/utils/cygcheck.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 693bd237e..91eb6da49 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -26,6 +26,7 @@ int sysinfo = 0; int givehelp = 0; int keycheck = 0; int check_setup = 0; +int dump_only = 0; int find_package = 0; int list_package = 0; @@ -1322,8 +1323,9 @@ Usage: cygcheck [OPTIONS] [PROGRAM...]\n\ Check system information or PROGRAM library dependencies\n\ \n\ -c, --check-setup check packages installed via setup.exe\n\ + -d, --dump-only no integrity checking of package contents (requires -c)\n\ -s, --sysinfo system information (not with -k)\n\ - -v, --verbose verbose output (indented) (for -s or programs)\n\ + -v, --verbose verbose output (indented) (for -[cfls] or programs)\n\ -r, --registry registry search (requires -s)\n\ -k, --keycheck perform a keyboard check session (not with -[scfl])\n\ -f, --find-package find installed packages containing files (not with -[cl])\n\ @@ -1336,6 +1338,7 @@ You must at least give either -s or -k or a program name\n"); struct option longopts[] = { {"check-setup", no_argument, NULL, 'c'}, + {"dump-only", no_argument, NULL, 'd'}, {"sysinfo", no_argument, NULL, 's'}, {"registry", no_argument, NULL, 'r'}, {"verbose", no_argument, NULL, 'v'}, @@ -1347,7 +1350,7 @@ struct option longopts[] = { {0, no_argument, NULL, 0} }; -static char opts[] = "cfhklrsvV"; +static char opts[] = "cdfhklrsvV"; static void print_version () @@ -1386,6 +1389,9 @@ main (int argc, char **argv) case 'c': check_setup = 1; break; + case 'd': + dump_only = 1; + break; case 'r': registry = 1; break; @@ -1425,6 +1431,9 @@ main (int argc, char **argv) if ((find_package || list_package) && check_setup) usage (stderr, 1); + if (dump_only && !check_setup) + usage (stderr, 1); + if (find_package && list_package) usage (stderr, 1); @@ -1446,7 +1455,7 @@ main (int argc, char **argv) if (check_setup) { - dump_setup (verbose, argv, true); + dump_setup (verbose, argv, !dump_only); } else if (find_package) { |