[Kernel] Add support for XFileEndOfFileInformation.

This commit is contained in:
gibbed
2018-05-23 04:24:37 -05:00
parent 19f93304c7
commit bc369e43cb
11 changed files with 45 additions and 2 deletions

View File

@@ -52,5 +52,17 @@ X_STATUS HostPathFile::WriteSync(const void* buffer, size_t buffer_length,
}
}
X_STATUS HostPathFile::SetLength(size_t length) {
if (!(file_access_ & FileAccess::kFileWriteData)) {
return X_STATUS_ACCESS_DENIED;
}
if (file_handle_->SetLength(length)) {
return X_STATUS_SUCCESS;
} else {
return X_STATUS_END_OF_FILE;
}
}
} // namespace vfs
} // namespace xe