]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
README: Include nvme.h in plugin template
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 18 Feb 2020 06:52:08 +0000 (15:52 +0900)
committerKeith Busch <kbusch@kernel.org>
Tue, 18 Feb 2020 14:38:52 +0000 (07:38 -0700)
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>
README.md

index 90819d30ac7788646fe7bb7158cd7f174ffbeba1..5f1d53c443749749a62dfc24eb2afc8f027c0a74 100644 (file)
--- 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"
 ```