diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pb-config/pb-config.c | 1 | ||||
-rw-r--r-- | lib/pb-protocol/pb-protocol.c | 7 | ||||
-rw-r--r-- | lib/types/types.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c index 86f14c9..2f9af28 100644 --- a/lib/pb-config/pb-config.c +++ b/lib/pb-config/pb-config.c @@ -92,6 +92,7 @@ struct config *config_copy(void *ctx, const struct config *src) if (src->boot_console) dest->boot_console = talloc_strdup(dest, src->boot_console); + dest->manual_console = src->manual_console; if (src->lang && strlen(src->lang)) dest->lang = talloc_strdup(dest, src->lang); diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c index 0d83bde..47d04a3 100644 --- a/lib/pb-protocol/pb-protocol.c +++ b/lib/pb-protocol/pb-protocol.c @@ -323,6 +323,7 @@ int pb_protocol_config_len(const struct config *config) len += 4 + optional_strlen(config->consoles[i]); len += 4 + optional_strlen(config->boot_console); + len += 4; /* manual_console */ len += 4 + optional_strlen(config->lang); @@ -579,6 +580,8 @@ int pb_protocol_serialise_config(const struct config *config, pos += pb_protocol_serialise_string(pos, config->consoles[i]); pos += pb_protocol_serialise_string(pos, config->boot_console); + *(uint32_t *)pos = config->manual_console; + pos += 4; pos += pb_protocol_serialise_string(pos, config->lang); @@ -1124,6 +1127,10 @@ int pb_protocol_deserialise_config(struct config *config, config->boot_console = str; + if (read_u32(&pos, &len, &tmp)) + goto out; + config->manual_console = !!tmp; + if (read_string(config, &pos, &len, &str)) goto out; diff --git a/lib/types/types.h b/lib/types/types.h index b7430f4..31922d0 100644 --- a/lib/types/types.h +++ b/lib/types/types.h @@ -164,6 +164,7 @@ struct config { bool allow_writes; char *boot_console; + bool manual_console; char *lang; /* not user-settable */ |