diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-10-28 14:41:27 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-10-28 14:41:27 +0300 |
commit | d952e44c44093126b9b6dcfb9c8e0e338728f11b (patch) | |
tree | 35f1f368ac385f042516ab038e4f819ef8f98094 /winsup | |
parent | 757ee9af8b96c2ddbdb448d2c2a9d68e3178a4ff (diff) |
* cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWIN
environment variable.
(dump_sysinfo): Don't tweak CYGWIN environment variable, just call
pretty_id once.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/utils/cygcheck.cc | 20 |
2 files changed, 10 insertions, 17 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 825769f0c..369f75ed3 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,10 @@ +2009-10-28 Corinna Vinschen <corinna@vinschen.de> + + * cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWIN + environment variable. + (dump_sysinfo): Don't tweak CYGWIN environment variable, just call + pretty_id once. + 2009-10-20 Corinna Vinschen <corinna@vinschen.de> * cygcheck.cc (dump_sysinfo): Update with latest NT 6.1 versions. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index e0c8a3ac0..a95ae0819 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -1031,14 +1031,10 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) } void -pretty_id (const char *s, char *cygwin, size_t cyglen) +pretty_id () { char *groups[16384]; - strcpy (cygwin + cyglen++, " "); - strcpy (cygwin + cyglen, s); - putenv (cygwin); - char *id = cygpath ("/bin/id.exe", NULL); for (char *p = id; (p = strchr (p, '/')); p++) *p = '\\'; @@ -1094,7 +1090,7 @@ pretty_id (const char *s, char *cygwin, size_t cyglen) } ng--; - printf ("\nOutput from %s (%s)\n", id, s); + printf ("\nOutput from %s\n", id); int n = 80 / (int) ++sz; int i = n > 2 ? n - 2 : 0; sz = -sz; @@ -1479,17 +1475,7 @@ dump_sysinfo () fflush (stdout); - char *cygwin = getenv ("CYGWIN"); - if (cygwin) - cygwin -= strlen ("CYGWIN="); - else - cygwin = const_cast <char *> ("CYGWIN="); - size_t cyglen = strlen (cygwin); - cygwin = strcpy ((char *) malloc (cyglen + sizeof (" nontsec")), cygwin); - pretty_id ("nontsec", cygwin, cyglen); - pretty_id ("ntsec", cygwin, cyglen); - cygwin[cyglen] = 0; - putenv (cygwin); + pretty_id (); if (!GetSystemDirectory (tmp, 4000)) display_error ("dump_sysinfo: GetSystemDirectory()"); |