#include "bus-error.h"
#include "bus-util.h"
#include "chase-symlinks.h"
+#include "constants.h"
#include "copy.h"
#include "dbus-socket.h"
#include "dbus-unit.h"
-#include "def.h"
#include "errno-list.h"
#include "exit-status.h"
#include "fd-util.h"
mode_t directory_mode,
mode_t socket_mode) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
mode_t old_mask;
struct stat st;
int r;
}
static int special_address_create(const char *path, bool writable) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
assert(path);
}
static int usbffs_address_create(const char *path) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
assert(path);
long maxmsg,
long msgsize) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
mode_t old_mask;
struct mq_attr _attr, *attr = NULL;
const SocketAddress *address,
const char *label) {
- _cleanup_close_pair_ int pair[2] = { -1, -1 };
+ _cleanup_close_pair_ int pair[2] = PIPE_EBADF;
int fd, r;
pid_t pid;
_cleanup_(exec_params_clear) ExecParameters exec_params = {
.flags = EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_APPLY_TTY_STDIN,
- .stdin_fd = -1,
- .stdout_fd = -1,
- .stderr_fd = -1,
- .exec_fd = -1,
+ .stdin_fd = -EBADF,
+ .stdout_fd = -EBADF,
+ .stderr_fd = -EBADF,
+ .exec_fd = -EBADF,
};
pid_t pid;
int r;
}
static int socket_accept_in_cgroup(Socket *s, SocketPort *p, int fd) {
- _cleanup_close_pair_ int pair[2] = { -1, -1 };
+ _cleanup_close_pair_ int pair[2] = PIPE_EBADF;
int cfd, r;
pid_t pid;
static int socket_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
SocketPort *p = ASSERT_PTR(userdata);
- int cfd = -1;
+ int cfd = -EBADF;
assert(fd >= 0);