From 83c8d706cdad5e3dae82b5e3265f769995d113b5 Mon Sep 17 00:00:00 2001 From: corinna Date: Sat, 24 May 2008 10:07:49 +0000 Subject: [PATCH] * mount.cc (mount_info::init): Recreate path when trying to read the user fstab file. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/mount.cc | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7e97504fa9..c911eb6345 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2008-05-24 Corinna Vinschen + * mount.cc (mount_info::init): Recreate path when trying to read the + user fstab file. + +2008-05-24 Corinna Vinschen + * path.cc (symlink_info::check): Reorder test for nfs symlinks. 2008-05-23 Corinna Vinschen diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index eb10425d0f..77de8f2c3b 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -125,7 +125,9 @@ mount_info::init () { create_root_entry (path); pathend = wcpcpy (pathend, L"\\etc\\fstab"); - if (from_fstab (false, path, pathend) | from_fstab (true, path, pathend)) /* The single | is correct! */ + if (from_fstab (false, path, pathend) /* The single | is correct! */ + | from_fstab (true, path, wcpcpy (find_root_from_cygwin_dll (path), + L"\\etc\\fstab"))) return; } @@ -923,7 +925,7 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end) sys_mbstowcs (wcpcpy (fstab_end, L".d\\"), NT_MAX_PATH - (fstab_end - fstab), cygheap->user.name ()); - debug_printf ("Try to read mounts from %W", fstab); + system_printf ("Try to read mounts from %W", fstab); HANDLE h = CreateFileW (fstab, GENERIC_READ, FILE_SHARE_READ, &sec_none_nih, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) -- 2.11.0