Stubbed handling of root_directory.

This commit is contained in:
gibbed 2014-01-19 00:24:59 -08:00
parent 1277325603
commit 8b27354dcb
1 changed files with 27 additions and 0 deletions

View File

@ -60,6 +60,15 @@ SHIM_CALL NtCreateFile_shim(
uint32_t info = X_FILE_DOES_NOT_EXIST; uint32_t info = X_FILE_DOES_NOT_EXIST;
uint32_t handle; uint32_t handle;
XFile* root_file = NULL;
if (attrs.root_directory != 0xFFFFFFFD) { // ObDosDevices
result = state->object_table()->GetObject(
attrs.root_directory, (XObject**)&root_file);
XEASSERT(XSUCCEEDED(result));
XEASSERT(root_file->type() == XObject::Type::kTypeFile);
XEASSERTALWAYS();
}
// Resolve the file using the virtual file system. // Resolve the file using the virtual file system.
FileSystem* fs = state->file_system(); FileSystem* fs = state->file_system();
Entry* entry = fs->ResolvePath(attrs.object_name.buffer); Entry* entry = fs->ResolvePath(attrs.object_name.buffer);
@ -119,6 +128,15 @@ SHIM_CALL NtOpenFile_shim(
uint32_t info = X_FILE_DOES_NOT_EXIST; uint32_t info = X_FILE_DOES_NOT_EXIST;
uint32_t handle; uint32_t handle;
XFile* root_file = NULL;
if (attrs.root_directory != 0xFFFFFFFD) { // ObDosDevices
result = state->object_table()->GetObject(
attrs.root_directory, (XObject**)&root_file);
XEASSERT(XSUCCEEDED(result));
XEASSERT(root_file->type() == XObject::Type::kTypeFile);
XEASSERTALWAYS();
}
// Resolve the file using the virtual file system. // Resolve the file using the virtual file system.
FileSystem* fs = state->file_system(); FileSystem* fs = state->file_system();
Entry* entry = fs->ResolvePath(attrs.object_name.buffer); Entry* entry = fs->ResolvePath(attrs.object_name.buffer);
@ -433,6 +451,15 @@ SHIM_CALL NtQueryFullAttributesFile_shim(
X_STATUS result = X_STATUS_NO_SUCH_FILE; X_STATUS result = X_STATUS_NO_SUCH_FILE;
XFile* root_file = NULL;
if (attrs.root_directory != 0xFFFFFFFD) { // ObDosDevices
result = state->object_table()->GetObject(
attrs.root_directory, (XObject**)&root_file);
XEASSERT(XSUCCEEDED(result));
XEASSERT(root_file->type() == XObject::Type::kTypeFile);
XEASSERTALWAYS();
}
// Resolve the file using the virtual file system. // Resolve the file using the virtual file system.
FileSystem* fs = state->file_system(); FileSystem* fs = state->file_system();
Entry* entry = fs->ResolvePath(attrs.object_name.buffer); Entry* entry = fs->ResolvePath(attrs.object_name.buffer);