Page MenuHomeFreeBSD

D47547.diff
No OneTemporary

D47547.diff

diff --git a/sys/netlink/netlink_ctl.h b/sys/netlink/netlink_ctl.h
--- a/sys/netlink/netlink_ctl.h
+++ b/sys/netlink/netlink_ctl.h
@@ -79,7 +79,7 @@
bool netlink_unregister_proto(int proto);
/* Common helpers */
-bool nl_has_listeners(int netlink_family, uint32_t groups_mask);
+bool nl_has_listeners(uint16_t netlink_family, uint32_t groups_mask);
bool nlp_has_priv(struct nlpcb *nlp, int priv);
struct ucred *nlp_get_cred(struct nlpcb *nlp);
uint32_t nlp_get_pid(const struct nlpcb *nlp);
@@ -103,7 +103,7 @@
struct genl_family;
const char *genl_get_family_name(const struct genl_family *gf);
-uint32_t genl_get_family_id(const struct genl_family *gf);
+uint16_t genl_get_family_id(const struct genl_family *gf);
typedef void (*genl_family_event_handler_t)(void *arg, const struct genl_family *gf, int action);
EVENTHANDLER_DECLARE(genl_family_event, genl_family_event_handler_t);
diff --git a/sys/netlink/netlink_domain.c b/sys/netlink/netlink_domain.c
--- a/sys/netlink/netlink_domain.c
+++ b/sys/netlink/netlink_domain.c
@@ -256,7 +256,7 @@
}
bool
-nl_has_listeners(int netlink_family, uint32_t groups_mask)
+nl_has_listeners(uint16_t netlink_family, uint32_t groups_mask)
{
return (V_nl_ctl != NULL);
}
diff --git a/sys/netlink/netlink_generic_kpi.c b/sys/netlink/netlink_generic_kpi.c
--- a/sys/netlink/netlink_generic_kpi.c
+++ b/sys/netlink/netlink_generic_kpi.c
@@ -252,7 +252,7 @@
/* accessors */
struct genl_family *
-genl_get_family(uint32_t family_id)
+genl_get_family(uint16_t family_id)
{
return ((family_id < MAX_FAMILIES) ? &families[family_id] : NULL);
}
@@ -263,7 +263,7 @@
return (gf->family_name);
}
-uint32_t
+uint16_t
genl_get_family_id(const struct genl_family *gf)
{
return (gf->family_id);
diff --git a/sys/netlink/netlink_var.h b/sys/netlink/netlink_var.h
--- a/sys/netlink/netlink_var.h
+++ b/sys/netlink/netlink_var.h
@@ -159,7 +159,7 @@
const char *group_name;
};
-struct genl_family *genl_get_family(uint32_t family_id);
+struct genl_family *genl_get_family(uint16_t family_id);
struct genl_group *genl_get_group(uint32_t group_id);
#define MAX_FAMILIES 20

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 9:11 PM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15757862
Default Alt Text
D47547.diff (2 KB)

Event Timeline