/systemd-251/src/basic/ |
D | devnum-util.c | 42 int device_path_make_major_minor(mode_t mode, dev_t devnum, char **ret) { in device_path_make_major_minor() argument 54 if (asprintf(ret, "/dev/%s/" DEVNUM_FORMAT_STR, t, DEVNUM_FORMAT_VAL(devnum)) < 0) in device_path_make_major_minor() 60 int device_path_make_canonical(mode_t mode, dev_t devnum, char **ret) { in device_path_make_canonical() argument 68 if (major(devnum) == 0 && minor(devnum) == 0) { in device_path_make_canonical() 88 r = device_path_make_major_minor(mode, devnum, &p); in device_path_make_canonical() 97 dev_t devnum; in device_path_parse_major_minor() local 106 devnum = makedev(0, 0); in device_path_parse_major_minor() 109 devnum = makedev(0, 0); in device_path_parse_major_minor() 124 r = parse_devnum(w, &devnum); in device_path_parse_major_minor() 132 *ret_devnum = devnum; in device_path_parse_major_minor()
|
D | devnum-util.h | 31 int device_path_make_major_minor(mode_t mode, dev_t devnum, char **ret); 32 int device_path_make_canonical(mode_t mode, dev_t devnum, char **ret);
|
D | meson.build | 35 'devnum-util.c', 36 'devnum-util.h',
|
/systemd-251/src/shutdown/ |
D | umount.c | 255 dev_t devnum; in loopback_list_get() local 257 if (sd_device_get_devnum(d, &devnum) < 0 || in loopback_list_get() 271 .devnum = devnum, in loopback_list_get() 307 dev_t devnum; in dm_list_get() local 309 if (sd_device_get_devnum(d, &devnum) < 0 || in dm_list_get() 323 .devnum = devnum, in dm_list_get() 364 dev_t devnum; in md_list_get() local 366 if (sd_device_get_devnum(d, &devnum) < 0 || in md_list_get() 391 .devnum = devnum, in md_list_get() 480 assert(major(m->devnum) != 0); in delete_dm() [all …]
|
D | test-umount.c | 32 major(m->devnum), minor(m->devnum)); in test_mount_points_list_one() 66 major(m->devnum), minor(m->devnum)); in test_swap_list_one()
|
D | umount.h | 26 dev_t devnum; member
|
/systemd-251/src/libudev/ |
D | test-libudev.c | 23 dev_t devnum; in print_device() local 61 devnum = udev_device_get_devnum(device); in print_device() 62 if (major(devnum) > 0) in print_device() 63 log_info("devnum: %u:%u", major(devnum), minor(devnum)); in print_device() 128 dev_t devnum = makedev(1, 3); in test_device_devnum() local 131 log_info("/* %s, device %d:%d */", __func__, major(devnum), minor(devnum)); in test_device_devnum() 133 device = udev_device_new_from_devnum(udev, 'c', devnum); in test_device_devnum()
|
D | libudev-device.c | 100 dev_t devnum; in udev_device_get_devnum() local 105 r = sd_device_get_devnum(udev_device->device, &devnum); in udev_device_get_devnum() 111 return devnum; in udev_device_get_devnum() 283 _public_ struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum… in udev_device_new_from_devnum() argument 287 r = sd_device_new_from_devnum(&device, type, devnum); in udev_device_new_from_devnum()
|
D | libudev.h | 65 struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum);
|
/systemd-251/src/libsystemd/sd-device/ |
D | sd-device.c | 272 static int device_new_from_mode_and_devnum(sd_device **ret, mode_t mode, dev_t devnum) { in device_new_from_mode_and_devnum() argument 288 if (major(devnum) == 0) in device_new_from_mode_and_devnum() 291 if (asprintf(&syspath, "/sys/dev/%s/%u:%u", t, major(devnum), minor(devnum)) < 0) in device_new_from_mode_and_devnum() 303 if (n != devnum) in device_new_from_mode_and_devnum() 316 _public_ int sd_device_new_from_devnum(sd_device **ret, char type, dev_t devnum) { in sd_device_new_from_devnum() argument 320 return device_new_from_mode_and_devnum(ret, type == 'b' ? S_IFBLK : S_IFCHR, devnum); in sd_device_new_from_devnum() 487 dev_t devnum; in sd_device_new_from_devname() local 500 if (device_path_parse_major_minor(devname, &mode, &devnum) >= 0) in sd_device_new_from_devname() 504 return device_new_from_mode_and_devnum(ret, mode, devnum); in sd_device_new_from_devname() 636 device->devnum = makedev(maj, min); in device_set_devnum() [all …]
|
D | test-sd-device.c | 23 dev_t devnum; in test_sd_device_one() local 137 r = sd_device_get_devnum(d, &devnum); in test_sd_device_one() 141 assert_se(major(devnum) > 0); in test_sd_device_one() 143 assert_se(sd_device_new_from_devnum(&dev, is_block ? 'b' : 'c', devnum) >= 0); in test_sd_device_one() 148 …_se(asprintf(&p, "/dev/%s/%u:%u", is_block ? "block" : "char", major(devnum), minor(devnum)) >= 0); in test_sd_device_one()
|
D | device-internal.h | 55 dev_t devnum; member
|
D | device-private.c | 1011 if (!has_info && major(device->devnum) == 0 && device->ifindex == 0) { in device_update_db() 1039 if (major(device->devnum) > 0) { in device_update_db()
|
/systemd-251/src/test/ |
D | test-devnum-util.c | 109 static void test_devnum_format_str_one(dev_t devnum, const char *s) { in test_devnum_format_str_one() argument 112 assert_se(streq(FORMAT_DEVNUM(devnum), s)); in test_devnum_format_str_one() 114 assert_se(x == devnum); in test_devnum_format_str_one()
|
D | test-udev.c | 149 dev_t devnum = makedev(0, 0); in run() local 152 (void) sd_device_get_devnum(dev, &devnum); in run() 153 if (mknod(devname, mode, devnum) < 0) in run()
|
D | meson.build | 257 [files('test-devnum-util.c')],
|
/systemd-251/src/shared/ |
D | quota-util.c | 11 int quotactl_devnum(int cmd, dev_t devnum, int id, void *addr) { in quotactl_devnum() argument 18 r = device_path_make_major_minor(S_IFBLK, devnum, &devnode); in quotactl_devnum()
|
D | quota-util.h | 18 int quotactl_devnum(int cmd, dev_t devnum, int id, void *addr);
|
/systemd-251/src/gpt-auto-generator/ |
D | gpt-auto-generator.c | 45 static int open_parent_block_device(dev_t devnum, int *ret_fd) { in open_parent_block_device() argument 54 r = sd_device_new_from_devnum(&d, 'b', devnum); in open_parent_block_device() 62 DEVNUM_FORMAT_VAL(devnum)); in open_parent_block_device() 692 static int enumerate_partitions(dev_t devnum) { in enumerate_partitions() argument 697 r = open_parent_block_device(devnum, &fd); in enumerate_partitions()
|
/systemd-251/src/udev/ |
D | udevadm-info.c | 183 dev_t devnum; in print_record() local 223 if (sd_device_get_devnum(device, &devnum) >= 0) in print_record() 227 streq_ptr(subsys, "block") ? 'b' : 'c', major(devnum), minor(devnum), in print_record()
|
D | udev-node.c | 494 dev_t devnum; in device_get_devpath_by_devnum() local 504 r = sd_device_get_devnum(dev, &devnum); in device_get_devpath_by_devnum() 508 … return device_path_make_major_minor(streq(subsystem, "block") ? S_IFBLK : S_IFCHR, devnum, ret); in device_get_devpath_by_devnum()
|
D | udev-event.c | 291 dev_t devnum; in udev_event_subst_format() local 293 r = sd_device_get_devnum(dev, &devnum); in udev_event_subst_format() 296 …l(&s, l, &truncated, "%u", r < 0 ? 0 : type == FORMAT_SUBST_MAJOR ? major(devnum) : minor(devnum)); in udev_event_subst_format()
|
D | udevd.c | 856 dev_t devnum = makedev(0, 0); in event_is_blocked() local 922 r = sd_device_get_devnum(event->dev, &devnum); in event_is_blocked() 942 if (major(devnum) != 0) { in event_is_blocked() 950 devnum == d && is_block == streq(s, "block")) in event_is_blocked()
|
/systemd-251/src/systemd/ |
D | sd-device.h | 61 int sd_device_new_from_devnum(sd_device **ret, char type, dev_t devnum); 76 int sd_device_get_devnum(sd_device *device, dev_t *devnum);
|
/systemd-251/src/core/ |
D | device.c | 598 dev_t devnum; in device_process_new() local 616 if (sd_device_get_devnum(dev, &devnum) >= 0) { in device_process_new() 632 st.st_rdev != devnum)) { in device_process_new()
|