diff options
author | Michal Sekletar <msekleta@redhat.com> | 2024-09-09 18:17:18 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-10-30 13:20:40 +0100 |
commit | 5e55410aca895fae9b492306532a15a5aed7dce5 (patch) | |
tree | 8b40dcf8f77d33b2ec8aa4c4445f6b3269ab8948 /src/coredump | |
parent | coredump: check for and close unexpected FDs (diff) | |
download | systemd-5e55410aca895fae9b492306532a15a5aed7dce5.tar.xz systemd-5e55410aca895fae9b492306532a15a5aed7dce5.zip |
coredump: use more appropriate return code
Diffstat (limited to 'src/coredump')
-rw-r--r-- | src/coredump/coredump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 74a29d7ff2..5b022de2d1 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -1662,11 +1662,11 @@ static int gather_pid_mount_tree_fd(const Context *context) { /* Don't bother preparing environment if we can't pass it to libdwfl. */ #if !HAVE_DWFL_SET_SYSROOT - return -EBADF; + return -EOPNOTSUPP; #endif if (!arg_access_container) - return -EBADF; + return -EOPNOTSUPP; if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, pair) < 0) return log_error_errno(errno, "Failed to create socket pair: %m"); @@ -1761,7 +1761,7 @@ static int process_kernel(int argc, char* argv[]) { return 0; r = gather_pid_mount_tree_fd(&context); - if (r < 0 && r != -EBADF) + if (r < 0 && r != -EOPNOTSUPP) log_warning_errno(r, "Failed to access the mount tree of a container, ignoring: %m"); else mount_tree_fd = r; |