* fhandler.cc (is_at_eof): Rewrite using NT functions.
(off_current): New static variable. (off_append): Ditto. (fhandler_base::raw_write): Use NtWriteFile. Accommodate O_APPEND here. (fhandler_base::write): Drop O_APPEND hack. Use NT functions. (fhandler_base::lseek): Rewrite using NT functions. * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add space in debug output. (fhandler_disk_file::ftruncate): Ditto. * ntdll.h (STATUS_DISK_FULL): Define. (FILE_USE_FILE_POINTER_POSITION): Define. (FILE_WRITE_TO_END_OF_FILE): Define.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xc000003A)
|
||||
#define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xc0000043)
|
||||
#define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056)
|
||||
#define STATUS_DISK_FULL ((NTSTATUS) 0xc000007f)
|
||||
#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
|
||||
#define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb)
|
||||
#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101)
|
||||
@@ -53,6 +54,9 @@
|
||||
#define FILE_EXISTS 4
|
||||
#define FILE_DOES_NOT_EXIST 5
|
||||
|
||||
#define FILE_WRITE_TO_END_OF_FILE (-1LL)
|
||||
#define FILE_USE_FILE_POINTER_POSITION (-2LL)
|
||||
|
||||
/* Device Characteristics. */
|
||||
#define FILE_REMOVABLE_MEDIA 0x00000001
|
||||
#define FILE_READ_ONLY_DEVICE 0x00000002
|
||||
|
Reference in New Issue
Block a user