diff options
author | Christopher Faylor <me@cgf.cx> | 2004-10-09 23:19:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-10-09 23:19:38 +0000 |
commit | 0795a24552591dec14b4850b0a3bdd653bee30c9 (patch) | |
tree | b9c02518f632eea48fde1874a7a545d4e5d39f4a /winsup | |
parent | 82e127caac18614881e40165593c28123fc03ecb (diff) | |
download | newlib-0795a24552591dec14b4850b0a3bdd653bee30c9.zip newlib-0795a24552591dec14b4850b0a3bdd653bee30c9.tar.gz newlib-0795a24552591dec14b4850b0a3bdd653bee30c9.tar.bz2 |
* cygcheck.cc (dump_sysinfo): Warn about trailing (back)slash on mount entries.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/cygcheck.cc | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 71dc22d..5724ec6 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,10 @@ 2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl> + * cygcheck.cc (dump_sysinfo): Warn about trailing (back)slash on mount + entries. + +2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl> + * cygcheck.cc (dump_sysinfo): Don't warn about empty path components, just display ``.''. diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 1681b97..17b9d94 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -1165,19 +1165,25 @@ dump_sysinfo () printf ("\n"); unsigned ml_fsname = 4, ml_dir = 7, ml_type = 6; + bool ml_trailing = false; struct mntent *mnt; setmntent (0, 0); while ((mnt = getmntent (0))) { unsigned n = (int) strlen (mnt->mnt_fsname); + ml_trailing |= (n > 1 && strchr ("\\/", mnt->mnt_fsname[n - 1])); if (ml_fsname < n) ml_fsname = n; n = (int) strlen (mnt->mnt_dir); + ml_trailing |= (n > 1 && strchr ("\\/", mnt->mnt_dir[n - 1])); if (ml_dir < n) ml_dir = n; } + if (ml_trailing) + puts ("Warning: Mount entries should not have a trailing (back)slash\n"); + if (givehelp) { printf |