@@ -316,6 +316,8 @@ int pb_protocol_config_len(const struct config *config)
len += 4; /* allow_writes */
+ len += 4; /* kexec_method */
+
len += 4; /* n_tty */
for (i = 0; i < config->n_tty; i++)
len += 4 + optional_strlen(config->tty_list[i]);
@@ -568,6 +570,9 @@ int pb_protocol_serialise_config(const struct config *config,
*(uint32_t *)pos = config->allow_writes;
pos += 4;
+ *(uint32_t *)pos = config->kexec_method;
+ pos += 4;
+
*(uint32_t *)pos = __cpu_to_be32(config->n_tty);
pos += 4;
for (i = 0; i < config->n_tty; i++)
@@ -1100,6 +1105,10 @@ int pb_protocol_deserialise_config(struct config *config,
goto out;
config->allow_writes = !!tmp;
+ if (read_u32(&pos, &len, &tmp))
+ goto out;
+ config->kexec_method = !!tmp;
+
if (read_u32(&pos, &len, &config->n_tty))
goto out;
@@ -162,6 +162,8 @@ struct config {
bool allow_writes;
+ bool kexec_method;
+
char *boot_tty;
char *lang;
Currently, pb-discover only supports one method (syscall) for loading the next kernel for kexec: kexec_load. This patch adds a system configuration option for toggling between using kexec_load (false), and kexec_file_load (true). This will be used in subsequent patches for determining the argument to kexec-lite/kexec-tools, and modified by a menu option. Signed-off-by: Eric Richter <erichte@linux.vnet.ibm.com> --- lib/pb-protocol/pb-protocol.c | 9 +++++++++ lib/types/types.h | 2 ++ 2 files changed, 11 insertions(+)