Check for correct error code on bad OP parameter

On AIX, EINVAL is returned when the wrong
command code is used for a file descriptor
that is already present.