This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to allow touch to work on HPFS (and others, maybe??)

On Feb 10 23:43, Eric Blake wrote:
> Corinna Vinschen <vinschen <at>> writes:
> > Anyway, can you please test on both drives how they behave if utime
> Well, that was my first time ever building cygwin1.dll, but it went smoothly.  
> As requested, I tested utimes() when opening with just FILE_WRITE_ATTRIBUTES 
> and with full-blown GENERIC_WRITE, on both the ClearCase and the NFS mounted 
> drives.  In all four cases, touch(1), which boils down to utimes(2), was able 
> to modify all three file times for a file, but returned success without budging 
> any of the times on a directory.

That could be a result of the Cygwin internals.  I assume that the
CreateFile call requesting any write access fails on both filesystems.
If you have a look into utimes, you see that Cygwin ignores this case:

  h = CreateFile()
    if (win32.isdir ())
        /* What we can do with directories more? */
	res = 0;

Can you add a __seterrno () before the `res = 0;' line and see what
Win32 error is produced by CreateFile (*iff* my assumption is correct)?

> > The expected result would be that the clearcase volume chokes with
> > FILE_WRITE_ATTRIBUTES while the Solaris FS should work with it.
> > Otherwise we're sort of doomed.
> Then we're doomed (but was that ever a surprise from Windows? :)

I guess trying my approach isn't the worst one, though.  We should
use that as a start point for further experimenting, IMHO.  I'll check
that in.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader
Red Hat, Inc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]