mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 18:06:56 +02:00
Kernel/Ext2FS: Make to_ext2_file_type a static member of Ext2FSInode
This commit is contained in:
committed by
Nico Weber
parent
14d216e819
commit
666ba3b970
@@ -19,21 +19,21 @@ namespace Kernel {
|
||||
|
||||
static constexpr size_t max_inline_symlink_length = 60;
|
||||
|
||||
static u8 to_ext2_file_type(mode_t mode)
|
||||
u8 Ext2FSInode::to_ext2_file_type(mode_t mode)
|
||||
{
|
||||
if (is_regular_file(mode))
|
||||
if (Kernel::is_regular_file(mode))
|
||||
return EXT2_FT_REG_FILE;
|
||||
if (is_directory(mode))
|
||||
if (Kernel::is_directory(mode))
|
||||
return EXT2_FT_DIR;
|
||||
if (is_character_device(mode))
|
||||
if (Kernel::is_character_device(mode))
|
||||
return EXT2_FT_CHRDEV;
|
||||
if (is_block_device(mode))
|
||||
if (Kernel::is_block_device(mode))
|
||||
return EXT2_FT_BLKDEV;
|
||||
if (is_fifo(mode))
|
||||
if (Kernel::is_fifo(mode))
|
||||
return EXT2_FT_FIFO;
|
||||
if (is_socket(mode))
|
||||
if (Kernel::is_socket(mode))
|
||||
return EXT2_FT_SOCK;
|
||||
if (is_symlink(mode))
|
||||
if (Kernel::is_symlink(mode))
|
||||
return EXT2_FT_SYMLINK;
|
||||
return EXT2_FT_UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user