Accurately set the direction bits, pack down the used numbers, and remove stale old ioctl definitions. Signed-off-by: Zach Brown <zab@versity.com>