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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_mem.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: merge master, fix windows Created 7 years, 6 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_mem.h
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_mem.h b/native_client_sdk/src/libraries/nacl_io/mount_mem.h
index dc75e81769d4550489ad44f77655136d86d5cc79..930e9c734a5588ecf09bab91a50387b46c2d6929 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_mem.h
+++ b/native_client_sdk/src/libraries/nacl_io/mount_mem.h
@@ -14,35 +14,33 @@ class MountMem : public Mount {
protected:
MountMem();
- virtual bool Init(int dev, StringMap_t& args, PepperInterface* ppapi);
+ virtual Error Init(int dev, StringMap_t& args, PepperInterface* ppapi);
virtual void Destroy();
// The protected functions are only used internally and will not
// acquire or release the mount's lock themselves. The caller is
// required to use correct locking as needed.
- MountNode *AllocateData(int mode);
- MountNode *AllocatePath(int mode);
// Allocate or free an INODE number.
int AllocateINO();
void FreeINO(int ino);
// Find a Node specified node optionally failing if type does not match.
- virtual MountNode* FindNode(const Path& path, int type = 0);
+ virtual Error FindNode(const Path& path, int type, MountNode** out_node);
public:
- virtual MountNode *Open(const Path& path, int mode);
- virtual int Unlink(const Path& path);
- virtual int Mkdir(const Path& path, int perm);
- virtual int Rmdir(const Path& path);
- virtual int Remove(const Path& path);
+ virtual Error Open(const Path& path, int mode, MountNode** out_node);
+ virtual Error Unlink(const Path& path);
+ virtual Error Mkdir(const Path& path, int perm);
+ virtual Error Rmdir(const Path& path);
+ virtual Error Remove(const Path& path);
private:
static const int REMOVE_DIR = 1;
static const int REMOVE_FILE = 2;
static const int REMOVE_ALL = REMOVE_DIR | REMOVE_FILE;
- int RemoveInternal(const Path& path, int remove_type);
+ Error RemoveInternal(const Path& path, int remove_type);
MountNode* root_;
size_t max_ino_;
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_http.cc ('k') | native_client_sdk/src/libraries/nacl_io/mount_mem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698