From: Yu Watanabe Date: Sun, 23 Nov 2025 06:04:26 +0000 (+0900) Subject: firstboot: drop redundant and spurious errno check X-Git-Tag: v259-rc2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19deb47ade9d54160e7ba5f8f2a995e3f22df678;p=thirdparty%2Fsystemd.git firstboot: drop redundant and spurious errno check Follow-up for 2319154a6bec7b8c42e901dfacaefe95bf4e3750. --- diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 9c0ec390f10..4ea2523d967 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -928,9 +928,6 @@ static int write_root_passwd(int rfd, int etc_fd, const char *password, const ch .pw_shell = (char *) (shell ?: default_root_shell_at(rfd)), }; - if (errno != ENOENT) - return -errno; - r = putpwent_sane(&root, passwd); if (r < 0) return r; @@ -1004,9 +1001,6 @@ static int write_root_shadow(int etc_fd, const char *hashed_password) { .sp_flag = ULONG_MAX, /* this appears to be what everybody does ... */ }; - if (errno != ENOENT) - return -errno; - r = putspent_sane(&root, shadow); if (r < 0) return r;