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

Unified Diff: native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.cc

Issue 10829027: [NaCl SDK] Add nacl_mounts to NaCl SDK build. Experimental for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync again Created 8 years, 5 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_mounts/mount_node_mem.cc
diff --git a/native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.cc b/native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.cc
index 4d9269270dadf466a839879f02f94a65fdb2f6f1..2fa796b695bce1a8ddc3931c404749d22b513559 100644
--- a/native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.cc
+++ b/native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.cc
@@ -2,12 +2,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+#include "nacl_mounts/mount_node_mem.h"
#include <errno.h>
-#include <sys/stat.h>
+#include <string.h>
-#include "auto_lock.h"
-#include "mount_node_mem.h"
+#include "nacl_mounts/osstat.h"
+#include "utils/auto_lock.h"
#define BLOCK_SIZE (1 << 16)
#define BLOCK_MASK (BLOCK_SIZE - 1)
@@ -24,7 +25,7 @@ MountNodeMem::~MountNodeMem() {
bool MountNodeMem::Init(int mode, short uid, short gid) {
bool ok = MountNode::Init(mode, uid, gid);
- stat_.st_mode |= _S_IFREG;
+ stat_.st_mode |= S_IFREG;
return ok;
}
@@ -59,7 +60,7 @@ int MountNodeMem::Truncate(size_t size) {
// If the current capacity is correct, just adjust and return
if (need == capacity_) {
stat_.st_size = static_cast<off_t>(size);
- 0;
+ return 0;
}
// Attempt to realloc the block
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/mount_node_mem.h ('k') | native_client_sdk/src/libraries/nacl_mounts/osdirent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698