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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/mount_mem.cc

Issue 17234004: [NaCl SDK] Fix SDK waterfall: unistd.h does not exist on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #include "nacl_io/mount_mem.h" 5 #include "nacl_io/mount_mem.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <unistd.h>
10 9
11 #include <string> 10 #include <string>
12 11
13 #include "nacl_io/mount.h" 12 #include "nacl_io/mount.h"
14 #include "nacl_io/mount_node.h" 13 #include "nacl_io/mount_node.h"
15 #include "nacl_io/mount_node_dir.h" 14 #include "nacl_io/mount_node_dir.h"
16 #include "nacl_io/mount_node_mem.h" 15 #include "nacl_io/mount_node_mem.h"
17 #include "nacl_io/osstat.h" 16 #include "nacl_io/osstat.h"
17 #include "nacl_io/osunistd.h"
18 #include "nacl_io/path.h" 18 #include "nacl_io/path.h"
19 #include "sdk_util/auto_lock.h" 19 #include "sdk_util/auto_lock.h"
20 #include "sdk_util/ref_object.h" 20 #include "sdk_util/ref_object.h"
21 21
22 MountMem::MountMem() : root_(NULL), max_ino_(0) {} 22 MountMem::MountMem() : root_(NULL), max_ino_(0) {}
23 23
24 Error MountMem::Init(int dev, StringMap_t& args, PepperInterface* ppapi) { 24 Error MountMem::Init(int dev, StringMap_t& args, PepperInterface* ppapi) {
25 Error error = Mount::Init(dev, args, ppapi); 25 Error error = Mount::Init(dev, args, ppapi);
26 if (error) 26 if (error)
27 return error; 27 return error;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return ENOTDIR; 240 return ENOTDIR;
241 241
242 if (file_only && child->IsaDir()) 242 if (file_only && child->IsaDir())
243 return EISDIR; 243 return EISDIR;
244 244
245 if (remove_dir && child->ChildCount() > 0) 245 if (remove_dir && child->ChildCount() > 0)
246 return ENOTEMPTY; 246 return ENOTEMPTY;
247 247
248 return parent->RemoveChild(path.Basename()); 248 return parent->RemoveChild(path.Basename());
249 } 249 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_http.cc ('k') | native_client_sdk/src/libraries/nacl_io/osunistd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698