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

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

Issue 565763002: Plumbing though mode parameter to open, since fusefs can make use of it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 3 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_proxy.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
index 6d52cafcab8ec6bb08b2762607e26390432c4468..20d78f21dc653c0bc7d5b7e2024728d09ffd4d9a 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
@@ -104,17 +104,17 @@ Error KernelProxy::Init(PepperInterface* ppapi) {
// Open the first three in order to get STDIN, STDOUT, STDERR
int fd;
- fd = open("/dev/stdin", O_RDONLY);
+ fd = open("/dev/stdin", O_RDONLY, 0);
assert(fd == 0);
if (fd < 0)
rtn = errno;
- fd = open("/dev/stdout", O_WRONLY);
+ fd = open("/dev/stdout", O_WRONLY, 0);
assert(fd == 1);
if (fd < 0)
rtn = errno;
- fd = open("/dev/stderr", O_WRONLY);
+ fd = open("/dev/stderr", O_WRONLY, 0);
assert(fd == 2);
if (fd < 0)
rtn = errno;
@@ -199,11 +199,11 @@ int KernelProxy::open_resource(const char* path) {
return AllocateFD(handle, path);
}
-int KernelProxy::open(const char* path, int open_flags) {
+int KernelProxy::open(const char* path, int open_flags, mode_t mode) {
ScopedFilesystem fs;
ScopedNode node;
- Error error = AcquireFsAndNode(path, open_flags, &fs, &node);
+ Error error = AcquireFsAndNode(path, open_flags, mode, &fs, &node);
if (error) {
errno = error;
return -1;
@@ -324,7 +324,7 @@ char* KernelProxy::getwd(char* buf) {
}
int KernelProxy::chmod(const char* path, mode_t mode) {
- int fd = KernelProxy::open(path, O_RDONLY);
+ int fd = KernelProxy::open(path, O_RDONLY, mode);
if (-1 == fd)
return -1;
@@ -388,7 +388,7 @@ int KernelProxy::rmdir(const char* path) {
}
int KernelProxy::stat(const char* path, struct stat* buf) {
- int fd = open(path, O_RDONLY);
+ int fd = open(path, O_RDONLY, 0);
if (-1 == fd)
return -1;
@@ -718,7 +718,7 @@ int KernelProxy::unlink(const char* path) {
}
int KernelProxy::truncate(const char* path, off_t len) {
- int fd = KernelProxy::open(path, O_WRONLY);
+ int fd = KernelProxy::open(path, O_WRONLY, 0);
if (-1 == fd)
return -1;
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_proxy.h ('k') | native_client_sdk/src/libraries/nacl_io/kernel_wrap_bionic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698