Fixed compilation & removed useless code
This commit is contained in:
parent
e130f666b4
commit
0d71596200
|
@ -93,11 +93,6 @@ dword_result_t NtCreateFile(lpdword_t handle_out, dword_t desired_access,
|
||||||
return X_STATUS_OBJECT_NAME_INVALID;
|
return X_STATUS_OBJECT_NAME_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target_path.back() == '\\' &&
|
|
||||||
create_options & CreateOptions::FILE_NON_DIRECTORY_FILE) {
|
|
||||||
return X_STATUS_FILE_IS_A_DIRECTORY;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (object_attrs->root_directory != 0xFFFFFFFD && // ObDosDevices
|
if (object_attrs->root_directory != 0xFFFFFFFD && // ObDosDevices
|
||||||
object_attrs->root_directory != 0) {
|
object_attrs->root_directory != 0) {
|
||||||
auto root_file = kernel_state()->object_table()->LookupObject<XFile>(
|
auto root_file = kernel_state()->object_table()->LookupObject<XFile>(
|
||||||
|
|
|
@ -101,7 +101,7 @@ dword_result_t NtAllocateVirtualMemory(lpdword_t base_addr_ptr,
|
||||||
if (*base_addr_ptr != 0) {
|
if (*base_addr_ptr != 0) {
|
||||||
// ignore specified page size when base address is specified.
|
// ignore specified page size when base address is specified.
|
||||||
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
||||||
if (heap->page_size == 0x1000 && !*region_size_ptr) {
|
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||||
return X_STATUS_INVALID_PARAMETER;
|
return X_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ dword_result_t NtProtectVirtualMemory(lpdword_t base_addr_ptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
||||||
if (heap->page_size == 0x1000 && !*region_size_ptr) {
|
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||||
return X_STATUS_INVALID_PARAMETER;
|
return X_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ dword_result_t NtFreeVirtualMemory(lpdword_t base_addr_ptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
auto heap = kernel_state()->memory()->LookupHeap(base_addr_value);
|
auto heap = kernel_state()->memory()->LookupHeap(base_addr_value);
|
||||||
if (heap->page_size == 0x1000 && !*region_size_ptr) {
|
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||||
return X_STATUS_INVALID_PARAMETER;
|
return X_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,8 +173,9 @@ bool VirtualFileSystem::DeletePath(const std::string_view path) {
|
||||||
X_STATUS VirtualFileSystem::OpenFile(Entry* root_entry,
|
X_STATUS VirtualFileSystem::OpenFile(Entry* root_entry,
|
||||||
const std::string_view path,
|
const std::string_view path,
|
||||||
FileDisposition creation_disposition,
|
FileDisposition creation_disposition,
|
||||||
uint32_t desired_access, uint32_t create_options,
|
uint32_t desired_access,
|
||||||
File** out_file, FileAction* out_action) {
|
uint32_t create_options, File** out_file,
|
||||||
|
FileAction* out_action) {
|
||||||
// TODO(gibbed): should 'is_directory' remain as a bool or should it be
|
// TODO(gibbed): should 'is_directory' remain as a bool or should it be
|
||||||
// flipped to a generic FileAttributeFlags?
|
// flipped to a generic FileAttributeFlags?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue