| 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..d09d86746ebb0dfb139fb3edcf3545f4ac041048 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,11 @@ 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;
|
| + size_t out_bytes_as_size_t;
|
| + Error rtn = _real_getdents(real_fd_, pdir, count, &out_bytes_as_size_t);
|
| + if (rtn == 0)
|
| + *out_bytes = out_bytes_as_size_t;
|
| + return rtn;
|
| }
|
|
|
| Error RealNode::GetStat(struct stat* stat) {
|
|
|