summaryrefslogtreecommitdiffstats
path: root/extras/emacs/dual-loop-skel.el
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-31 09:54:34 -0400
committerDave Barach <dave@barachs.net>2018-10-31 09:55:09 -0400
commit8284244d48efad190058a39f05b37f02ea48d0ce (patch)
treef5687f200810b85ed41eb8f471eec28b13a74736 /extras/emacs/dual-loop-skel.el
parent6070768ce02fa7bde2146b5bd39078630f667d28 (diff)
EMACS-LISP-ONLY: fix names of xxx_main_t pointers
main_t pointer: <first-letter-of-plugin-name> + "mp" test_main_t pointer: <first-letter-of-plugin-name> + "mp" AKA: (setq main-p (concat (substring plugin-name 0 1) "mp")) etc. Change-Id: Ie1b38fb62485183bbe00f649683492aa82a21376 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'extras/emacs/dual-loop-skel.el')
-rw-r--r--extras/emacs/dual-loop-skel.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/extras/emacs/dual-loop-skel.el b/extras/emacs/dual-loop-skel.el
index 97d63e01b38..583a2da52d8 100644
--- a/extras/emacs/dual-loop-skel.el
+++ b/extras/emacs/dual-loop-skel.el
@@ -20,6 +20,7 @@
nil
'(setq node-name (skeleton-read "Node Name: "))
'(setq uc-node-name (upcase node-name))
+'(setq main-p (concat (substring plugin-name 0 1) "mp"))
"
#include <vlib/vlib.h>
#include <vnet/vnet.h>
@@ -300,12 +301,12 @@ VLIB_REGISTER_NODE (" node-name "_node) = {
clib_error_t *" node-name "_init (vlib_main_t *vm)
{
- " node-name "_main_t *msm = &" node-name "_main;
+ " node-name "_main_t *" main-p " = &" node-name "_main;
/* $$$$$ Initialize " node-name "_main_t structure here. $$$$$ */
- msm->vlib_main = vm;
- msm->vnet_main = vnet_get_main();
- msm->ethernet_main = ethernet_get_main(vm);
+ " main-p "->vlib_main = vm;
+ " main-p "->vnet_main = vnet_get_main();
+ " main-p "->ethernet_main = ethernet_get_main(vm);
return 0;
}