warnx() and errx() print without reading errno, warn() and err() interpret errno. As errno is set after a failed open, we actually want warn() here.