From: Minwoo Im Date: Tue, 18 Feb 2020 06:52:08 +0000 (+0900) Subject: README: Include nvme.h in plugin template X-Git-Tag: v1.11~35 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=81bbddce8b08dcb8d84e5baa5dc7b8c1fddbb918;p=users%2Fhch%2Fnvme-cli.git README: Include nvme.h in plugin template 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 --- diff --git a/README.md b/README.md index 90819d3..5f1d53c 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,8 @@ and include the header: File: foo-plugin.c ```c +#include "nvme.h" + #define CREATE_CMD #include "foo-plugin.h" ```