diff options
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r-- | src/machine/machine-dbus.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 75f397dd6b..26ba5d4292 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -225,7 +225,7 @@ int bus_machine_method_get_addresses(sd_bus_message *message, void *userdata, sd case MACHINE_CONTAINER: { _cleanup_close_pair_ int pair[2] = { -1, -1 }; _cleanup_free_ char *us = NULL, *them = NULL; - _cleanup_close_ int netns_fd = -1; + _cleanup_close_ int netns_fd = -EBADF; const char *p; pid_t child; @@ -370,7 +370,7 @@ int bus_machine_method_get_os_release(sd_bus_message *message, void *userdata, s break; case MACHINE_CONTAINER: { - _cleanup_close_ int mntns_fd = -1, root_fd = -1, pidns_fd = -1; + _cleanup_close_ int mntns_fd = -EBADF, root_fd = -EBADF, pidns_fd = -EBADF; _cleanup_close_pair_ int pair[2] = { -1, -1 }; _cleanup_fclose_ FILE *f = NULL; pid_t child; @@ -388,7 +388,7 @@ int bus_machine_method_get_os_release(sd_bus_message *message, void *userdata, s if (r < 0) return sd_bus_error_set_errnof(error, r, "Failed to fork(): %m"); if (r == 0) { - int fd = -1; + int fd = -EBADF; pair[0] = safe_close(pair[0]); @@ -890,7 +890,7 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro const char *src, *dest, *host_path, *container_path; _cleanup_close_pair_ int errno_pipe_fd[2] = { -1, -1 }; CopyFlags copy_flags = COPY_REFLINK|COPY_MERGE|COPY_HARDLINKS; - _cleanup_close_ int hostfd = -1; + _cleanup_close_ int hostfd = -EBADF; Machine *m = ASSERT_PTR(userdata); bool copy_from; pid_t child; @@ -1042,13 +1042,13 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro (void) sigkill_wait(child); return r; } - errno_pipe_fd[0] = -1; + errno_pipe_fd[0] = -EBADF; return 1; } int bus_machine_method_open_root_directory(sd_bus_message *message, void *userdata, sd_bus_error *error) { - _cleanup_close_ int fd = -1; + _cleanup_close_ int fd = -EBADF; Machine *m = ASSERT_PTR(userdata); int r; @@ -1084,7 +1084,7 @@ int bus_machine_method_open_root_directory(sd_bus_message *message, void *userda break; case MACHINE_CONTAINER: { - _cleanup_close_ int mntns_fd = -1, root_fd = -1; + _cleanup_close_ int mntns_fd = -EBADF, root_fd = -EBADF; _cleanup_close_pair_ int pair[2] = { -1, -1 }; pid_t child; @@ -1100,7 +1100,7 @@ int bus_machine_method_open_root_directory(sd_bus_message *message, void *userda if (r < 0) return sd_bus_error_set_errnof(error, r, "Failed to fork(): %m"); if (r == 0) { - _cleanup_close_ int dfd = -1; + _cleanup_close_ int dfd = -EBADF; pair[0] = safe_close(pair[0]); |