diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index de0be5ce3..46c6c8a47 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2004-09-22 Bas van Gompel + Corinna Vinschen + + * dump_setup.cc (dump_setup): Avoid trailing spaces on package-list. + 2004-09-15 Bas van Gompel * getfacl.c (main): Correct layout when nopt is set. diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc index 11d32c4af..734650e1f 100644 --- a/winsup/utils/dump_setup.cc +++ b/winsup/utils/dump_setup.cc @@ -392,12 +392,19 @@ dump_setup (int verbose, char **argv, bool check_files) puts (""); } - printf ("%-*s %-*s %s\n", package_len, "Package", version_len, "Version", check_files?"Status":""); + printf ("%-*s %-*s%s\n", package_len, "Package", + check_files ? version_len : 7, "Version", + check_files ? " Status" : ""); for (int i = 0; packages[i].name; i++) { - printf ("%-*s %-*s %s\n", package_len, packages[i].name, version_len, - packages[i].ver, check_files ? - (check_package_files (verbose, packages[i].name) ? "OK" : "Incomplete") : ""); + if (check_files) + printf ("%-*s %-*s%s\n", package_len, packages[i].name, + version_len, packages[i].ver, + check_package_files (verbose, packages[i].name) + ? " OK" : " Incomplete"); + else + printf ("%-*s %-*s\n", package_len, packages[i].name, + strlen(packages[i].ver), packages[i].ver); fflush(stdout); }