2017-01-05

Slitaz -- LINUX_VERSION_CODE / dec2hex / hex2dec



LINUX_VERSION_CODE / dec2hex / hex2dec


tux@slitaz:~$ cat /usr/src/linux-3.16.36/include/generated/uapi/linux/version.h

#define LINUX_VERSION_CODE 200740

#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))


dec2hex / hex2dec

tux@slitaz:~$ printf "%X\n" 200740

31024


tux@slitaz:~$ echo $((0x31024))

200740

tux@slitaz:~$


31024 ⇒ 3.10.24 (hex) ⇒ 3.16.36