Commit 4e2da933 authored by Christoph Böhmwalder's avatar Christoph Böhmwalder Committed by Jens Axboe

drbd: drop API_VERSION define

Use the genetlink api version as defined in drbd_genl_api.h.
Signed-off-by: default avatarChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: default avatarJoel Colledge <joel.colledge@linbit.com>
Link: https://lore.kernel.org/r/20230113123506.144082-3-christoph.boehmwalder@linbit.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 887b98c7
...@@ -844,7 +844,7 @@ static int drbd_version_show(struct seq_file *m, void *ignored) ...@@ -844,7 +844,7 @@ static int drbd_version_show(struct seq_file *m, void *ignored)
{ {
seq_printf(m, "# %s\n", drbd_buildtag()); seq_printf(m, "# %s\n", drbd_buildtag());
seq_printf(m, "VERSION=%s\n", REL_VERSION); seq_printf(m, "VERSION=%s\n", REL_VERSION);
seq_printf(m, "API_VERSION=%u\n", API_VERSION); seq_printf(m, "API_VERSION=%u\n", GENL_MAGIC_VERSION);
seq_printf(m, "PRO_VERSION_MIN=%u\n", PRO_VERSION_MIN); seq_printf(m, "PRO_VERSION_MIN=%u\n", PRO_VERSION_MIN);
seq_printf(m, "PRO_VERSION_MAX=%u\n", PRO_VERSION_MAX); seq_printf(m, "PRO_VERSION_MAX=%u\n", PRO_VERSION_MAX);
return 0; return 0;
......
...@@ -2899,7 +2899,7 @@ static int __init drbd_init(void) ...@@ -2899,7 +2899,7 @@ static int __init drbd_init(void)
pr_info("initialized. " pr_info("initialized. "
"Version: " REL_VERSION " (api:%d/proto:%d-%d)\n", "Version: " REL_VERSION " (api:%d/proto:%d-%d)\n",
API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX); GENL_MAGIC_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX);
pr_info("%s\n", drbd_buildtag()); pr_info("%s\n", drbd_buildtag());
pr_info("registered as block device major %d\n", DRBD_MAJOR); pr_info("registered as block device major %d\n", DRBD_MAJOR);
return 0; /* Success! */ return 0; /* Success! */
......
...@@ -228,7 +228,7 @@ int drbd_seq_show(struct seq_file *seq, void *v) ...@@ -228,7 +228,7 @@ int drbd_seq_show(struct seq_file *seq, void *v)
}; };
seq_printf(seq, "version: " REL_VERSION " (api:%d/proto:%d-%d)\n%s\n", seq_printf(seq, "version: " REL_VERSION " (api:%d/proto:%d-%d)\n%s\n",
API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX, drbd_buildtag()); GENL_MAGIC_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX, drbd_buildtag());
/* /*
cs .. connection state cs .. connection state
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
extern const char *drbd_buildtag(void); extern const char *drbd_buildtag(void);
#define REL_VERSION "8.4.11" #define REL_VERSION "8.4.11"
#define API_VERSION 1
#define PRO_VERSION_MIN 86 #define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 101 #define PRO_VERSION_MAX 101
......
...@@ -47,7 +47,7 @@ enum drbd_state_info_bcast_reason { ...@@ -47,7 +47,7 @@ enum drbd_state_info_bcast_reason {
#undef linux #undef linux
#include <linux/drbd.h> #include <linux/drbd.h>
#define GENL_MAGIC_VERSION API_VERSION #define GENL_MAGIC_VERSION 1
#define GENL_MAGIC_FAMILY drbd #define GENL_MAGIC_FAMILY drbd
#define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr) #define GENL_MAGIC_FAMILY_HDRSZ sizeof(struct drbd_genlmsghdr)
#define GENL_MAGIC_INCLUDE_FILE <linux/drbd_genl.h> #define GENL_MAGIC_INCLUDE_FILE <linux/drbd_genl.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment