Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 1681b9724..17b9d948d 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