Whamcloud - gitweb
mke2fs: Dumb down filesystems for GNU Hurd
authorTheodore Ts'o <tytso@mit.edu>
Thu, 10 Jul 2008 13:24:25 +0000 (09:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 10 Jul 2008 13:31:34 +0000 (09:31 -0400)
The Hurd only supports filesystems with a blocksize of 4096 bytes, and
128 byte inodes.  It also doesn't understand the journal.  So force
the defaults to be something which the Hurd can handle if "-o hurd" is
specified on the command line.

Addresses-Debian-Bug: #471977

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c
misc/mke2fs.conf

index 352e66b..960f67b 100644 (file)
@@ -927,12 +927,19 @@ static char **parse_fs_type(const char *fs_type,
        const char      *size_type;
        struct str_list list;
        unsigned long   meg;
+       int             is_hurd = 0;
 
        if (init_list(&list))
                return 0;
 
+       if (creator_os && (!strcasecmp(creator_os, "GNU") ||
+                          !strcasecmp(creator_os, "hurd")))
+               is_hurd = 1;
+
        if (fs_type)
                ext_type = fs_type;
+       else if (is_hurd)
+               ext_type = "ext2";
        else if (progname) {
                ext_type = strrchr(progname, '/');
                if (ext_type)
@@ -997,6 +1004,8 @@ static char **parse_fs_type(const char *fs_type,
        free(parse_str);
        if (profile_type)
                free(profile_type);
+       if (is_hurd)
+               push_string(&list, "hurd");
        return (list.list);
 }
 
index ea6d7bf..2eb4352 100644 (file)
@@ -38,3 +38,7 @@
                inode_ratio = 4194304
                blocksize = -1
        }
+       hurd = {
+            blocksize = 4096
+            inode_size = 128
+       }