bool nortalign;
};
+/*
+ * File configuration type settings
+ *
+ * These are the different possibilities by which you can end up parsing
+ * default settings with. DEFAULTS_BUILTIN indicates there was no configuration
+ * file parsed and we are using the built-in defaults on this code.
+ */
+enum default_params_type {
+ DEFAULTS_BUILTIN = 0,
+};
+
/*
* Default filesystem features and configuration values
*
* calculations.
*/
struct mkfs_default_params {
- char *source; /* where the defaults came from */
+ enum default_params_type type; /* where the defaults came from */
int sectorsize;
int blocksize;
struct fsxattr fsx;
};
+static inline const char *default_type_str(enum default_params_type type)
+{
+ switch (type) {
+ case DEFAULTS_BUILTIN:
+ return _("package built-in definitions");
+ }
+ return _("Unkown\n");
+}
+
#endif /* _XFS_MKFS_CONFIG_H */
/* build time defaults */
struct mkfs_default_params dft = {
- .source = _("package build definitions"),
+ .type = DEFAULTS_BUILTIN,
.sectorsize = XFS_MIN_SECTORSIZE,
.blocksize = 1 << XFS_DFL_BLOCKSIZE_LOG,
.sb_feat = {
* implemented, emit a message to indicate where the defaults being
* used came from.
*
- * printf(_("Default configuration sourced from %s\n"), dft.source);
+ * printf(_("Default configuration sourced from %s\n"),
+ * default_type_str(dft.type));
*/
/* copy new defaults into CLI parsing structure */