My ruby init scripts for the 'Rubyx' linux distro fall over trying to do syscalls 
when running on x86_64 with a 64bit ruby installation.

The code in question:

module Kernel
  def poweroff(); syscall(88,-18751827,369367448,0x4321fedc); end
  def reboot(); syscall(88,-18751827,672274793,0x1234567); end
  def halt(); syscall(88,-18751827,672274793,0xcdef0123); end
  def cad(enable); syscall(88,-18751827,672274793,enable ? 0x89abcdef : 0); end
end

although any syscall seems to fail. Trying the simple example from the
Pickaxe:

root@orac / # irb
irb(main):001:0> syscall 4,1,"hello\n",6
Errno::EFAULT: Bad address
        from (irb):1:in `syscall'
        from (irb):1


Is there something I need to do differently in64bit land, or is syscall() broken?

Andrew Walrond