diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-20 13:51:02 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-20 13:58:20 -0500 |
commit | 4e5a3f6c53261d7b9b5f042a547fdab9e5243579 (patch) | |
tree | f53f4f564c21e23759ebe11c1ded8b443720bee2 /src | |
parent | 251c10fd882038d4b2461bda2f8fc279d856a7cc (diff) |
Use DTTOIF instead of implementing DirectoryTypeToFileType
Diffstat (limited to 'src')
-rw-r--r-- | src/operations.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/operations.cc b/src/operations.cc index 021f447..c799322 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -49,24 +49,7 @@ Directory* FileInfoDirectory(fuse_file_info* const file_info) { } mode_t DirectoryTypeToFileType(const unsigned char type) { - switch (type) { - case DT_BLK: - return S_IFBLK; - case DT_CHR: - return S_IFCHR; - case DT_DIR: - return S_IFDIR; - case DT_FIFO: - return S_IFIFO; - case DT_LNK: - return S_IFLNK; - case DT_REG: - return S_IFREG; - case DT_SOCK: - return S_IFSOCK; - default: - return 0; - } + return static_cast<mode_t>(DTTOIF(type)); } void* Initialize(fuse_conn_info*) { |