Date: Thu, 30 Jul 2009 17:55:56 GMT From: Aditya Sarawgi <truncs@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166813 for review Message-ID: <200907301755.n6UHtuBN000438@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166813 Change 166813 by truncs@aditya on 2009/07/30 17:55:04 Moving dir structures of ext2fs to new header to make the code more organized. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_dir.h#1 add .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#30 edit .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_lookup.c#8 edit .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#12 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#30 (text+ko) ==== @@ -401,53 +401,4 @@ #define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */ #define E2FS_ERRORS 0x0002 /* Errors detected */ -/* - * Structure of a directory entry - */ -#define EXT2FS_MAXNAMLEN 255 - -struct ext2fs_direct { - u_int32_t e2d_ino; /* inode number of entry */ - u_int16_t e2d_reclen; /* length of this record */ - u_int16_t e2d_namlen; /* length of string in d_name */ - char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ -}; -/* - * The new version of the directory entry. Since EXT2 structures are - * stored in intel byte order, and the name_len field could never be - * bigger than 255 chars, it's safe to reclaim the extra byte for the - * file_type field. - */ -struct ext2fs_direct_2 { - u_int32_t e2d_ino; /* inode number of entry */ - u_int16_t e2d_reclen; /* length of this record */ - u_int8_t e2d_namlen; /* length of string in d_name */ - u_int8_t e2d_type; /* file type */ - char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ -}; -/* - * Ext2 directory file types. Only the low 3 bits are used. The - * other bits are reserved for now. - */ -#define EXT2_FT_UNKNOWN 0 -#define EXT2_FT_REG_FILE 1 -#define EXT2_FT_DIR 2 -#define EXT2_FT_CHRDEV 3 -#define EXT2_FT_BLKDEV 4 -#define EXT2_FT_FIFO 5 -#define EXT2_FT_SOCK 6 -#define EXT2_FT_SYMLINK 7 - -#define EXT2_FT_MAX 8 - -/* - * EXT2_DIR_PAD defines the directory entries boundaries - * - * NOTE: It must be a multiple of 4 - */ -#define EXT2_DIR_PAD 4 -#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) -#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \ - ~EXT2_DIR_ROUND) - #endif /* _LINUX_EXT2_FS_H */ ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_lookup.c#8 (text+ko) ==== @@ -59,6 +59,7 @@ #include <gnu/fs/ext2fs/ext2_mount.h> #include <gnu/fs/ext2fs/ext2_extern.h> #include <gnu/fs/ext2fs/ext2_fs.h> +#include <gnu/fs/ext2fs/ext2_dir.h> #ifdef DIAGNOSTIC static int dirchk = 1; ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#12 (text+ko) ==== @@ -79,6 +79,7 @@ #include <gnu/fs/ext2fs/fs.h> #include <gnu/fs/ext2fs/ext2_extern.h> #include <gnu/fs/ext2fs/ext2_fs.h> +#include <gnu/fs/ext2fs/ext2_dir.h> static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907301755.n6UHtuBN000438>
