* commit '9c92cef4480cdb463605b4ab39fbaeb586659aba': Add init support for dm-verity logging mode
This commit is contained in:
commit
891ea4c05e
3 changed files with 19 additions and 0 deletions
|
@ -712,6 +712,20 @@ int do_sysclktz(int nargs, char **args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int do_verity_load_state(int nargs, char **args) {
|
||||
if (nargs == 1) {
|
||||
int mode = -1;
|
||||
int rc = fs_mgr_load_verity_state(&mode);
|
||||
|
||||
if (rc == 0 && mode == VERITY_MODE_LOGGING) {
|
||||
action_for_each_trigger("verity-logging", action_add_queue_tail);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int do_write(int nargs, char **args)
|
||||
{
|
||||
const char *path = args[1];
|
||||
|
|
|
@ -204,6 +204,9 @@ static int lookup_keyword(const char *s)
|
|||
case 'u':
|
||||
if (!strcmp(s, "ser")) return K_user;
|
||||
break;
|
||||
case 'v':
|
||||
if (!strcmp(s, "erity_load_state")) return K_verity_load_state;
|
||||
break;
|
||||
case 'w':
|
||||
if (!strcmp(s, "rite")) return K_write;
|
||||
if (!strcmp(s, "ait")) return K_wait;
|
||||
|
|
|
@ -41,6 +41,7 @@ int do_chmod(int nargs, char **args);
|
|||
int do_loglevel(int nargs, char **args);
|
||||
int do_load_persist_props(int nargs, char **args);
|
||||
int do_load_all_props(int nargs, char **args);
|
||||
int do_verity_load_state(int nargs, char **args);
|
||||
int do_wait(int nargs, char **args);
|
||||
#define __MAKE_KEYWORD_ENUM__
|
||||
#define KEYWORD(symbol, flags, nargs, func) K_##symbol,
|
||||
|
@ -97,6 +98,7 @@ enum {
|
|||
KEYWORD(symlink, COMMAND, 1, do_symlink)
|
||||
KEYWORD(sysclktz, COMMAND, 1, do_sysclktz)
|
||||
KEYWORD(user, OPTION, 0, 0)
|
||||
KEYWORD(verity_load_state, COMMAND, 0, do_verity_load_state)
|
||||
KEYWORD(wait, COMMAND, 1, do_wait)
|
||||
KEYWORD(write, COMMAND, 2, do_write)
|
||||
KEYWORD(copy, COMMAND, 2, do_copy)
|
||||
|
|
Loading…
Reference in a new issue