lost+found is always created and always has been, do the ifdefs need to
stick around?
--
Carlin
Index: sbin/newfs_ext2fs/mke2fs.c
===================================================================
RCS file: /cvs/src/sbin/newfs_ext2fs/mke2fs.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 mke2fs.c
--- sbin/newfs_ext2fs/mke2fs.c 14 Mar 2016 20:30:34 -0000 1.16
+++ sbin/newfs_ext2fs/mke2fs.c 7 Mar 2017 12:20:26 -0000
@@ -853,39 +853,26 @@ cgoverhead(uint c)
* Initialize the file system
*/
-#define LOSTDIR /* e2fsck complains if there is no lost+found */
-
#define PREDEFDIR 2
-
-#ifdef LOSTDIR
#define PREDEFROOTDIR (PREDEFDIR + 1)
-#else
-#define PREDEFROOTDIR PREDEFDIR
-#endif
struct ext2fs_direct root_dir[] = {
{ EXT2_ROOTINO, 0, 1, 0, "." },
{ EXT2_ROOTINO, 0, 2, 0, ".." },
-#ifdef LOSTDIR
{ EXT2_LOSTFOUNDINO, 0, 10, 0, "lost+found" },
-#endif
};
-#ifdef LOSTDIR
struct ext2fs_direct lost_found_dir[] = {
{ EXT2_LOSTFOUNDINO, 0, 1, 0, "." },
{ EXT2_ROOTINO, 0, 2, 0, ".." },
};
struct ext2fs_direct pad_dir = { 0, sizeof(struct ext2fs_direct), 0, 0, "" };
-#endif
int
fsinit(const struct timeval *tv)
{
struct ext2fs_dinode node;
-#ifdef LOSTDIR
uint i, nblks_lostfound, blk;
-#endif
/*
* Initialize the inode for the resizefs feature
@@ -898,7 +885,6 @@ fsinit(const struct timeval *tv)
* Initialize the node
*/
-#ifdef LOSTDIR
/*
* Create the lost+found directory
*/
@@ -949,7 +935,7 @@ fsinit(const struct timeval *tv)
buf);
}
iput(&node, EXT2_LOSTFOUNDINO);
-#endif
+
/*
* create the root directory
*/
@@ -958,9 +944,7 @@ fsinit(const struct timeval *tv)
sblock.e2fs.e2fs_features_incompat & EXT2F_INCOMPAT_FTYPE) {
root_dir[0].e2d_type = EXT2_FT_DIR;
root_dir[1].e2d_type = EXT2_FT_DIR;
-#ifdef LOSTDIR
root_dir[2].e2d_type = EXT2_FT_DIR;
-#endif
}
node.e2di_mode = EXT2_IFDIR | EXT2_UMASK;
node.e2di_uid_low = geteuid();