if (S_ISDIR(st.st_mode)) {
_cleanup_free_ char *n = NULL, *user_name = NULL, *realm = NULL;
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
UserStorage storage;
if (!directory_suffix)
CMSG_BUFFER_TYPE(CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int))) control;
_cleanup_free_ void *buffer = NULL;
- _cleanup_close_ int passed_fd = -1;
+ _cleanup_close_ int passed_fd = -EBADF;
struct ucred *sender = NULL;
struct cmsghdr *cmsg;
struct msghdr mh;
static int on_notify_socket(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
_cleanup_strv_free_ char **l = NULL;
_cleanup_free_ void *datagram = NULL;
- _cleanup_close_ int passed_fd = -1;
+ _cleanup_close_ int passed_fd = -EBADF;
struct ucred sender = UCRED_INVALID;
Manager *m = ASSERT_PTR(userdata);
ssize_t n;
}
static int manager_listen_notify(Manager *m) {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
union sockaddr_union sa = {
.un.sun_family = AF_UNIX,
.un.sun_path = "/run/systemd/home/notify",
return 0;
if (r < 0)
return log_error_errno(r, "Failed to acquire ID_PART_ENTRY_TYPE device property, ignoring: %m");
- if (sd_id128_string_equal(parttype, GPT_USER_HOME) <= 0) {
+ if (sd_id128_string_equal(parttype, SD_GPT_USER_HOME) <= 0) {
log_debug("Found partition (%s) we don't care about, ignoring.", sysfs);
return 0;
}