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

Unified Diff: base/files/file_util_linux.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/files/file_util_android.cc ('k') | base/files/file_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_linux.cc
diff --git a/base/files/file_util_linux.cc b/base/files/file_util_linux.cc
deleted file mode 100644
index b230fd96484c7d8e75f408edc912019d60ffb728..0000000000000000000000000000000000000000
--- a/base/files/file_util_linux.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2011 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 "base/files/file_util.h"
-
-#include <errno.h>
-#include <linux/magic.h>
-#include <sys/vfs.h>
-
-#include "base/files/file_path.h"
-
-namespace base {
-
-bool GetFileSystemType(const FilePath& path, FileSystemType* type) {
- struct statfs statfs_buf;
- if (statfs(path.value().c_str(), &statfs_buf) < 0) {
- if (errno == ENOENT)
- return false;
- *type = FILE_SYSTEM_UNKNOWN;
- return true;
- }
-
- // Not all possible |statfs_buf.f_type| values are in linux/magic.h.
- // Missing values are copied from the statfs man page.
- switch (statfs_buf.f_type) {
- case 0:
- *type = FILE_SYSTEM_0;
- break;
- case EXT2_SUPER_MAGIC: // Also ext3 and ext4
- case MSDOS_SUPER_MAGIC:
- case REISERFS_SUPER_MAGIC:
- case BTRFS_SUPER_MAGIC:
- case 0x5346544E: // NTFS
- case 0x58465342: // XFS
- case 0x3153464A: // JFS
- *type = FILE_SYSTEM_ORDINARY;
- break;
- case NFS_SUPER_MAGIC:
- *type = FILE_SYSTEM_NFS;
- break;
- case SMB_SUPER_MAGIC:
- case 0xFF534D42: // CIFS
- *type = FILE_SYSTEM_SMB;
- break;
- case CODA_SUPER_MAGIC:
- *type = FILE_SYSTEM_CODA;
- break;
- case HUGETLBFS_MAGIC:
- case RAMFS_MAGIC:
- case TMPFS_MAGIC:
- *type = FILE_SYSTEM_MEMORY;
- break;
- case CGROUP_SUPER_MAGIC:
- *type = FILE_SYSTEM_CGROUP;
- break;
- default:
- *type = FILE_SYSTEM_OTHER;
- }
- return true;
-}
-
-} // namespace base
« no previous file with comments | « base/files/file_util_android.cc ('k') | base/files/file_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698