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

Unified Diff: native_client_sdk/src/libraries/nacl_mounts/mount_node.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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_mounts/mount_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_mounts/mount_node.cc b/native_client_sdk/src/libraries/nacl_mounts/mount_node.cc
deleted file mode 100644
index f965b21e5434b809348f829c079bebc1056e731c..0000000000000000000000000000000000000000
--- a/native_client_sdk/src/libraries/nacl_mounts/mount_node.cc
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "nacl_mounts/mount_node.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <string>
-
-#include "nacl_mounts/mount.h"
-#include "utils/auto_lock.h"
-
-static const int USR_ID = 1001;
-static const int GRP_ID = 1002;
-
-MountNode::MountNode(Mount* mount)
- : mount_(mount) {
- memset(&stat_, 0, sizeof(stat_));
- stat_.st_gid = GRP_ID;
- stat_.st_uid = USR_ID;
-
- // Mount should normally never be NULL, but may be null in tests.
- if (mount_)
- mount_->OnNodeCreated(this);
-}
-
-MountNode::~MountNode() {
-}
-
-bool MountNode::Init(int perm) {
- stat_.st_mode |= perm;
- return true;
-}
-
-void MountNode::Destroy() {
- if (mount_) {
- mount_->OnNodeDestroyed(this);
- }
-}
-
-int MountNode::FSync() {
- return 0;
-}
-
-int MountNode::GetDents(size_t offs, struct dirent* pdir, size_t count) {
- errno = ENOTDIR;
- return -1;
-}
-
-int MountNode::GetStat(struct stat* pstat) {
- AutoLock lock(&lock_);
- memcpy(pstat, &stat_, sizeof(stat_));
- return 0;
-}
-
-int MountNode::Ioctl(int request, char* arg) {
- errno = EINVAL;
- return -1;
-}
-
-int MountNode::Read(size_t offs, void* buf, size_t count) {
- errno = EINVAL;
- return -1;
-}
-
-int MountNode::Truncate(size_t size) {
- errno = EINVAL;
- return -1;
-}
-
-int MountNode::Write(size_t offs, const void* buf, size_t count) {
- errno = EINVAL;
- return -1;
-}
-
-int MountNode::GetLinks() {
- return stat_.st_nlink;
-}
-
-int MountNode::GetMode() {
- return stat_.st_mode & ~S_IFMT;
-}
-
-size_t MountNode::GetSize() {
- return stat_.st_size;
-}
-
-int MountNode::GetType() {
- return stat_.st_mode & S_IFMT;
-}
-
-bool MountNode::IsaDir() {
- return (stat_.st_mode & S_IFDIR) != 0;
-}
-
-bool MountNode::IsaFile() {
- return (stat_.st_mode & S_IFREG) != 0;
-}
-
-bool MountNode::IsaTTY() {
- return (stat_.st_mode & S_IFCHR) != 0;
-}
-
-
-int MountNode:: AddChild(const std::string& name, MountNode* node) {
- errno = ENOTDIR;
- return -1;
-}
-
-int MountNode::RemoveChild(const std::string& name) {
- errno = ENOTDIR;
- return -1;
-}
-
-MountNode* MountNode::FindChild(const std::string& name) {
- errno = ENOTDIR;
- return NULL;
-}
-
-int MountNode::ChildCount() {
- errno = ENOTDIR;
- return -1;
-}
-
-void MountNode::Link() {
- Acquire();
- stat_.st_nlink++;
-}
-
-void MountNode::Unlink() {
- stat_.st_nlink--;
- Release();
-}
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/mount_node.h ('k') | native_client_sdk/src/libraries/nacl_mounts/mount_node_dir.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698