TLPI--->Linux趣事之一

3-1:使用LInx专有的reboot系统调用重启系统时,必须将第二个参数magic2定义为一组magic号(例如:LINNUX_REBOOT_MAGIC2)。这些号有何意义?(将magic号转换为十六进制数,对解题会有所帮助。)

参考:Linux Easter Egg - Hidden Dates in the Linux Kernel

具体如下:

In order to prevent the reboot() system call being 
called inadvertently, you must pass it a pair of magic values in the first two parameters. The first magic value is 0xfee1dead. The second magic value 
is one of: 
$ grep LINUX_REBOOT_MAGIC include/linux/*.h 
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC1  0xfee1dead 
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2  672274793 
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2A 85072278 
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2B 369367448 
include/linux/reboot.h:#define LINUX_REBOOT_MAGIC2C 537993216 

Here are the answers. 
0xfee1dead ="Feel Dead"

672274793=0x28121969 28/12/1969 is when Linus Torvalds was born. 

These are Linus' daughters' birthdays: 
85072278= 0x5121996     05/12/1996 is when Patricia Miranda was born. 
367369448=0x16041998 16/04/1998 is when Daniela Yolanda was born. 
537993216=0x20122000 20/12/2000 is when Celeste Amanda was born

从中不难感受到Linus Torvalds对女儿们满满的爱啊!微笑

你可能感兴趣的:(linux)