[ntdll] Move file attribute logic to new function DIR_get_attributes()

Juan Lang juan.lang at gmail.com
Thu Oct 8 12:42:45 CDT 2009


Hi Dan,

You get a +1 from me on this one.  Small note:
+        if (io->Information == FILE_CREATED) {
+            /* FIXME: is this an extra server round trip? */
(snip)
+            status = server_get_unix_fd( *handle, FILE_WRITE_DATA,
&fd, &needs_close, NULL, NULL );

It is, but for most file operations, it won't have any impact:
they'll call server_get_unix_fd anyway, and the handle will have been
cached.  You could return the fd in the reply if you want to save the
round-trip.

A question, though, and one better answered by Alexandre I'm sure:  is
wineserver a better place for setting and querying the attributes than
ntdll?  I know both have access to the file, so to a certain extent
the difference is immaterial.  On the other hand, since you're already
passing the attributes to the server in the create_file request, it
could handle them there.

The advantage to this is that the tests would pass whether or not
xattr support is present on the tested system, because the attributes
would be stored for the lifetime of the handle.  They wouldn't persist
after closing the handle, of course, and for that you would need xattr
support.
--Juan



More information about the wine-devel mailing list