Commit Graph

226 Commits

Author SHA1 Message Date
Seong-ho Cho ca8a08606d configure: Add AC_HEADER_MAJOR to find where major() is defined.
Signed-off-by: Seong-ho Cho <darkcircle.0426@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-18 18:06:46 +09:00
Jacek Caban 443c2a4719 ntdll: Pass SYNCHRONIZE flag in NtOpenFile and NtCreateFile calls.
This is needed by Office 2013, which hooks those functions and expects
flag to be set.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 20:36:17 +09:00
Alex Henrie 48f3bacb0b ntdll: Avoid double initialization.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 22:25:39 +09:00
Alex Henrie 65942760c4 ntdll: Increase maximum number of autodetected COM/LPT ports to 256.
Windows autodetects up to 256 serial ports and 256 parallel ports per
system.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-25 12:04:40 +01:00
Piotr Caban a8ef261493 ntdll: Fix NtQueryDirectoryFile behavior on short file names on case insensitive file systems.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 20:26:48 +01:00
Francois Gouget 67c2e06fcd ntdll: Work around a conflict between Wine and Solaris list.h.
Signed-off-by: Francois Gouget <fgouget@free.fr>
2015-10-05 22:27:16 +09:00
Michael Müller 00d966cd3a ntdll: Return STATUS_OBJECT_NAME_INVALID in wine_nt_to_unix_file_name for prefix-only paths.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-02 18:11:31 +09:00
Ken Thomases 3b74ac0f08 ntdll: Fix the "not found" status set by read_directory_stat() and read_directory_getattrlist() for when restart_scan is set. 2015-06-12 21:22:42 +09:00
Ken Thomases e7fa766378 Revert "ntdll: Avoid one of the calls to getattrlist() when read_directory_getattrlist() checks the case sensitivity of the file system.".
This was wrong-headed and could never have worked.  The second getattrlist()
call that I was trying to avoid was only necessary when the first fails.  Given
that the first failed, its results can't be used to avoid the second, no matter
what information we requested.

This reverts commit 5514df9d4e.
2015-06-12 21:22:42 +09:00
Ken Thomases 5514df9d4e ntdll: Avoid one of the calls to getattrlist() when read_directory_getattrlist() checks the case sensitivity of the file system.
Extract a new function, get_dir_case_sensitivity_attr_by_id(), from
get_dir_case_sensitivity_attr().  Call that instead of get_dir_case_sensitivity()
from read_directory_getattrlist().  We get the device and file system IDs from
the same getattrlist() call we're already doing, so that avoids an extra call.
2015-05-22 14:11:03 +09:00
Alexandre Julliard ee1528040e ntdll: Remove the special case for the NUL device. 2015-05-21 17:38:19 +09:00
Ken Thomases bb89f10e5e ntdll: Fix read_directory_getattrlist() to get the name of a symlink rather than its target, but still detect if the symlink is broken. 2015-05-21 13:59:56 +09:00
Ken Thomases 5c98448aa3 ntdll: If read_directory_getattrlist() finds that the file doesn't exist, return successful "no file" result to stop search. 2015-05-21 13:58:01 +09:00
Ken Thomases f6926b3515 ntdll: Increase name buffer size in read_directory_getattrlist() for UTF-8 encoding.
The docs for getattrlist() say that ATTR_CMN_NAME can return up to NAME_MAX + 1
Unicode characters (code points) encoded in UTF-8, which means it can be up to
NAME_MAX * 3 + 1 bytes.
2015-05-21 13:57:45 +09:00
Matteo Bruni 2f0febe60a ntdll: Ignore positive matches in read_directory_stat() for case-insensitive filesystems.
It's necessary to return the actual filename with correct casing and a
plain stat doesn't allow that. Make read_directory_stat() return the
result of the stat() call on a case-insensitive filesystem only when the
file is missing.
2015-05-20 17:32:16 +09:00
Matteo Bruni 5d65b9d0c2 ntdll: Implement a read_directory_getattrlist() function.
When searching for a specific filename on a case-insensitive filesystem
we first try with stat(). If stat() does find the file we currently
return the requested filename back.

That presents an issue when the application cares about the casing of the
actual file stored on-disk. Specifically, NtQueryDirectoryFile is
supposed to return the actual filename with correct casing.

