mke2fs: allow the default creator os to be specified in /etc/mke2fs.conf

This is useful for keeping the regression test results consistent
when run on non-Linux systems, especially on GNU Hurd.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index effe963..04b2fbc 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2048,6 +2048,9 @@
 	if (!usage_types)
 		profile_get_string(profile, "devices", device_name,
 				   "usage_types", 0, &usage_types);
+	if (!creator_os)
+		profile_get_string(profile, "defaults", "creator_os", 0,
+				   0, &creator_os);
 
 	/*
 	 * We have the file system (or device) size, so we can now
diff --git a/misc/mke2fs.conf.5.in b/misc/mke2fs.conf.5.in
index 0b57030..c67128a 100644
--- a/misc/mke2fs.conf.5.in
+++ b/misc/mke2fs.conf.5.in
@@ -118,6 +118,13 @@
 .I [defaults]
 stanza.
 .TP
+.I creator_os
+This relation specifies the "creator operating system" for the
+file system unless it is overriden on the command line.
+The default value is the OS for which the
+.B mke2fs
+executable was compiled.
+.TP
 .I fs_type
 This relation specifies the default filesystem type if the user does not
 specify it via the
diff --git a/tests/mke2fs.conf.in b/tests/mke2fs.conf.in
index 46577f5..9075c6c 100644
--- a/tests/mke2fs.conf.in
+++ b/tests/mke2fs.conf.in
@@ -8,6 +8,7 @@
 	lazy_itable_init = false
 	no_discard = true
 	default_mntopts = ^acl
+	creator_os = Linux
 
 [fs_types]
 	ext3 = {