The newly made plugin must have nvme.h file include, otherwise the
following errors will happen.
CC plugins/samsung/samsung-nvme.o
make: *** No rule to make target 'NVME-VERSION-FILE', needed by 'nvme'. Stop.
make: *** Waiting for unfinished jobs....
In file included from ./define_cmd.h:14:0,
from plugins/samsung/samsung-nvme.h:17,
from plugins/samsung/samsung-nvme.c:3:
./cmd_handler.h:75:2: error: ‘NULL’ undeclared here (not in a function)
NULL, \
^
./cmd_handler.h:79:28: note: in definition of macro ‘PLUGIN’
#define PLUGIN(name, cmds) cmds
^~~~
./plugins/samsung/samsung-nvme.h:11:5: note: in expansion of macro ‘COMMAND_LIST’
COMMAND_LIST(
^~~~~~~~~~~~
In file included from ./define_cmd.h:14:0,
from plugins/samsung/samsung-nvme.h:17,
from plugins/samsung/samsung-nvme.c:3:
./plugins/samsung/samsung-nvme.h: In function ‘init’:
./cmd_handler.h:105:2: error: implicit declaration of function ‘register_extension’ [-Werror=implicit-function-declaration]
register_extension(&plugin); \
^
./plugins/samsung/samsung-nvme.h:10:1: note: in expansion of macro ‘PLUGIN’
PLUGIN(NAME("samsung", "samsung"),
^~~~~~
cc1: all warnings being treated as errors
Makefile:92: recipe for target 'plugins/samsung/samsung-nvme.o' failed
make: *** [plugins/samsung/samsung-nvme.o] Error 1
Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
File: foo-plugin.c
```c
+#include "nvme.h"
+
#define CREATE_CMD
#include "foo-plugin.h"
```