diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-08-16 09:09:09 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-08-16 09:09:09 +0000 |
commit | b723879025a4a8b28d5dfc0305290cf70df4d216 (patch) | |
tree | 804d1194291cf21cb2ed091d14b69fa695994e89 | |
parent | 66745a1ea51db8edf13da48d596cd1176013e7e4 (diff) | |
download | newlib-b723879025a4a8b28d5dfc0305290cf70df4d216.zip newlib-b723879025a4a8b28d5dfc0305290cf70df4d216.tar.gz newlib-b723879025a4a8b28d5dfc0305290cf70df4d216.tar.bz2 |
* dump_setup.cc (package_find): Don't stop searching on missing
file list.
(package_list): Ditto.
* dump_setup.cc: (package_list): Make output terse unless
verbose requested. Fix formatting.
(package_find): Ditto.
-rw-r--r-- | winsup/utils/ChangeLog | 12 | ||||
-rw-r--r-- | winsup/utils/dump_setup.cc | 30 |
2 files changed, 27 insertions, 15 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 88b848c..f15024d 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,15 @@ +2003-08-16 David Rothenberger <daveroth@acm.org> + + * dump_setup.cc (package_find): Don't stop searching on missing + file list. + (package_list): Ditto. + +2003-08-16 Igor Pechtchanski <pechtcha@cs.nyu.edu> + + * dump_setup.cc: (package_list): Make output terse unless + verbose requested. Fix formatting. + (package_find): Ditto. + 2003-08-15 Corinna Vinschen <corinna@vinschen.de> * cygcheck.cc (main): Fix some formatting and help text printing. diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc index 6fa7809..a403188 100644 --- a/winsup/utils/dump_setup.cc +++ b/winsup/utils/dump_setup.cc @@ -411,21 +411,22 @@ package_list (int verbose, char **argv) { FILE *fp = open_package_list (packages[i].name); if (!fp) - { - if (verbose) - printf ("Can't open file list /etc/setup/%s.lst.gz for package %s\n", - packages[i].name, packages[i].name); - return; - } + { + if (verbose) + printf ("Can't open file list /etc/setup/%s.lst.gz for package %s\n", + packages[i].name, packages[i].name); + continue; + } - printf ("Package: %s-%s\n", packages[i].name, packages[i].ver); + if (verbose) + printf ("Package: %s-%s\n", packages[i].name, packages[i].ver); char buf[MAX_PATH + 1]; while (fgets (buf, MAX_PATH, fp)) { char *lastchar = strchr(buf, '\n'); if (lastchar[-1] != '/') - printf (" /%s", buf); + printf ("%s/%s", (verbose?" ":""), buf); } fclose (fp); @@ -450,12 +451,7 @@ package_find (int verbose, char **argv) { FILE *fp = open_package_list (packages[i].name); if (!fp) - { - if (verbose) - printf ("Can't open file list /etc/setup/%s.lst.gz for package %s\n", - packages[i].name, packages[i].name); - return; - } + continue; char buf[MAX_PATH + 2]; buf[0] = '/'; @@ -479,7 +475,11 @@ package_find (int verbose, char **argv) if (!a && is_alias) a = match_argv (argv, filename + 4); if (a > 0) - printf ("%s-%s\n", packages[i].name, packages[i].ver); + { + if (verbose) + printf ("%s: found in package ", filename); + printf ("%s-%s\n", packages[i].name, packages[i].ver); + } } } |