diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/param_list/param_list.c | 1 | ||||
-rw-r--r-- | lib/pb-protocol/pb-protocol.c | 9 | ||||
-rw-r--r-- | lib/types/types.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/param_list/param_list.c b/lib/param_list/param_list.c index 9a01be6..9dc3228 100644 --- a/lib/param_list/param_list.c +++ b/lib/param_list/param_list.c @@ -23,6 +23,7 @@ const char **common_known_params(void) "petitboot,http_proxy", "petitboot,https_proxy", "petitboot,password", + "petitboot,preboot-check", NULL, }; diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c index 06c81f2..aff1946 100644 --- a/lib/pb-protocol/pb-protocol.c +++ b/lib/pb-protocol/pb-protocol.c @@ -344,6 +344,8 @@ int pb_protocol_config_len(const struct config *config) len += 4 + optional_strlen(config->lang); + len += 4; /* preboot check */ + return len; } @@ -677,6 +679,9 @@ int pb_protocol_serialise_config(const struct config *config, pos += pb_protocol_serialise_string(pos, config->lang); + *(uint32_t *)pos = config->preboot_check_enabled; + pos += 4; + assert(pos <= buf + buf_len); return (pos <= buf + buf_len) ? 0 : -1; @@ -1335,6 +1340,10 @@ int pb_protocol_deserialise_config(struct config *config, config->lang = str; + if (read_u32(&pos, &len, &tmp)) + goto out; + config->preboot_check_enabled = !!tmp; + rc = 0; out: diff --git a/lib/types/types.h b/lib/types/types.h index c923d93..8018fde 100644 --- a/lib/types/types.h +++ b/lib/types/types.h @@ -187,6 +187,8 @@ struct config { unsigned int autoboot_timeout_sec; struct network_config network; + bool preboot_check_enabled; + struct autoboot_option *autoboot_opts; unsigned int n_autoboot_opts; |