patch to allow touch to work on HPFS (and others, maybe??)
Corinna Vinschen
vinschen@redhat.com
Fri Feb 11 14:20:00 GMT 2005
On Feb 10 23:43, Eric Blake wrote:
> Corinna Vinschen <vinschen <at> redhat.com> writes:
> > Anyway, can you please test on both drives how they behave if utime
> > uses FILE_WRITE_ATTRIBUTES vs. GENERIC_WRITE?
>
> 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 ((h == INVALID_HANDLE_VALUE)
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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.
More information about the Cygwin-patches
mailing list