[Drbd-dev] [Patch v1 7/8] Statically initialize families
Nick Wang
nwang at suse.com
Mon Mar 13 08:23:30 CET 2017
In a07ea4d9, genetlink no longer use static family id.
GENL_ID_GENERATE is removed.
In 489111e5, statically initialize the families and remove
the inline functions.
Signed-off-by: Nick Wang <nwang at suse.com>
CC: Lars Ellenberg <lars.ellenberg at linbit.com>
CC: Roland Kammerer <roland.kammerer at linbit.com>
CC: drbd-dev at lists.linbit.com
---
drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h b/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
index 27d8f73..cbd776e 100644
--- a/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
+++ b/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
@@ -29,9 +29,13 @@ static int CONCAT_(GENL_MAGIC_FAMILY, _genl_multicast_ ## group)( \
int CONCAT_(GENL_MAGIC_FAMILY, _genl_register)(void)
{
+#ifdef genl_register_family_with_ops_groups
return genl_register_family_with_ops_groups(&ZZZ_genl_family, \
ZZZ_genl_ops, \
ZZZ_genl_mcgrps);
+#else
+ return genl_register_family(&ZZZ_genl_family);
+#endif
}
void CONCAT_(GENL_MAGIC_FAMILY, _genl_unregister)(void)
--
1.8.5.6
More information about the drbd-dev
mailing list