X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Fri, 17 Jul 2009 09:15:51 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: MVFS results
Message-ID: <20090717071551.GV27613@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <loom.20090715T213245-387@post.gmane.org> <20090716090703.GH27613@calimero.vinschen.de> <loom.20090716T133741-21@post.gmane.org> <20090716151121.GO27613@calimero.vinschen.de> <loom.20090716T154525-611@post.gmane.org> <20090716165112.GS27613@calimero.vinschen.de> <loom.20090716T165527-559@post.gmane.org> <20090716174525.GT27613@calimero.vinschen.de> <loom.20090716T225222-72@post.gmane.org> <loom.20090717T011618-309@post.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <loom.20090717T011618-309@post.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jul 17 01:17, Eric Blake wrote:
> Eric Blake <ebb9 <at> byu.net> writes:
> 
> > Does the fact that MVFS is including the trailing NUL in fsname.Length, but 
> > ro_u_mvfs is not, relevant to RtlEqualUnicodeString returning false, even 
> > though the two Buffers are identical over their MaximumLength?
> > 
> 
> Sure enough, your patch plus this one-liner is enough to make symlinks work on
> MVFS once again!
> 
> diff --git i/winsup/cygwin/globals.cc w/winsup/cygwin/globals.cc
> index ef17534..1cd6b19 100644
> --- i/winsup/cygwin/globals.cc
> +++ w/winsup/cygwin/globals.cc
> @@ -89,7 +89,7 @@ UNICODE_STRING _RDATA ro_u_uncp = _ROU (L"\\??\\UNC\\");
>  UNICODE_STRING _RDATA ro_u_mtx = _ROU (L"mtx");
>  UNICODE_STRING _RDATA ro_u_csc = _ROU (L"CSC-CACHE");
>  UNICODE_STRING _RDATA ro_u_fat = _ROU (L"FAT");
> -UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS");
> +UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS\0");
>  UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS");
>  UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
>  UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");

Can we be sure that every version of MVFS has this obvious bug in
the name?  I'd rather replace the following line in mount.cc,
fs_info::update() (~line 246):

  && !is_mvfs (RtlEqualUnicodeString (&fsname, &ro_u_mvfs, FALSE))

with

  && !is_mvfs (RtlEqualUnicodePathPrefix (&fsname, &ro_u_mvfs, FALSE))

This checks for a MVFS prefix instead of equality of the entire string.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

