Lines Matching refs:dev
29 static void print_property(sd_device *dev, bool test, const char *name, const char *value) { in print_property() argument
35 udev_builtin_add_property(dev, test, "ID_FS_TYPE", value); in print_property()
38 udev_builtin_add_property(dev, test, "ID_FS_USAGE", value); in print_property()
41 udev_builtin_add_property(dev, test, "ID_FS_VERSION", value); in print_property()
45 udev_builtin_add_property(dev, test, "ID_FS_UUID", s); in print_property()
47 udev_builtin_add_property(dev, test, "ID_FS_UUID_ENC", s); in print_property()
51 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB", s); in print_property()
53 udev_builtin_add_property(dev, test, "ID_FS_UUID_SUB_ENC", s); in print_property()
57 udev_builtin_add_property(dev, test, "ID_FS_LABEL", s); in print_property()
59 udev_builtin_add_property(dev, test, "ID_FS_LABEL_ENC", s); in print_property()
62 udev_builtin_add_property(dev, test, "ID_PART_TABLE_TYPE", value); in print_property()
65 udev_builtin_add_property(dev, test, "ID_PART_TABLE_UUID", value); in print_property()
69 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_NAME", s); in print_property()
73 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_TYPE", s); in print_property()
77 udev_builtin_add_property(dev, test, s, value); in print_property()
81 udev_builtin_add_property(dev, test, "ID_FS_SYSTEM_ID", s); in print_property()
85 udev_builtin_add_property(dev, test, "ID_FS_PUBLISHER_ID", s); in print_property()
89 udev_builtin_add_property(dev, test, "ID_FS_APPLICATION_ID", s); in print_property()
93 udev_builtin_add_property(dev, test, "ID_FS_BOOT_SYSTEM_ID", s); in print_property()
97 udev_builtin_add_property(dev, test, "ID_FS_VOLUME_ID", s); in print_property()
101 udev_builtin_add_property(dev, test, "ID_FS_LOGICAL_VOLUME_ID", s); in print_property()
105 udev_builtin_add_property(dev, test, "ID_FS_VOLUME_SET_ID", s); in print_property()
109 udev_builtin_add_property(dev, test, "ID_FS_DATA_PREPARER_ID", s); in print_property()
113 static int find_gpt_root(sd_device *dev, blkid_probe pr, bool test) { in find_gpt_root() argument
196 udev_builtin_add_property(dev, test, "ID_PART_GPT_AUTO_ROOT_UUID", root_id); in find_gpt_root()
236 static int builtin_blkid(sd_device *dev, sd_netlink **rtnl, int argc, char *argv[], bool test) { in builtin_blkid() argument
254 … return log_device_debug_errno(dev, errno_or_else(ENOMEM), "Failed to create blkid prober: %m"); in builtin_blkid()
269 …return log_device_error_errno(dev, errno_or_else(ENOMEM), "Failed to use '%s' probing hint: %m", o… in builtin_blkid()
283 … return log_device_error_errno(dev, r, "Failed to parse '%s' as an integer: %m", optarg); in builtin_blkid()
285 …return log_device_error_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid offset %"PRIi64": %m", offset… in builtin_blkid()
301 r = sd_device_get_devname(dev, &devnode); in builtin_blkid()
303 return log_device_debug_errno(dev, r, "Failed to get device name: %m"); in builtin_blkid()
305 fd = sd_device_open(dev, O_RDONLY|O_CLOEXEC|O_NONBLOCK); in builtin_blkid()
308 log_device_debug_errno(dev, fd, "Failed to open block device %s%s: %m", in builtin_blkid()
316 …return log_device_debug_errno(dev, errno_or_else(ENOMEM), "Failed to set device to blkid prober: %… in builtin_blkid()
318 …log_device_debug(dev, "Probe %s with %sraid and offset=%"PRIi64, devnode, noraid ? "no" : "", offs… in builtin_blkid()
322 return log_device_debug_errno(dev, r, "Failed to probe superblocks: %m"); in builtin_blkid()
325 (void) sd_device_get_property_value(dev, "ID_PART_GPT_AUTO_ROOT_UUID", &root_partition); in builtin_blkid()
330 …return log_device_debug_errno(dev, errno_or_else(ENOMEM), "Failed to get number of probed values: … in builtin_blkid()
336 print_property(dev, test, name, data); in builtin_blkid()
345 udev_builtin_add_property(dev, test, "ID_PART_GPT_AUTO_ROOT", "1"); in builtin_blkid()
349 find_gpt_root(dev, pr, test); in builtin_blkid()