summaryrefslogtreecommitdiffstats
path: root/lib/pb-protocol
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-07-25 09:49:37 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-28 13:50:36 +0800
commit37bece9c6354e8857dc3001d6fd245d8a733ef28 (patch)
tree3657a219063540a14a56969fccd6fbad165a9036 /lib/pb-protocol
parent24a530d0b58f57f151ee6d3df9f747ae98ef759f (diff)
downloadpetitboot-37bece9c6354e8857dc3001d6fd245d8a733ef28.zip
petitboot-37bece9c6354e8857dc3001d6fd245d8a733ef28.tar.gz
config: Add lang member to config
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-protocol')
-rw-r--r--lib/pb-protocol/pb-protocol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index d39c1c4..c184719 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -284,6 +284,8 @@ int pb_protocol_config_len(const struct config *config)
len += 4 + optional_strlen(config->boot_device);
+ len += 4 + optional_strlen(config->lang);
+
return len;
}
@@ -480,6 +482,8 @@ int pb_protocol_serialise_config(const struct config *config,
pos += pb_protocol_serialise_string(pos, config->boot_device);
+ pos += pb_protocol_serialise_string(pos, config->lang);
+
assert(pos <= buf + buf_len);
(void)buf_len;
@@ -915,6 +919,11 @@ int pb_protocol_deserialise_config(struct config *config,
config->boot_device = str;
+ if (read_string(config, &pos, &len, &str))
+ goto out;
+
+ config->lang = str;
+
rc = 0;
out:
OpenPOWER on IntegriCloud