Add option to link zlib statically
[project/make_ext4fs.git] / make_ext4fs.c
index d25dc0c..cb18161 100644 (file)
@@ -44,27 +44,6 @@ static int filter_dot(const struct dirent *d)
        return (strcmp(d->d_name, "..") && strcmp(d->d_name, "."));
 }
 
-static u32 build_default_directory_structure(const char *dir_path)
-{
-       u32 inode;
-       u32 root_inode;
-       struct dentry dentries = {
-                       .filename = "lost+found",
-                       .file_type = EXT4_FT_DIR,
-                       .mode = S_IRWXU,
-                       .uid = 0,
-                       .gid = 0,
-                       .mtime = 0,
-       };
-       root_inode = make_directory(0, 1, &dentries, 1);
-       inode = make_directory(root_inode, 0, NULL, 0);
-       *dentries.inode = inode;
-       inode_set_permissions(inode, dentries.mode,
-               dentries.uid, dentries.gid, dentries.mtime);
-
-       return root_inode;
-}
-
 /* Read a local directory and create the same tree in the generated filesystem.
    Calls itself recursively with each directory in the given directory.
    full_path is an absolute or relative path, with a trailing slash, to the
@@ -456,6 +435,7 @@ int make_ext4fs_internal(int fd, const char *_directory,
 
        printf("    Blocks: %"PRIu64"\n", aux_info.len_blocks);
        printf("    Block groups: %d\n", aux_info.groups);
+       printf("    Reserved blocks: %"PRIu64"\n",  (aux_info.len_blocks / 100) * info.reserve_pcnt);
        printf("    Reserved block group size: %d\n", info.bg_desc_reserve_blocks);
 
        ext4_sparse_file = sparse_file_new(info.block_size, info.len);