| OLD | NEW |
| 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.h" | 5 #include "nacl_io/mount_node.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "nacl_mounts/mount.h" | 13 #include "nacl_io/mount.h" |
| 14 #include "utils/auto_lock.h" | 14 #include "utils/auto_lock.h" |
| 15 | 15 |
| 16 static const int USR_ID = 1001; | 16 static const int USR_ID = 1001; |
| 17 static const int GRP_ID = 1002; | 17 static const int GRP_ID = 1002; |
| 18 | 18 |
| 19 MountNode::MountNode(Mount* mount) | 19 MountNode::MountNode(Mount* mount) |
| 20 : mount_(mount) { | 20 : mount_(mount) { |
| 21 memset(&stat_, 0, sizeof(stat_)); | 21 memset(&stat_, 0, sizeof(stat_)); |
| 22 stat_.st_gid = GRP_ID; | 22 stat_.st_gid = GRP_ID; |
| 23 stat_.st_uid = USR_ID; | 23 stat_.st_uid = USR_ID; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 void MountNode::Link() { | 128 void MountNode::Link() { |
| 129 Acquire(); | 129 Acquire(); |
| 130 stat_.st_nlink++; | 130 stat_.st_nlink++; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void MountNode::Unlink() { | 133 void MountNode::Unlink() { |
| 134 stat_.st_nlink--; | 134 stat_.st_nlink--; |
| 135 Release(); | 135 Release(); |
| 136 } | 136 } |
| OLD | NEW |