Thursday, March 24, 2011

Linux reboot() system call and LINUX_REBOOT_MAGIC2 argument

If you look at the reboot() system call in Linux it has the following signature.

int reboot(int magic, int magic2, int cmd, void *arg);

You can try the man page of reboot() system call in the online man page using, man 2 reboot.

The second argument can be one of the following magic numbers.
  1. LINUX_REBOOT_MAGIC2 - 672274793(0x28121969)
  2. LINUX_REBOOT_MAGIC2A - 85072278(0x5121996)
  3. LINUX_REBOOT_MAGIC2B - 369367448(0x16041998)
  4. LINUX_REBOOT_MAGIC2C - 537993216(0x20112000)
These magic numbers has something very interesting. If you look into the hexadecimal values you can see a set of dates.
Internet suggests that these are the birth dates of famous Linux kernel developer Linus Torvalds and his three daughters.

1 comments:

  1. Thanks for sharing information man, you have indeed covered the topic quite well.

    Thanks
    Javin
    10 enum examples in java

    ReplyDelete