Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_object.cc

Issue 304013002: [NaCl SDK] Create Filesystem nodes in /dev/fs/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/kernel_object.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_object.cc b/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
index 98362ebf3101be9bbf22448196681a57ad8f8f39..8b64ca15caa1414f319f16285a952aefa85423f0 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_object.cc
@@ -40,7 +40,8 @@ Error KernelObject::AttachFsAtPath(const ScopedFilesystem& fs,
return 0;
}
-Error KernelObject::DetachFsAtPath(const std::string& path) {
+Error KernelObject::DetachFsAtPath(const std::string& path,
+ ScopedFilesystem* out_fs) {
std::string abs_path = GetAbsParts(path).Join();
AUTO_LOCK(fs_lock_);
@@ -52,6 +53,8 @@ Error KernelObject::DetachFsAtPath(const std::string& path) {
if (it->second->RefCount() != 1)
return EBUSY;
+ *out_fs = it->second;
+
filesystems_.erase(it);
return 0;
}
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_object.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698