Just open("/dev/hda6", O_RDWR) (yes the swap partition)

Ew.

I guess I should bother to see if it adds the swap partition from the second disk. If not, and you have 2 disks, that's less worrisome.