Module Name: src Committed By: dholland Date: Sat Jun 8 02:15:12 UTC 2013
Modified Files: src/sys/ufs/lfs: lfs.h ulfs_dinode.h ulfs_dir.h Log Message: Move more symbols to lfs.h: LFS_DIRBLKSIZ LFS_DIRECTSIZ LFS_DIRSIZ LFS_OLDDIRFMT LFS_NEWDIRFMT LFS_IFTODT LFS_DTTOIF ULFS{,1,2}_MAXSYMLINKLEN To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/ufs/lfs/lfs.h cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/lfs/ulfs_dinode.h cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/lfs/ulfs_dir.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/lfs/lfs.h diff -u src/sys/ufs/lfs/lfs.h:1.146 src/sys/ufs/lfs/lfs.h:1.147 --- src/sys/ufs/lfs/lfs.h:1.146 Sat Jun 8 02:14:46 2013 +++ src/sys/ufs/lfs/lfs.h Sat Jun 8 02:15:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs.h,v 1.146 2013/06/08 02:14:46 dholland Exp $ */ +/* $NetBSD: lfs.h,v 1.147 2013/06/08 02:15:12 dholland Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -258,6 +258,10 @@ typedef struct lfs_res_blk { LFS_DIRECTSIZ((dp)->d_type) : LFS_DIRECTSIZ((dp)->d_namlen)) #endif +/* Constants for the first argument of LFS_DIRSIZ */ +#define LFS_OLDDIRFMT 1 +#define LFS_NEWDIRFMT 0 + /* * Theoretically, directories can be more than 2Gb in length; however, in * practice this seems unlikely. So, we define the type doff_t as a 32-bit @@ -415,6 +419,16 @@ struct ulfs2_dinode { #define LFS_IFWHT 0160000 /* Whiteout. */ /* + * Maximum length of a symlink that can be stored within the inode. + */ +#define ULFS1_MAXSYMLINKLEN ((ULFS_NDADDR + ULFS_NIADDR) * sizeof(int32_t)) +#define ULFS2_MAXSYMLINKLEN ((ULFS_NDADDR + ULFS_NIADDR) * sizeof(int64_t)) + +#define ULFS_MAXSYMLINKLEN(ip) \ + ((ip)->i_ump->um_fstype == ULFS1) ? \ + ULFS1_MAXSYMLINKLEN : ULFS2_MAXSYMLINKLEN + +/* * "struct buf" associated definitions */ Index: src/sys/ufs/lfs/ulfs_dinode.h diff -u src/sys/ufs/lfs/ulfs_dinode.h:1.9 src/sys/ufs/lfs/ulfs_dinode.h:1.10 --- src/sys/ufs/lfs/ulfs_dinode.h:1.9 Sat Jun 8 02:13:33 2013 +++ src/sys/ufs/lfs/ulfs_dinode.h Sat Jun 8 02:15:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_dinode.h,v 1.9 2013/06/08 02:13:33 dholland Exp $ */ +/* $NetBSD: ulfs_dinode.h,v 1.10 2013/06/08 02:15:12 dholland Exp $ */ /* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */ /* @@ -55,16 +55,6 @@ #include <ufs/lfs/lfs.h> -/* - * Maximum length of a symlink that can be stored within the inode. - */ -#define ULFS1_MAXSYMLINKLEN ((ULFS_NDADDR + ULFS_NIADDR) * sizeof(int32_t)) -#define ULFS2_MAXSYMLINKLEN ((ULFS_NDADDR + ULFS_NIADDR) * sizeof(int64_t)) - -#define ULFS_MAXSYMLINKLEN(ip) \ - ((ip)->i_ump->um_fstype == ULFS1) ? \ - ULFS1_MAXSYMLINKLEN : ULFS2_MAXSYMLINKLEN - /* File permissions. */ #define IEXEC 0000100 /* Executable. */ #define IWRITE 0000200 /* Writable. */ Index: src/sys/ufs/lfs/ulfs_dir.h diff -u src/sys/ufs/lfs/ulfs_dir.h:1.7 src/sys/ufs/lfs/ulfs_dir.h:1.8 --- src/sys/ufs/lfs/ulfs_dir.h:1.7 Sat Jun 8 02:14:46 2013 +++ src/sys/ufs/lfs/ulfs_dir.h Sat Jun 8 02:15:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_dir.h,v 1.7 2013/06/08 02:14:46 dholland Exp $ */ +/* $NetBSD: ulfs_dir.h,v 1.8 2013/06/08 02:15:12 dholland Exp $ */ /* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */ /* @@ -40,7 +40,4 @@ #ifndef _UFS_LFS_ULFS_DIR_H_ #define _UFS_LFS_ULFS_DIR_H_ -#define LFS_OLDDIRFMT 1 -#define LFS_NEWDIRFMT 0 - #endif /* !_UFS_LFS_ULFS_DIR_H_ */