diff --git a/lenses/mke2fs.aug b/lenses/mke2fs.aug index 72a07396e..af7d04b89 100644 --- a/lenses/mke2fs.aug +++ b/lenses/mke2fs.aug @@ -148,6 +148,28 @@ let fs_types = IniFile.record fs_types_title (fs_types_record | comment) +(************************************************************************ + * Group: OPTIONS SECTION + *************************************************************************) + +(* View: options_entries_int + Entries with an integer value *) +let options_entries_int = ("proceed_delay"|"sync_kludge") + +(* View: options_entry + Possible entries under the section *) +let options_entry = entry_sto options_entries_int Rx.integer + +(* View: defaults_title + Title for the section *) +let options_title = IniFile.title "options" + +(* View: options + A options section *) +let options = IniFile.record options_title + ((Util.indent . options_entry) | comment) + + (************************************************************************ * Group: LENS AND FILTER *************************************************************************) @@ -155,7 +177,7 @@ let fs_types = IniFile.record fs_types_title (* View: lns The mke2fs lens *) -let lns = (empty|comment)* . (defaults|fs_types)* +let lns = (empty|comment)* . (defaults|fs_types|options)* (* Variable: filter *) let filter = incl "/etc/mke2fs.conf" diff --git a/lenses/tests/test_mke2fs.aug b/lenses/tests/test_mke2fs.aug index 69c23b4ea..67dcfb20d 100644 --- a/lenses/tests/test_mke2fs.aug +++ b/lenses/tests/test_mke2fs.aug @@ -33,6 +33,10 @@ module Test_mke2fs = inode_ratio = 1048576 blocksize = -1 } + +[options] + proceed_delay = 1 + sync_kludge = 1 " test Mke2fs.lns get conf = @@ -74,7 +78,11 @@ module Test_mke2fs = { "inode_ratio" = "4096" } } { "filesystem" = "largefile" { "inode_ratio" = "1048576" } - { "blocksize" = "-1" } } } + { "blocksize" = "-1" } } + {} } + { "options" + { "proceed_delay" = "1" } + { "sync_kludge" = "1" } } test Mke2fs.common_entry