diff options
Diffstat (limited to 'lib/pb-protocol/pb-protocol.c')
-rw-r--r-- | lib/pb-protocol/pb-protocol.c | 9 |
1 files changed, 9 insertions, 0 deletions
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: |