When using the Linux-specific reboot() system call to reboot the system, the second argument, magic2, must be specified as one of a set of magic numbers (e.g., LINUX_REBOOT_MAGIC2 ). What is the significance of these numbers? (Converting them to hexadecimal provides a clue.)

reboot()系统调用第二个参数为magic2,为LINUX_REBOOT_MAGIC2系列的幻数,问这系列幻数有什么意义(转换为16进制有线索)?

答:LINUX_REBOOT_MAGIC2系列有4个幻数(宏/常量):

  • LINUX_REBOOT_MAGIC2(672274793 = 0x28121969)
  • LINUX_REBOOT_MAGIC2A(85072278 = 0x05121996)
  • LINUX_REBOOT_MAGIC2B(369367448 = 0x16041998)
  • LINUX_REBOOT_MAGIC2C(537993216 = 0x20112000)

很明显对应4个生日:1969/12/28,1996/05/12,1998/04/16,2000/11/20,这四个日期对应的人物为Linux创始人Torvalds和他的三个女儿Patricia Miranda , Daniela Yolanda , Celeste Amanda的生日…这说明了幻数都是有意义/来源的。。。。