diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-07-25 15:55:19 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-08-15 13:03:28 +1000 |
commit | 8b46ab92aeff52b7354bf4f250835f75b4bd824c (patch) | |
tree | c1ac2e919bcad45d5ad26c7fbd6ea57fc80c0fc6 /discover/event.c | |
parent | ff7293bba1fd4cdf54bb90bd1b7a38dd393fee69 (diff) | |
download | talos-petitboot-8b46ab92aeff52b7354bf4f250835f75b4bd824c.tar.gz talos-petitboot-8b46ab92aeff52b7354bf4f250835f75b4bd824c.zip |
discover: Add 'plugin' user-event
Add a new user event to advertise pb-plugins and add them to the
device_handler. Plugins described by this event can either be
uninstalled pb-plugin files or successfully installed pb-plugins
depending on the associated parameters.
The is primarily intended for use by the pb-plugin utility itself to
notify Petitboot as it operates on pb-plugin files.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/event.c')
-rw-r--r-- | discover/event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discover/event.c b/discover/event.c index 1be19eb..047e928 100644 --- a/discover/event.c +++ b/discover/event.c @@ -55,6 +55,8 @@ static int event_parse_ad_header(char *buf, int len, enum event_action *action, *action = EVENT_ACTION_BOOT; else if (streq(buf, "sync")) *action = EVENT_ACTION_SYNC; + else if (streq(buf, "plugin")) + *action = EVENT_ACTION_PLUGIN; else { pb_log("%s: unknown action: %s\n", __func__, buf); return -1; |