diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 7520d4c2d..d4a935fe8 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,11 @@ +2003-09-11 Igor Pechtchanski + + * 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(). + 2003-09-11 Corinna Vinschen * getfacl (main): Remove extern declaration of optind. 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) {