From owner-p4-projects@FreeBSD.ORG Thu Jul 30 17:55:57 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 30F001065673; Thu, 30 Jul 2009 17:55:57 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3D3D106564A for ; Thu, 30 Jul 2009 17:55:56 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B79478FC0A for ; Thu, 30 Jul 2009 17:55:56 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6UHtuDw000440 for ; Thu, 30 Jul 2009 17:55:56 GMT (envelope-from truncs@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6UHtuBN000438 for perforce@freebsd.org; Thu, 30 Jul 2009 17:55:56 GMT (envelope-from truncs@FreeBSD.org) Date: Thu, 30 Jul 2009 17:55:56 GMT Message-Id: <200907301755.n6UHtuBN000438@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to truncs@FreeBSD.org using -f From: Aditya Sarawgi To: Perforce Change Reviews Cc: Subject: PERFORCE change 166813 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 17:55:57 -0000 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 #include #include +#include #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 #include #include +#include static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *);