diff options
Diffstat (limited to 'src/integritysetup')
-rw-r--r-- | src/integritysetup/integrity-util.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/integritysetup/integrity-util.c b/src/integritysetup/integrity-util.c index 66f93e7d2e..c29d4fcd5d 100644 --- a/src/integritysetup/integrity-util.c +++ b/src/integritysetup/integrity-util.c @@ -34,9 +34,22 @@ int parse_integrity_options( else if (streq(word, "allow-discards")) { if (ret_activate_flags) *ret_activate_flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS; - } else if (streq(word, "no-journal")) { - if (ret_activate_flags) - *ret_activate_flags |= CRYPT_ACTIVATE_NO_JOURNAL; + } else if ((val = startswith(word, "mode="))) { + if (streq(val, "journal")) { + if (ret_activate_flags) + *ret_activate_flags &= ~(CRYPT_ACTIVATE_NO_JOURNAL | CRYPT_ACTIVATE_NO_JOURNAL_BITMAP); + } else if (streq(val, "bitmap")) { + if (ret_activate_flags) { + *ret_activate_flags &= ~CRYPT_ACTIVATE_NO_JOURNAL; + *ret_activate_flags |= CRYPT_ACTIVATE_NO_JOURNAL_BITMAP; + } + } else if (streq(val, "direct")) { + if (ret_activate_flags) { + *ret_activate_flags |= CRYPT_ACTIVATE_NO_JOURNAL; + *ret_activate_flags &= ~CRYPT_ACTIVATE_NO_JOURNAL_BITMAP; + } + } else + log_warning("Encountered unknown mode option '%s', ignoring.", val); } else if ((val = startswith(word, "journal-watermark="))) { r = parse_percent(val); if (r < 0) |