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

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

Issue 15800004: [NaCl SDK] nacl_io: Added support for access() syscall. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to HEAD. Created 7 years, 6 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/mount_html5fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc b/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
index 0008284253ace3c0c99b10b4be20b67622794ed8..55393e00c0b70cb1c30f01c3e38d1401d323685f 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/mount_html5fs.cc
@@ -6,6 +6,7 @@
#include "nacl_io/mount_html5fs.h"
#include <errno.h>
+#include <fcntl.h>
#include <ppapi/c/pp_completion_callback.h>
#include <ppapi/c/pp_errors.h>
#include <stdlib.h>
@@ -24,6 +25,17 @@ int64_t strtoull(const char* nptr, char** endptr, int base) {
} // namespace
+Error MountHtml5Fs::Access(const Path& path, int a_mode) {
+ // a_mode is unused, since all files are readable, writable and executable.
+ MountNode* node;
+ Error error = Open(path, O_RDONLY, &node);
+ if (error)
+ return error;
+
+ node->Release();
+ return 0;
+}
+
Error MountHtml5Fs::Open(const Path& path, int mode, MountNode** out_node) {
*out_node = NULL;
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_html5fs.h ('k') | native_client_sdk/src/libraries/nacl_io/mount_http.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698