Store return values of ioctls in records, as they are not always 0

For example, a lot of the evdev ioctls (like EVIOCGBIT) return positive values
on success.