summaryrefslogtreecommitdiffstats
path: root/lib/pb-protocol
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-04-30 10:58:43 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-21 17:20:08 +0800
commit1860aac29624b1cb292a7ca549dc063bcd3f9bb6 (patch)
treee26898762a34d66219fcfbbadb9e0a5865fa493b /lib/pb-protocol
parente19c5fe83174de749843bb8486a0d12c25adcb82 (diff)
downloadtalos-petitboot-1860aac29624b1cb292a7ca549dc063bcd3f9bb6.tar.gz
talos-petitboot-1860aac29624b1cb292a7ca549dc063bcd3f9bb6.zip
discover: check config.boot_device before setting a default
If a default device is set, we only allow booting from that device. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-protocol')
-rw-r--r--lib/pb-protocol/pb-protocol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index 4a5c75a..67e1f9e 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -281,6 +281,8 @@ int pb_protocol_config_len(const struct config *config)
len += 4;
len += config->n_boot_priorities * 8;
+ len += 4 + optional_strlen(config->boot_device);
+
return len;
}
OpenPOWER on IntegriCloud