History

genetlink: correct uAPI defines

Commit 50a896cf2d6f ("genetlink: properly support per-op policy dumping") seems to have copy'n'pasted things a little incorrectly. The #define CTRL_ATTR_MCAST_GRP_MAX should have stayed right after the previous enum. The new CTRL_ATTR_POLICY_* needs its own define for MAX and that max should not contain the superfluous _DUMP in the name. We probably can't do anything about the CTRL_ATTR_POLICY_DUMP_MAX any more, there's likely code which uses it. For consistency (*cough* codegen *cough*) let's add the correctly name define nonetheless.

Jakub Kicinski committed 4 years ago

Commit f329a0e1 parent 6b4db2e1 file · +3 −2Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/genetlink.h+3−2
@@ -87,6 +87,8 @@ enum { · 86 unmodified lines
87 __CTRL_ATTR_MCAST_GRP_MAX,87 __CTRL_ATTR_MCAST_GRP_MAX,
88};88};
89 89
90#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
91
90enum {92enum {
91 CTRL_ATTR_POLICY_UNSPEC,93 CTRL_ATTR_POLICY_UNSPEC,
92 CTRL_ATTR_POLICY_DO,94 CTRL_ATTR_POLICY_DO,
@@ -96,7 +98,6 @@ enum { · 3 unmodified lines
96 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 198 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
97};99};
98 100
99#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)101#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)
100
101 102
102#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */103#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t