#include "fileio.h"
#include "format-util.h"
#include "libudev-private.h"
+#include "libudev-device-internal.h"
#include "missing.h"
#include "mount-util.h"
#include "socket-util.h"
return udev_device;
}
+int udev_monitor_receive_sd_device(struct udev_monitor *udev_monitor, sd_device **ret) {
+ _cleanup_(udev_device_unrefp) struct udev_device *udev_device = NULL;
+
+ assert(ret);
+
+ udev_device = udev_monitor_receive_device(udev_monitor);
+ if (!udev_device)
+ return -errno;
+
+ *ret = sd_device_ref(udev_device->device);
+ return 0;
+}
+
int udev_monitor_send_device(struct udev_monitor *udev_monitor,
struct udev_monitor *destination, struct udev_device *udev_device)
{
#include <stdint.h>
#include "libudev.h"
+#include "sd-device.h"
#include "macro.h"
#include "mkdir.h"
int udev_monitor_send_device(struct udev_monitor *udev_monitor,
struct udev_monitor *destination, struct udev_device *udev_device);
struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd);
+int udev_monitor_receive_sd_device(struct udev_monitor *udev_monitor, sd_device **ret);
/* libudev-list.c */
struct udev_list_node {