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

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

Issue 12194030: Rename mount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix whitespace Created 7 years, 10 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_mounts/mount_node_mem.h" 5 #include "nacl_io/mount_node_mem.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "nacl_mounts/osstat.h" 10 #include "nacl_io/osstat.h"
11 #include "utils/auto_lock.h" 11 #include "utils/auto_lock.h"
12 12
13 #define BLOCK_SIZE (1 << 16) 13 #define BLOCK_SIZE (1 << 16)
14 #define BLOCK_MASK (BLOCK_SIZE - 1) 14 #define BLOCK_MASK (BLOCK_SIZE - 1)
15 15
16 MountNodeMem::MountNodeMem(Mount *mount) 16 MountNodeMem::MountNodeMem(Mount *mount)
17 : MountNode(mount), 17 : MountNode(mount),
18 data_(NULL), 18 data_(NULL),
19 capacity_(0) { 19 capacity_(0) {
20 stat_.st_mode |= S_IFREG; 20 stat_.st_mode |= S_IFREG;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 // If we failed, then adjust size according to what we keep 74 // If we failed, then adjust size according to what we keep
75 if (size > capacity_) size = capacity_; 75 if (size > capacity_) size = capacity_;
76 76
77 // Update the size and return the new size 77 // Update the size and return the new size
78 stat_.st_size = static_cast<off_t>(size); 78 stat_.st_size = static_cast<off_t>(size);
79 errno = EIO; 79 errno = EIO;
80 return -1; 80 return -1;
81 } 81 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node_mem.h ('k') | native_client_sdk/src/libraries/nacl_io/nacl_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698