Lines Matching refs:dev

20 int udev_builtin_hwdb_lookup(sd_device *dev,  in udev_builtin_hwdb_lookup()  argument
41 r = udev_builtin_add_property(dev, test, key, value); in udev_builtin_hwdb_lookup()
49 static const char *modalias_usb(sd_device *dev, char *s, size_t size) { in modalias_usb() argument
53 if (sd_device_get_sysattr_value(dev, "idVendor", &v) < 0) in modalias_usb()
55 if (sd_device_get_sysattr_value(dev, "idProduct", &p) < 0) in modalias_usb()
61 (void) sd_device_get_sysattr_value(dev, "product", &n); in modalias_usb()
67 static int udev_builtin_hwdb_search(sd_device *dev, sd_device *srcdev, in udev_builtin_hwdb_search() argument
74 assert(dev); in udev_builtin_hwdb_search()
77 srcdev = dev; in udev_builtin_hwdb_search()
105 log_device_debug(dev, "hwdb modalias key: \"%s\"", modalias); in udev_builtin_hwdb_search()
107 r = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test); in udev_builtin_hwdb_search()
121 static int builtin_hwdb(sd_device *dev, sd_netlink **rtnl, int argc, char *argv[], bool test) { in builtin_hwdb() argument
167 r = udev_builtin_hwdb_lookup(dev, prefix, argv[optind], filter, test); in builtin_hwdb()
169 return log_device_debug_errno(dev, r, "Failed to look up hwdb: %m"); in builtin_hwdb()
171 … return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); in builtin_hwdb()
179 … return log_device_debug_errno(dev, r, "Failed to create sd_device object '%s': %m", device); in builtin_hwdb()
182 r = udev_builtin_hwdb_search(dev, srcdev, subsystem, prefix, filter, test); in builtin_hwdb()
184 return log_device_debug_errno(dev, r, "Failed to look up hwdb: %m"); in builtin_hwdb()
186 … return log_device_debug_errno(dev, SYNTHETIC_ERRNO(ENODATA), "No entry found from hwdb."); in builtin_hwdb()