Lines Matching defs:device
61 struct udev_device *device;
71 device = udev_device_new_from_subsystem_sysname(udev, "rfkill", sysname);
72 if (!device)
73 return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, "Failed to open device: %m");
75 name = udev_device_get_sysattr_value(device, "name");
78 udev_device_unref(device);
82 log_debug("Operating on rfkill device '%s'.", name);
84 *ret = device;
90 struct udev_device *device,
99 assert(device);
102 if (udev_device_get_is_initialized(device) != 0) {
103 *ret = udev_device_ref(device);
107 assert_se(sysname = udev_device_get_sysname(device));
109 /* Wait until the device is initialized, so that we can get
131 return log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, errno, "Failed to open device: %m");
151 if (streq_ptr(udev_device_get_sysname(device), sysname)) {
164 _cleanup_udev_device_unref_ struct udev_device *device = NULL;
173 r = wait_for_initialized(udev, d, &device);
179 path_id = udev_device_get_property_value(device, "ID_PATH");
203 _cleanup_udev_device_unref_ struct udev_device *device = NULL;
216 r = find_device(udev, event, &device);
220 r = determine_state_file(udev, event, device, &state_file);
265 _cleanup_udev_device_unref_ struct udev_device *device = NULL;
273 r = find_device(udev, event, &device);
277 r = determine_state_file(udev, event, device, &state_file);
333 log_debug_errno(errno, "Missing rfkill subsystem, or no device present, exiting.");
375 log_error_errno(r, "Failed to poll() on device: %m");
396 log_debug("An rfkill device of unknown type %i discovered, ignoring.", event.type);
403 log_debug("A new rfkill device has been added with index %i and type %s.", event.idx, type);
408 log_debug("An rfkill device has been removed with index %i and type %s", event.idx, type);
412 log_debug("An rfkill device has changed state with index %i and type %s", event.idx, type);