From: Theodore Ts'o Date: Thu, 10 Jul 2008 13:24:25 +0000 (-0400) Subject: mke2fs: Dumb down filesystems for GNU Hurd X-Git-Tag: v1.41.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5601e5b5dd733c23ca73f965d37d49547150ab;p=thirdparty%2Fe2fsprogs.git mke2fs: Dumb down filesystems for GNU Hurd 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" --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 352e66b02..960f67b19 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -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); } diff --git a/misc/mke2fs.conf b/misc/mke2fs.conf index ea6d7bf9a..2eb4352ab 100644 --- a/misc/mke2fs.conf +++ b/misc/mke2fs.conf @@ -38,3 +38,7 @@ inode_ratio = 4194304 blocksize = -1 } + hurd = { + blocksize = 4096 + inode_size = 128 + }