| Index: native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.cc
|
| ===================================================================
|
| --- native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.cc (revision 134714)
|
| +++ native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.cc (working copy)
|
| @@ -3,15 +3,17 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| +#include <dirent.h>
|
| #include <errno.h>
|
| #include <sys/stat.h>
|
|
|
| +#include "macros.h"
|
| #include "auto_lock.h"
|
| #include "mount_node_dir.h"
|
|
|
| -MountNodeDir::MountNodeDir(Mount* mount, int ino, int dev) :
|
| - MountNode(mount, ino, dev),
|
| - cache_(NULL) {
|
| +MountNodeDir::MountNodeDir(Mount* mount, int ino, int dev)
|
| + : MountNode(mount, ino, dev),
|
| + cache_(NULL) {
|
| }
|
|
|
| MountNodeDir::~MountNodeDir() {
|
| @@ -73,7 +75,6 @@
|
| errno = ENOENT;
|
| return -1;
|
| }
|
| -
|
| if (name.length() >= MEMBER_SIZE(struct dirent, d_name)) {
|
| errno = ENAMETOOLONG;
|
| return -1;
|
| @@ -114,6 +115,11 @@
|
| return NULL;
|
| }
|
|
|
| +int MountNodeDir::ChildCount() {
|
| + AutoLock lock(&lock_);
|
| + return map_.size();
|
| +}
|
| +
|
| void MountNodeDir::ClearCache() {
|
| free(cache_);
|
| cache_ = NULL;
|
|
|