Commit b46c92d9 authored by Art Haas's avatar Art Haas Committed by David Woodhouse

[PATCH] C99 initializer for fs/ext2/dir.c

parent 082c5d06
......@@ -215,25 +215,25 @@ ext2_validate_entry(char *base, unsigned offset, unsigned mask)
}
static unsigned char ext2_filetype_table[EXT2_FT_MAX] = {
[EXT2_FT_UNKNOWN] DT_UNKNOWN,
[EXT2_FT_REG_FILE] DT_REG,
[EXT2_FT_DIR] DT_DIR,
[EXT2_FT_CHRDEV] DT_CHR,
[EXT2_FT_BLKDEV] DT_BLK,
[EXT2_FT_FIFO] DT_FIFO,
[EXT2_FT_SOCK] DT_SOCK,
[EXT2_FT_SYMLINK] DT_LNK,
[EXT2_FT_UNKNOWN] = DT_UNKNOWN,
[EXT2_FT_REG_FILE] = DT_REG,
[EXT2_FT_DIR] = DT_DIR,
[EXT2_FT_CHRDEV] = DT_CHR,
[EXT2_FT_BLKDEV] = DT_BLK,
[EXT2_FT_FIFO] = DT_FIFO,
[EXT2_FT_SOCK] = DT_SOCK,
[EXT2_FT_SYMLINK] = DT_LNK,
};
#define S_SHIFT 12
static unsigned char ext2_type_by_mode[S_IFMT >> S_SHIFT] = {
[S_IFREG >> S_SHIFT] EXT2_FT_REG_FILE,
[S_IFDIR >> S_SHIFT] EXT2_FT_DIR,
[S_IFCHR >> S_SHIFT] EXT2_FT_CHRDEV,
[S_IFBLK >> S_SHIFT] EXT2_FT_BLKDEV,
[S_IFIFO >> S_SHIFT] EXT2_FT_FIFO,
[S_IFSOCK >> S_SHIFT] EXT2_FT_SOCK,
[S_IFLNK >> S_SHIFT] EXT2_FT_SYMLINK,
[S_IFREG >> S_SHIFT] = EXT2_FT_REG_FILE,
[S_IFDIR >> S_SHIFT] = EXT2_FT_DIR,
[S_IFCHR >> S_SHIFT] = EXT2_FT_CHRDEV,
[S_IFBLK >> S_SHIFT] = EXT2_FT_BLKDEV,
[S_IFIFO >> S_SHIFT] = EXT2_FT_FIFO,
[S_IFSOCK >> S_SHIFT] = EXT2_FT_SOCK,
[S_IFLNK >> S_SHIFT] = EXT2_FT_SYMLINK,
};
static inline void ext2_set_de_type(ext2_dirent *de, struct inode *inode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment