* cygcheck.cc (main): Display package info when '-s' is specified.
* dump_setup.cc (dump_setup): Change header. Remove typo. Always sort packages output.
This commit is contained in:
parent
d0d517913c
commit
da9e28d0fa
|
@ -1,3 +1,9 @@
|
||||||
|
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* cygcheck.cc (main): Display package info when '-s' is specified.
|
||||||
|
* dump_setup.cc (dump_setup): Change header. Remove typo. Always sort
|
||||||
|
packages output.
|
||||||
|
|
||||||
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* dump_setup.cc: New file.
|
* dump_setup.cc: New file.
|
||||||
|
|
|
@ -1281,7 +1281,14 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sysinfo)
|
if (sysinfo)
|
||||||
dump_sysinfo ();
|
{
|
||||||
|
dump_sysinfo ();
|
||||||
|
if (!check_setup)
|
||||||
|
{
|
||||||
|
dump_setup (verbose, NULL);
|
||||||
|
puts ("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!givehelp)
|
if (!givehelp)
|
||||||
printf ("Use -h to see help about each section\n");
|
printf ("Use -h to see help about each section\n");
|
||||||
|
|
|
@ -166,7 +166,7 @@ compar (const void *a, const void *b)
|
||||||
bool
|
bool
|
||||||
match_argv (char **argv, const char *name)
|
match_argv (char **argv, const char *name)
|
||||||
{
|
{
|
||||||
if (!*argv)
|
if (!argv || !*argv)
|
||||||
return true;
|
return true;
|
||||||
for (char **a = argv; *a; a++)
|
for (char **a = argv; *a; a++)
|
||||||
if (strcasecmp (*a, name) == 0)
|
if (strcasecmp (*a, name) == 0)
|
||||||
|
@ -179,7 +179,7 @@ dump_setup (int verbose, char **argv)
|
||||||
{
|
{
|
||||||
char *setup = cygpath ("/etc/setup/installed.db", NULL);
|
char *setup = cygpath ("/etc/setup/installed.db", NULL);
|
||||||
FILE *fp = fopen (setup, "rt");
|
FILE *fp = fopen (setup, "rt");
|
||||||
puts ("Cygwin Setup information");
|
puts ("Cygwin Package Information");
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
@ -188,7 +188,6 @@ dump_setup (int verbose, char **argv)
|
||||||
if (dump_file ("Last downloaded files from: ", "last-mirror") || need_nl)
|
if (dump_file ("Last downloaded files from: ", "last-mirror") || need_nl)
|
||||||
puts ("");
|
puts ("");
|
||||||
}
|
}
|
||||||
if (!*argv)
|
|
||||||
|
|
||||||
if (!fp)
|
if (!fp)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -233,8 +232,7 @@ dump_setup (int verbose, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!argv)
|
qsort (packages, n, sizeof (packages[0]), compar);
|
||||||
qsort (packages, n, sizeof (packages[0]), compar);
|
|
||||||
|
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
printf ("%-*s%-*s\n", package_len, packages[i].name,
|
printf ("%-*s%-*s\n", package_len, packages[i].name,
|
||||||
|
|
Loading…
Reference in New Issue