The systemcall close() should not return with ENODEV ... IMHO the only valid error codes are EBADF, EIO, and maybe EINTR.