Finishing unique_ptr'ing and fixing file memory management (for now).

This commit is contained in:
Ben Vanik
2014-08-21 07:54:19 -07:00
parent c59d053404
commit 08b0226a16
26 changed files with 152 additions and 175 deletions

View File

@@ -176,6 +176,16 @@ std::unique_ptr<Entry> FileSystem::ResolvePath(const std::string& path) {
return nullptr;
}
X_STATUS FileSystem::Open(std::unique_ptr<Entry> entry,
KernelState* kernel_state, Mode mode, bool async,
XFile** out_file) {
auto result = entry->Open(kernel_state, mode, async, out_file);
if (XSUCCEEDED(result)) {
entry.release();
}
return result;
}
} // namespace fs
} // namespace kernel
} // namespace xe