Trivial follow-ups for recently merged PRs (#40417)
This commit is contained in:
+25
-16
@@ -183,7 +183,7 @@ int fdset_new_fill(
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(ENOSYS),
|
||||
"Failed to open /proc/self/fd/, /proc/ is not mounted.");
|
||||
|
||||
return log_debug_errno(errno, "Failed to open /proc/self/fd/: %m ");
|
||||
return log_debug_errno(errno, "Failed to open /proc/self/fd/: %m");
|
||||
}
|
||||
|
||||
s = fdset_new();
|
||||
@@ -214,11 +214,14 @@ int fdset_new_fill(
|
||||
|
||||
fl = RET_NERRNO(fcntl(fd, F_GETFD));
|
||||
if (fl < 0) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
return log_debug_errno(fl,
|
||||
"Failed to get flag of fd=%d (%s): %m ",
|
||||
fd, strna(path));
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
log_debug_errno(fl, "Failed to get flags of fd=%d (%s): %m",
|
||||
fd, strna(path));
|
||||
}
|
||||
|
||||
return fl;
|
||||
}
|
||||
|
||||
if (FLAGS_SET(fl, FD_CLOEXEC) != !!filter_cloexec)
|
||||
@@ -229,21 +232,27 @@ int fdset_new_fill(
|
||||
if (filter_cloexec <= 0) {
|
||||
r = fd_cloexec(fd, true);
|
||||
if (r < 0) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
return log_debug_errno(r,
|
||||
"Failed to set CLOEXEC flag fd=%d (%s): %m ",
|
||||
fd, strna(path));
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
log_debug_errno(r, "Failed to set CLOEXEC flag on fd=%d (%s): %m",
|
||||
fd, strna(path));
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
r = fdset_put(s, fd);
|
||||
if (r < 0) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
return log_debug_errno(r,
|
||||
"Failed to put fd=%d (%s) into fdset: %m ",
|
||||
fd, strna(path));
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *path = NULL;
|
||||
(void) fd_get_path(fd, &path);
|
||||
log_debug_errno(r, "Failed to put fd=%d (%s) into fdset: %m",
|
||||
fd, strna(path));
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "shared-forward.h"
|
||||
#include "iterator.h"
|
||||
#include "shared-forward.h"
|
||||
|
||||
FDSet* fdset_new(void);
|
||||
FDSet* fdset_free(FDSet *s);
|
||||
|
||||
@@ -382,7 +382,7 @@ static int process_magic_file(
|
||||
* so that people fix it. After all we want to retain liberty to maybe one day place some useful data
|
||||
* inside it */
|
||||
if (iovec_memcmp(&IOVEC_MAKE(expected_hash, sizeof(expected_hash)), hash) != 0)
|
||||
log_warning("Hash of best before marker file '%s' has unexpected value, ignoring.", fn);
|
||||
log_warning("Hash of best before marker file '%s' has unexpected value, proceeding anyway.", fn);
|
||||
|
||||
struct tm parsed_tm = {};
|
||||
const char *n = strptime(e, "%Y-%m-%d", &parsed_tm);
|
||||
|
||||
Reference in New Issue
Block a user