driver: tun: Use new macro SOCK_IOC_TYPE instead of literal number 0x89
authorGao Feng <fgao@ikuai8.com>
Thu, 27 Oct 2016 01:05:22 +0000 (09:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Oct 2016 14:56:47 +0000 (10:56 -0400)
commit20861f26e33d76a4f3587bcc866fa1dab3e01094
treef27493e8976cf194e01148dd10f3183686d057c5
parentc62cce2caee558e18aa05c01c2fd3b40f07174f2
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.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c
include/uapi/linux/sockios.h