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对女儿们满满的爱啊!微笑

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值