diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-02-14 15:56:55 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-15 11:40:09 +1000 |
commit | 98b04aa42a4f1dc8e585f00d75c3b28d9e9aa2a9 (patch) | |
tree | 5d87ea583c6d8c5a8b92628c611ac417ddd272be /lib/pb-protocol/pb-protocol.h | |
parent | 4974b691020cca86ce6c7f1f62c7c3fee4f52c61 (diff) | |
download | talos-petitboot-98b04aa42a4f1dc8e585f00d75c3b28d9e9aa2a9.tar.gz talos-petitboot-98b04aa42a4f1dc8e585f00d75c3b28d9e9aa2a9.zip |
lib: Add plugin_option type and protocol
Add a new struct 'plugin_option' to represent pb-plugins that are
installed on the system. This consists of plugin metadata and an array
of installed executables.
This also adds two new pb-protocol actions to advertise the addition of
a new plugin_option, and to remove known plugin_options.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib/pb-protocol/pb-protocol.h')
-rw-r--r-- | lib/pb-protocol/pb-protocol.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pb-protocol/pb-protocol.h b/lib/pb-protocol/pb-protocol.h index a8cd206..ce876d0 100644 --- a/lib/pb-protocol/pb-protocol.h +++ b/lib/pb-protocol/pb-protocol.h @@ -23,6 +23,8 @@ enum pb_protocol_action { PB_PROTOCOL_ACTION_CONFIG = 0x9, PB_PROTOCOL_ACTION_REINIT = 0xa, PB_PROTOCOL_ACTION_ADD_URL = 0xb, + PB_PROTOCOL_ACTION_PLUGIN_OPTION_ADD = 0xc, + PB_PROTOCOL_ACTION_PLUGINS_REMOVE = 0xd, }; struct pb_protocol_message { @@ -40,6 +42,7 @@ int pb_protocol_boot_status_len(const struct status *status); int pb_protocol_system_info_len(const struct system_info *sysinfo); int pb_protocol_config_len(const struct config *config); int pb_protocol_url_len(const char *url); +int pb_protocol_plugin_option_len(const struct plugin_option *opt); int pb_protocol_device_cmp(const struct device *a, const struct device *b); int pb_protocol_boot_option_cmp(const struct boot_option *a, @@ -62,6 +65,8 @@ int pb_protocol_serialise_system_info(const struct system_info *sysinfo, int pb_protocol_serialise_config(const struct config *config, char *buf, int buf_len); int pb_protocol_serialise_url(const char *url, char *buf, int buf_len); +int pb_protocol_serialise_plugin_option(const struct plugin_option *opt, + char *buf, int buf_len); int pb_protocol_write_message(int fd, struct pb_protocol_message *message); @@ -87,4 +92,7 @@ int pb_protocol_deserialise_system_info(struct system_info *sysinfo, int pb_protocol_deserialise_config(struct config *config, const struct pb_protocol_message *message); + +int pb_protocol_deserialise_plugin_option(struct plugin_option *opt, + const struct pb_protocol_message *message); #endif /* _PB_PROTOCOL_H */ |