* ntdll.h: Reorder NT status flags. Fix a case difference. Add

STATUS_CANNOT_DELETE flag.
	* syscalls.cc (unlink_nt): Change initial NtOpenFile to request
	FILE_SHARE_DELETE sharing mode.  Change comment accordingly.
	If setting delete disposition failed with STATUS_CANNOT_DELETE, try
	to delete using delete-on-close.  Explain why.
	Rearrange setting R/O DOS attribute after trying to delete.  Simplify
	comment.
This commit is contained in:
Corinna Vinschen
2009-01-07 18:18:23 +00:00
parent 3bee7767a8
commit f4ad04049f
3 changed files with 57 additions and 15 deletions

View File

@ -8,6 +8,7 @@
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106)
#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000)
#define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005)
#define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006)
@ -28,7 +29,7 @@
#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xc0000034)
#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xc000003A)
#define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xc0000043)
#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xC000004f)
#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xc000004f)
#define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xc0000050)
#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xc0000051)
#define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xc0000052)
@ -37,7 +38,7 @@
#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
#define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb)
#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101)
#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106)
#define STATUS_CANNOT_DELETE ((NTSTATUS) 0xc0000121)
#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)