summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-12-13 11:24:09 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-12-13 11:26:17 +1100
commit95ec722a057b3ebb44699af16ea68ca0dffef50e (patch)
tree39bf178ae40aba39f9b43bbc6cd68c09d4d0a648 /lib
parent35ec247ac2dc4611cd3c9e99e0fcea0cf0d97415 (diff)
downloadtalos-petitboot-95ec722a057b3ebb44699af16ea68ca0dffef50e.zip
talos-petitboot-95ec722a057b3ebb44699af16ea68ca0dffef50e.tar.gz
ui/ncurses: Add option to clear IPMI boot mailbox
If there is an IPMI boot mailbox configuration present display a message in the System Configuration screen and provide the option to clear the mailbox. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/pb-config/pb-config.c1
-rw-r--r--lib/pb-protocol/pb-protocol.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c
index 7fa925c..a802c92 100644
--- a/lib/pb-config/pb-config.c
+++ b/lib/pb-config/pb-config.c
@@ -83,6 +83,7 @@ struct config *config_copy(void *ctx, const struct config *src)
dest->ipmi_bootdev = src->ipmi_bootdev;
dest->ipmi_bootdev_persistent = src->ipmi_bootdev_persistent;
+ dest->ipmi_bootdev_mailbox = src->ipmi_bootdev_mailbox;
dest->allow_writes = src->allow_writes;
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index d8771fc..b4138bb 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -324,6 +324,7 @@ int pb_protocol_config_len(const struct config *config)
}
len += 4 + 4; /* ipmi_bootdev, ipmi_bootdev_persistent */
+ len += 4; /* ipmi_bootdev_mailbox */
len += 4; /* allow_writes */
@@ -646,6 +647,8 @@ int pb_protocol_serialise_config(const struct config *config,
pos += 4;
*(uint32_t *)pos = config->ipmi_bootdev_persistent;
pos += 4;
+ *(uint32_t *)pos = config->ipmi_bootdev_mailbox;
+ pos += 4;
*(uint32_t *)pos = config->allow_writes;
pos += 4;
@@ -1277,6 +1280,9 @@ int pb_protocol_deserialise_config(struct config *config,
if (read_u32(&pos, &len, &tmp))
goto out;
config->ipmi_bootdev_persistent = !!tmp;
+ if (read_u32(&pos, &len, &tmp))
+ goto out;
+ config->ipmi_bootdev_mailbox = !!tmp;
if (read_u32(&pos, &len, &tmp))
goto out;
OpenPOWER on IntegriCloud