summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2011-10-27 21:56:53 -0700
committerGeoff Levand <geoff@infradead.org>2011-10-27 21:56:53 -0700
commit38646182c4edae5df911f78aa75324550dac0596 (patch)
tree5a3997b9b023d0eab0b1ccce1ff7af3ae1b2afe5
parent505cfd6fb4d5d8bcae5fa535098c9ccfe0c79daa (diff)
downloadtalos-petitboot-38646182c4edae5df911f78aa75324550dac0596.tar.gz
talos-petitboot-38646182c4edae5df911f78aa75324550dac0596.zip
Add n_options to struct device
-rw-r--r--lib/pb-protocol/pb-protocol.c2
-rw-r--r--lib/pb-protocol/pb-protocol.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index 6f278c8..a85b8a9 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -311,6 +311,8 @@ struct device *pb_protocol_deserialise_device(void *ctx,
n_options = __be32_to_cpu(*(uint32_t *)pos);
pos += sizeof(uint32_t);
+ dev->n_options = n_options;
+
list_init(&dev->boot_options);
for (i = 0; i < n_options; i++) {
diff --git a/lib/pb-protocol/pb-protocol.h b/lib/pb-protocol/pb-protocol.h
index 888e9b9..b2d57d2 100644
--- a/lib/pb-protocol/pb-protocol.h
+++ b/lib/pb-protocol/pb-protocol.h
@@ -28,6 +28,7 @@ struct device {
struct list boot_options;
+ int n_options;
void *ui_info;
};
OpenPOWER on IntegriCloud