* [PATCH] netlink: uapi: use hex numbers for NLM_F_* flags
@ 2017-04-06 14:10 Johannes Berg
2017-04-08 15:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2017-04-06 14:10 UTC (permalink / raw)
To: netdev; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
It's rather confusing that the netlink message flags are
numbered 1, 2, 4, 8, 16, 32, <unused>, 0x100. Make that
more understandable by numbering the lower ones with hex
constants as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/uapi/linux/netlink.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index f3946a27bd07..b2c9c26ea30f 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -50,12 +50,12 @@ struct nlmsghdr {
/* Flags values */
-#define NLM_F_REQUEST 1 /* It is request message. */
-#define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */
-#define NLM_F_ACK 4 /* Reply with ack, with zero or error code */
-#define NLM_F_ECHO 8 /* Echo this request */
-#define NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */
-#define NLM_F_DUMP_FILTERED 32 /* Dump was filtered as requested */
+#define NLM_F_REQUEST 0x01 /* It is request message. */
+#define NLM_F_MULTI 0x02 /* Multipart message, terminated by NLMSG_DONE */
+#define NLM_F_ACK 0x04 /* Reply with ack, with zero or error code */
+#define NLM_F_ECHO 0x08 /* Echo this request */
+#define NLM_F_DUMP_INTR 0x10 /* Dump was inconsistent due to sequence change */
+#define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */
/* Modifiers to GET request */
#define NLM_F_ROOT 0x100 /* specify tree root */
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netlink: uapi: use hex numbers for NLM_F_* flags
2017-04-06 14:10 [PATCH] netlink: uapi: use hex numbers for NLM_F_* flags Johannes Berg
@ 2017-04-08 15:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-04-08 15:26 UTC (permalink / raw)
To: johannes; +Cc: netdev, johannes.berg
From: Johannes Berg <johannes@sipsolutions.net>
Date: Thu, 6 Apr 2017 16:10:42 +0200
> From: Johannes Berg <johannes.berg@intel.com>
>
> It's rather confusing that the netlink message flags are
> numbered 1, 2, 4, 8, 16, 32, <unused>, 0x100. Make that
> more understandable by numbering the lower ones with hex
> constants as well.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This is fine, applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-08 15:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 14:10 [PATCH] netlink: uapi: use hex numbers for NLM_F_* flags Johannes Berg
2017-04-08 15:26 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.