From: Lennart Poettering Date: Wed, 13 Jul 2022 16:02:36 +0000 (+0200) Subject: import-ceds: use the right error variables at four places X-Git-Tag: v252-rc1~656 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ab8cd794c10649777129dce47d324ec7e02c581;p=thirdparty%2Fsystemd.git import-ceds: use the right error variables at four places --- diff --git a/src/core/import-creds.c b/src/core/import-creds.c index 8b87434683d..53796484ee3 100644 --- a/src/core/import-creds.c +++ b/src/core/import-creds.c @@ -226,7 +226,7 @@ static int import_credentials_boot(void) { if (nfd == -EEXIST) continue; if (nfd < 0) - return r; + return nfd; r = copy_bytes(cfd, nfd, st.st_size, 0); if (r < 0) { @@ -325,7 +325,7 @@ static int proc_cmdline_callback(const char *key, const char *value, void *data) if (nfd == -EEXIST) return 0; if (nfd < 0) - return r; + return nfd; r = loop_write(nfd, colon, l, /* do_poll= */ false); if (r < 0) { @@ -417,7 +417,7 @@ static int import_credentials_qemu(ImportCredentialContext *c) { rfd = openat(vfd, "raw", O_RDONLY|O_CLOEXEC); if (rfd < 0) { - log_warning_errno(r, "Failed to open '" QEMU_FWCFG_PATH "'/%s/raw, ignoring: %m", d->d_name); + log_warning_errno(errno, "Failed to open '" QEMU_FWCFG_PATH "'/%s/raw, ignoring: %m", d->d_name); continue; } @@ -429,7 +429,7 @@ static int import_credentials_qemu(ImportCredentialContext *c) { if (nfd == -EEXIST) continue; if (nfd < 0) - return r; + return nfd; r = copy_bytes(rfd, nfd, sz, 0); if (r < 0) {