Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few improvements to the Mke2fs lens #642

Merged
merged 4 commits into from
Aug 20, 2019

Conversation

ptoscano
Copy link
Contributor

  • parse more common entries between [defaults] and the tags in [fs_types]
  • fix the type of few entries
  • handle the [options] stanza

@@ -34,6 +34,11 @@ let sep = IniFile.sep /=[ \t]*/ "="
(* View: empty *)
let empty = IniFile.empty

(* View: boolean value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be View: boolean for the doc to be properly generated

@@ -95,24 +130,12 @@ let defaults = IniFile.record defaults_title
* Group: FS_TYPES SECTION
*************************************************************************)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for reorganizing these entries under common?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean all the content of fs_types_entry? As I wrote in the commit message, the documentation says that they are allowed both in [defaults], and for each tag in [fs_types]. Since common_entry represents exactly this, then this is why they were moved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, sorry I missed that!

Add a proper regexp to represent them, according to the mke2fs.conf(5)
documentation.  Fix the lazy_itable_init, and auto_64-bit_support keys
of fs_types to use this regexp, as they are parsed as boolean.
According to the mke2fs.conf(5) documentation, all the entries that
appear in the various tags in the [fs_types] stanza may be used also in
the [default] section; hence:
- fold fs_types_entry into common_entry
- move almost all the options (except fs_type, and undo_dir) from
  defaults_entry to common_entry
so the options apply to both cases.

Also, in an attempt to make the list of options slightly maintainable,
add few lists with names of options with common types (list, int, bool).
Add more common entries for the [defaults] stanza, or inside a
[fs_types] tag, fixing the types to match documentation/code.

This does not cover all the possible entries available though.
Handle the two documented tags of it.
@ptoscano ptoscano force-pushed the mke2fs-improvements branch from 82d0352 to 8a19daa Compare August 19, 2019 09:58
@raphink raphink merged commit 4428266 into hercules-team:master Aug 20, 2019
@ptoscano ptoscano deleted the mke2fs-improvements branch August 20, 2019 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants