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

Unified Diff: native_client_sdk/src/libraries/nacl_io/passthroughfs/real_node.cc

Issue 832413004: [NaCl SDK] nacl_io: Change default root filesystem type from passthroughfs to memfs Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_path
Patch Set: Created 5 years, 11 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/passthroughfs/real_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/passthroughfs/real_node.cc b/native_client_sdk/src/libraries/nacl_io/passthroughfs/real_node.cc
index 7f585f640c54b35c633801da9cbd46b08b436721..18472c16c8a47f4d105ced4656b644c7c5627d22 100644
--- a/native_client_sdk/src/libraries/nacl_io/passthroughfs/real_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/passthroughfs/real_node.cc
@@ -12,11 +12,13 @@
#include "nacl_io/log.h"
namespace nacl_io {
+
RealNode::RealNode(Filesystem* filesystem, int real_fd, bool close_on_destroy)
: Node(filesystem),
real_fd_(real_fd),
close_on_destroy_(close_on_destroy)
{
+ GetStat(&stat_);
}
void RealNode::Destroy() {
@@ -89,11 +91,7 @@ Error RealNode::GetDents(size_t offs,
struct dirent* pdir,
size_t count,
int* out_bytes) {
- size_t nread;
- int err = _real_getdents(real_fd_, pdir, count, &nread);
- if (err)
- return err;
- return nread;
+ return _real_getdents(real_fd_, pdir, count, (size_t*)out_bytes);
}
Error RealNode::GetStat(struct stat* stat) {

Powered by Google App Engine
This is Rietveld 408576698