summaryrefslogtreecommitdiffstats
path: root/lib/pb-protocol/pb-protocol.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-03-08 17:04:21 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-04-16 11:41:43 +0800
commitb838cf777ed3d21b166f8daddd4b11fc75e07307 (patch)
tree198e3450af8561c3806bd82c30f2daa10566ef70 /lib/pb-protocol/pb-protocol.h
parent80c072a44cb665495afe08ce37cbf4f2086d5529 (diff)
downloadtalos-petitboot-b838cf777ed3d21b166f8daddd4b11fc75e07307.tar.gz
talos-petitboot-b838cf777ed3d21b166f8daddd4b11fc75e07307.zip
pb-protocol: Don't allocate in deserialise functions
Curently, the protocol deserialise functions are allocating device and boot_command structures. This (implicitly) makes them responsible for initialisation of these structures too. Rather that making the protocol responsible for initialising the devices and boot commands, this change gives the deserialise functions an argument to an already-instanciated structure. This means that the creation is no longer implied by the deserialise. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-protocol/pb-protocol.h')
-rw-r--r--lib/pb-protocol/pb-protocol.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pb-protocol/pb-protocol.h b/lib/pb-protocol/pb-protocol.h
index 6068f05..de2ae7c 100644
--- a/lib/pb-protocol/pb-protocol.h
+++ b/lib/pb-protocol/pb-protocol.h
@@ -47,10 +47,10 @@ struct pb_protocol_message *pb_protocol_create_message(void *ctx,
struct pb_protocol_message *pb_protocol_read_message(void *ctx, int fd);
-struct device *pb_protocol_deserialise_device(void *ctx,
+int pb_protocol_deserialise_device(struct device *dev,
const struct pb_protocol_message *message);
-struct boot_command *pb_protocol_deserialise_boot_command(void *ctx,
+int pb_protocol_deserialise_boot_command(struct boot_command *cmd,
const struct pb_protocol_message *message);
#endif /* _PB_PROTOCOL_H */
OpenPOWER on IntegriCloud