One possible solution to the issue, without having to resort to manually
scanning the directory entries, is to make use of the OS X getattrlist()
function, since it can return the filename stored on the filesystem.
2015-05-20 17:32:09 +09:00
Francois Gouget ca1545cf17 ntdll: Remove unneeded NONAMELESSXXX directives. 2015-03-16 15:04:50 +09:00
Alexandre Julliard ff84bf8bdd ntdll: Move NtNotifyChangeDirectoryFile to file.c and make it use the standard fileio structure. 2015-03-02 23:00:28 +09:00
Erich E. Hoover ca51e113e4 ntdll: Unify retrieving the attributes of a file. 2014-12-17 19:42:23 +01:00
André Hentschel 6d50cfcac2 ntdll: Use a dynamic buffer for change notification data. 2014-09-23 17:17:11 +02:00
Felix Janda 3ae113a957 ntdll: getdents64 might have been defined previously. 2014-09-05 15:26:55 +02:00
Ken Thomases a14ed527d8 ntdll: In find_file_in_dir(), don't test directory entries' short names if the target name isn't a short name.
hash_short_file_name() will always create a short name of at least 8 characters
with the 5th being a tilde (~).  If the target name isn't of that form, then it
can never match any short name constructed from the directory entries.
2014-07-30 11:31:55 -05:00
Martin Storsjo 8cb42d4135 ntdll: Align FILE_*_DIRECTORY_INFORMATION structs to 8 bytes. 2014-05-15 19:04:56 +02:00
Martin Storsjo 114444ca9c ntdll: Don't write uninitialized bytes at the end of filenames. 2014-05-15 19:04:55 +02:00
Huw Davies ac79e160e7 ntdll: For Android look in /proc/mounts for mounted file systems. 2014-04-07 15:34:44 +02:00
Huw Davies 2139df003f ntdll: Add a replacement getmntent for Android.
Bionic has a stub function named getmntent which outputs an unimplemented message.
2014-04-07 15:34:43 +02:00
Frédéric Delanoy 502fc1aef9 ntdll: Use boolean type where appropriate. 2013-12-09 11:45:50 +01:00
Huw Davies fed9f67bc4 ntdll: Don't reduce the size of the local buffer when we come to read another batch of entries.
In the wildcard case, we can't know how much to reduce it by anyway.
2013-12-03 19:40:22 +01:00
Frédéric Delanoy 86fdca6750 ntdll: Use BOOL type where appropriate. 2013-10-30 09:45:20 +01:00
Alexandre Julliard 6666614a19 ntdll: Actually return the mount point in get_device_mount_point on Mac OS. 2013-09-04 16:28:10 +02:00
Alexandre Julliard d191d5bca0 ntdll: Use a RunOnce function to initialize directory lookup options. 2013-08-29 19:56:18 +02:00
Alexandre Julliard 581cef082e ntdll: Use fclose instead of endmntent since we use fopen anyway. 2013-07-29 21:07:12 +02:00
Alexandre Julliard 96b7c71cfe ntdll: Leave NtQueryDirectoryFile early when a non-wildcard mask is used in the getdirentries case.
This avoids having to retry the getdirentries call which may fail if
the buffer size is too small.
2013-07-01 19:51:20 +02:00
Andrew Talbot d0d28b96a4 ntdll: Avoid signed-unsigned integer comparisons. 2013-02-21 08:34:13 +01:00
Alexandre Julliard 606c88a348 ntdll: Use the __NR_ names for Linux system calls. 2013-01-21 21:37:02 +01:00
Alexandre Julliard 90e90e3b6a ntdll: Make the page_size variable global. 2013-01-08 16:35:30 +01:00
Vincas Miliūnas 6314cf0295 kernel32: Added implementation of FileIdBothDirectoryInfo for GetFileInformationByHandleEx. 2012-10-12 13:14:43 +02:00
André Hentschel aac478f51b ntdll: Catch bad pointers in RtlWow64EnableFsRedirectionEx. 2012-08-22 12:11:19 +02:00
André Hentschel 54a9c0fc60 ntdll: Add a helper function that returns the record length of a dirent struct. 2012-06-04 12:17:56 +02:00
André Hentschel 1b1af34173 ntdll: Change default COM device for FreeBSD 8.0. 2012-06-04 12:17:55 +02:00
André Hentschel 1748f0de4e ntdll: Add default COM device for DragonFly BSD. 2012-06-04 12:17:54 +02:00
André Hentschel 1013d2e75c ntdll: Enhance FreeBSD checks to also check for DragonFly BSD when appropriate. 2012-06-04 12:17:54 +02:00
Grazvydas Ignotas edd4356dba ntdll: Fix restart size calculation. 2011-11-02 20:01:15 +01:00
Marcus Meissner 811ae03aeb ntdll: Avoid shadowing "de" variable. 2011-10-20 11:07:08 +02:00
Marcus Meissner 956487434d ntdll: Handle errno also for non ENOENT errors on lseek (Coverity). 2011-08-31 19:43:07 +02:00
Grazvydas Ignotas 006413afe4 ntdll: Use swapping method to return . and .. as first entries. 2011-08-24 13:56:37 +02:00
Alexandre Julliard f4024eaa49 ntdll: Fetch the windows directory from the shared user data. 2011-06-16 12:29:21 +02:00
Bart Van Assche e5fe510720 ntdll: Avoid examining uninitialized data. 2011-03-31 12:49:34 +02:00
Andrew Nguyen c698fc86b9 ntdll: Fix one-time warning message output. 2011-02-01 12:38:57 +01:00
Charles Davis 4e44e153c5 ntdll: Check for case-insensitive volumes. 2011-01-28 17:23:57 +01:00
Piotr Caban b614a15328 server: Return multiple events in read_changes. 2011-01-19 14:13:33 +01:00
Alexandre Julliard 0f9e93afaa ntdll: Use the getdents64 system call on all Linux platforms. 2010-12-27 12:01:43 +01:00
Alexandre Julliard 37ae7a533c ntdll: Use the syscall function instead of inline assembly. 2010-12-23 16:10:18 +01:00
Gerald Pfeifer dfa200d1e8 ntdll: Avoid compiler warning in the default case in append_entry. 2010-03-15 13:41:39 +01:00
Alexandre Julliard 25bee84030 ntdll: Don't require read access to the root directory for normal opens, similarly to the open by id case. 2010-01-08 15:54:20 +01:00
Gerald Pfeifer e8158e48cb ntdll: Avoid one warning around assert(0). 2009-12-29 13:17:30 +01:00
Gerald Pfeifer e8d387fd45 ntdll: Use #ifdef instead of #if to check for _DARWIN_FEATURE_64_BIT_INODE. 2009-12-28 12:27:15 +01:00
Alexandre Julliard 6509044087 ntdll: Search the whole filesystem under the starting directory when opening files by id. 2009-12-09 23:34:45 +01:00
Alexandre Julliard 9c789f4025 ntdll: Add support for the FILE_OPEN_BY_FILE_ID flag in NtCreateFile. 2009-12-03 10:10:06 +01:00
Alexandre Julliard 6677565f34 ntdll: Don't report a file id for directory entries that are on a different device. 2009-12-03 10:10:06 +01:00
Alexandre Julliard 7dc1c2af52 ntdll: Fix test failure on recent Windows versions. 2009-12-03 10:08:56 +01:00
Alexandre Julliard d97149b708 ntdll: Add support for converting file names to Unix when a root directory is specified. 2009-12-01 17:24:26 +01:00
Alexandre Julliard a420a207e3 ntdll: Move the directory lookup part of wine_nt_to_unix_file_name to a separate helper. 2009-12-01 16:30:52 +01:00
Maarten Lankhorst 58c7aa4691 ntdll: Silence a common warning. 2009-12-01 15:10:37 +01:00
Alexandre Julliard 74ae7d358f ntdll: Add support for the different info classes in NtQueryDirectoryFile. 2009-11-18 22:10:05 +01:00
Alexandre Julliard 551ddfe402 ntdll: Make the various directory info size functions depend on the info class. 2009-11-18 22:09:48 +01:00
Alexandre Julliard ee9b19ab5f ntdll: Pass the NtQueryDirectoryFile info class down into the various helper functions. 2009-11-18 22:03:51 +01:00
Alexandre Julliard cfafcc5a6e ntdll: Define a generic file information structure to allow supporting multiple info classes in NtQueryDirectoryFile. 2009-11-18 22:02:53 +01:00
Alexandre Julliard c843665c12 ntdll: Pass the full I/O status block to append_entry and have it set the status code on overflow. 2009-11-18 21:59:02 +01:00
Alexandre Julliard da1df74147 ntdll: Use the common fill_stat_info function from the directory code too. 2009-11-18 21:58:23 +01:00
Alexandre Julliard aadf703fc0 ntdll: The meaning of the flag is inverted between RtlWow64EnableFsRedirection and RtlWow64EnableFsRedirectionEx. 2009-10-28 10:55:19 +01:00
Alexandre Julliard b102fcadef ntdll: Add Windows directory redirections for Wow64. 2009-10-22 20:06:06 +02:00
Alexandre Julliard 639e07bead ntdll: Abstract the support for comparing file identities. 2009-10-22 19:59:04 +02:00
Alexandre Julliard 4e77222820 ntdll: Move the window and system dir variables to directory.c 2009-10-22 19:55:06 +02:00
Alexandre Julliard c1cb976b66 ntdll: Fix a file descriptor leak. 2009-09-10 10:53:38 +02:00
Ken Thomases 028b763f2f ntdll: For Darwin/Mac OS X, use legacy getdirentries if 64-bit inodes enabled.
Fixes building on Snow Leopard.
2009-08-03 15:01:08 +02:00
Alexandre Julliard 747d58d211 ntdll: Add management of the Wow64 filesystem redirection flag. 2009-07-06 15:08:39 +02:00
Michael Stefaniuc d2f6f56873 ntdll: Remove superfluous pointer casts. 2009-03-23 12:40:53 +01:00
Alexandre Julliard 6db201080f server: Make the various async I/O parameters client_ptr_t instead of void pointers. 2008-12-30 21:09:41 +01:00
Alexandre Julliard f507ccbf52 server: Specify the user APC to call only once the system APC has executed. 2008-12-30 20:51:55 +01:00
Alexandre Julliard a7b3efde0e server: Store the async handle inside the async_data_t structure. 2008-12-26 12:33:21 +01:00
Maarten Lankhorst 768160e944 ntdll: Make all exported wine functions CDECL. 2008-12-17 15:02:25 +01:00
Alexandre Julliard f6fa72d770 server: Make async I/O transfer sizes always 32-bit. 2008-12-15 13:30:25 +01:00
Alexandre Julliard d1b3d484f7 server: Add functions for conversions between server object handles and pointer-style handles. 2008-12-08 16:05:17 +01:00
A C Hurst ad335b7e7f ntdll: wine_nt_to_unix_file_name() parse string to int instead of cast char, where string may be passed. 2008-11-20 12:16:42 +01:00
Lei Zhang 7fca3486ad ntdll: Skip deleted files in read_directory_getdents. 2008-10-31 12:57:46 +01:00
Alexandre Julliard f0fed2831a ntdll: Ignore some system directories in NtQueryDirectoryFile to avoid recursion troubles. 2008-10-28 13:55:24 +01:00
Francois Gouget 215738a140 dirent.h is a conditional include now. 2008-10-20 11:37:27 +02:00
Alexandre Julliard d350998cec ntdll: Don't bother to check the file name against the mask if stat() succeeded. 2008-06-30 15:10:50 +02:00
Austin English 05faae7b5a Spelling fixes. 2008-04-09 12:07:39 +02:00
Alexandre Julliard 5625c6079e Get rid of the global thread.h header. 2008-03-01 11:57:00 +01:00
Andrey Turkin 7a9210fa85 server: Pass Information field from async I/O APCs. 2007-11-15 14:24:50 +01:00
Andrey Turkin 793453f768 ntdll: Make async i/o functions generate completion messages. 2007-11-15 14:23:37 +01:00
Andrey Turkin c702a91a3c server: Allow async i/o operations to send completion messages. 2007-11-15 14:20:29 +01:00
Alexandre Julliard 7fd1ad5ffa ntdll: Cache the DOS drives stat info for up to one second. 2007-10-18 15:16:07 +02:00
Ken Thomases 54a471732f ntdll: Work around a bug in Mac OS X's getdirentries(). 2007-10-10 13:42:44 +02:00
Alexandre Julliard 1b57c3bf90 ntdll: Don't print traces from async I/O callbacks. 2007-06-29 13:40:42 +02:00
Andrew Talbot bd15feab4a ntdll: Constify some variables. 2007-06-26 12:54:33 +02:00
Alexandre Julliard 8992f89f27 server: Remove the extra apc_arg parameter now that user APCs all require the same arg as the kernel APC. 2007-06-04 15:20:49 +02:00
Alexandre Julliard f6a3a4689f ntdll: Queue an intermediate user APC routine to free the async info. 2007-06-04 15:20:49 +02:00