History

driver: tun: Use new macro SOCK_IOC_TYPE instead of literal number 0x89

The current codes use _IOC_TYPE(cmd) == 0x89 to check if the cmd is one socket ioctl command like SIOCGIFHWADDR. But the literal number 0x89 may confuse readers. So create one macro SOCK_IOC_TYPE to enhance the readability.

Gao Feng committed 10 years ago

Commit 20861f21 parent c62cce22 files · +3 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/sockios.h+2−0
@@ -24,6 +24,8 @@ · 23 unmodified lines
2424 #define SIOCINQ FIONREAD
2525 #define SIOCOUTQ TIOCOUTQ /* output queue size (not sent + not acked) */
2626
27+#define SOCK_IOC_TYPE 0x89
28+
2729 /* Routing table calls. */
2830 #define SIOCADDRT 0x890B /* add routing table entry */
2931 #define SIOCDELRT 0x890C /* delete routing table entry */