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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node_dir.h

Issue 16232016: [NaCl SDK] nacl_io: big refactor to return error value (errno). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/mount_node_dir.h
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node_dir.h b/native_client_sdk/src/libraries/nacl_io/mount_node_dir.h
index b6af58dda21caeb1ad01d84c3b6c11f97bde75ba..a2ab67ecfaaf506661120e327890266b365f4b3c 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node_dir.h
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node_dir.h
@@ -25,15 +25,18 @@ class MountNodeDir : public MountNode {
public:
typedef std::map<std::string, MountNode*> MountNodeMap_t;
- virtual int FTruncate(off_t size);
- virtual int GetDents(size_t offs, struct dirent* pdir, size_t count);
- virtual int Read(size_t offs, void *buf, size_t count);
- virtual int Write(size_t offs, void *buf, size_t count);
+ virtual Error FTruncate(off_t size);
+ virtual Error GetDents(size_t offs,
+ struct dirent* pdir,
+ size_t count,
+ int* out_bytes);
+ virtual Error Read(size_t offs, void *buf, size_t count, int* out_bytes);
+ virtual Error Write(size_t offs, void *buf, size_t count, int* out_bytes);
// Adds a finds or adds a directory entry as an INO, updating the refcount
- virtual int AddChild(const std::string& name, MountNode *node);
- virtual int RemoveChild(const std::string& name);
- virtual MountNode* FindChild(const std::string& name);
+ virtual Error AddChild(const std::string& name, MountNode *node);
+ virtual Error RemoveChild(const std::string& name);
+ virtual Error FindChild(const std::string& name, MountNode** out_node);
virtual int ChildCount();

Powered by Google App Engine
This is Rietveld 408576698