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) { |