diff options
author | Dave Barach <dave@barachs.net> | 2019-07-09 14:22:21 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-07-10 18:00:59 +0000 |
commit | e5a7d597782a8fc10819607e21a0d5a901343cf9 (patch) | |
tree | 2b70586a56c080fef46ead2cda998b34eee7b0c3 | |
parent | 33fa710ec9e7a69a67b29563a9ca57384b11258e (diff) |
emacs: update the vat plugin generator
Use the VAT_PLUGIN_REGISTER macro.
Type: refactor
Change-Id: I5ab9f311028c07a37a40cc1328d9724f852783ee
Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r-- | MAINTAINERS | 5 | ||||
-rw-r--r-- | extras/emacs/plugin-test-skel.el | 18 |
2 files changed, 6 insertions, 17 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 4bcd82ee0dd..d9109ed48b0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -385,6 +385,11 @@ I: vpp M: Dave Barach <dave@barachs.net> F: src/vpp/ +Emacs templates +I: emacs +M: Dave Barach <dave@barachs.net> +F: extras/emacs/ + Graphical Event Viewer I: g2 M: Dave Barach <dave@barachs.net> diff --git a/extras/emacs/plugin-test-skel.el b/extras/emacs/plugin-test-skel.el index 6357a3d7d4d..42962acf2b7 100644 --- a/extras/emacs/plugin-test-skel.el +++ b/extras/emacs/plugin-test-skel.el @@ -185,24 +185,8 @@ static void " plugin-name "_api_hookup (vat_main_t *vam) #undef _ } -clib_error_t * vat_plugin_register (vat_main_t *vam) -{ - " plugin-name "_test_main_t * " main-p " = &" plugin-name "_test_main; - u8 * name; - - " main-p "->vat_main = vam; - - /* Ask the vpp engine for the first assigned message-id */ - name = format (0, \"" plugin-name "_%08x%c\", api_version, 0); - " main-p "->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name); +VAT_PLUGIN_REGISTER(" plugin-name"); - if (" main-p "->msg_id_base != (u16) ~0) - " plugin-name "_api_hookup (vam); - - vec_free(name); - - return 0; -} /* * fd.io coding-style-patch-verification: " capital-oh-en " * |