udev-builtin-path_id.c revision e7eb5a8d88367a755944fdda3023a308e5272953
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * compose persistent device path
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * Logic based on Hannes Reinecke's shell script.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * This program is free software: you can redistribute it and/or modify
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * it under the terms of the GNU General Public License as published by
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * the Free Software Foundation, either version 2 of the License, or
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * (at your option) any later version.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * This program is distributed in the hope that it will be useful,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * but WITHOUT ANY WARRANTY; without even the implied warranty of
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * GNU General Public License for more details.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * You should have received a copy of the GNU General Public License
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * along with this program. If not, see <http://www.gnu.org/licenses/>.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringstatic int path_prepend(char **path, const char *fmt, ...) {
f2cbe59e113f08549949a76ac5b9b3972df4cc30Lennart Poettering err = asprintf(&new, "%s-%s", pre, *path);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering** Linux only supports 32 bit luns.
d21ed1ead18d16d35c30299a69d3366847f8a039Lennart Poettering** See drivers/scsi/scsi_scan.c::scsilun_to_int() for more details.
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poetteringstatic int format_lun_number(struct udev_device *dev, char **path) {
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poettering unsigned long lun = strtoul(udev_device_get_sysnum(dev), NULL, 10);
acf97e213e69a97e63ab8f7fad7ecd53608c757aLennart Poettering /* address method 0, peripheral device addressing with bus id of zero */
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering return path_prepend(path, "lun-%lu", lun);
3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3Lennart Poettering /* handle all other lun addressing methods by using a variant of the original lun format */
6e18cc9fa078d2a967251017ddb5baefb104b720Lennart Poettering return path_prepend(path, "lun-0x%04lx%04lx00000000", lun & 0xffff, (lun >> 16) & 0xffff);
c454426c54c9beb274f415a80c64a4f1580700e7Lennart Poetteringstatic struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys) {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering subsystem = udev_device_get_subsystem(parent);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if (subsystem == NULL || !streq(subsystem, subsys))
acf97e213e69a97e63ab8f7fad7ecd53608c757aLennart Poetteringstatic struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent, char **path) {
acf97e213e69a97e63ab8f7fad7ecd53608c757aLennart Poettering struct udev *udev = udev_device_get_udev(parent);
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering fcdev = udev_device_new_from_subsystem_sysname(udev, "fc_transport", udev_device_get_sysname(targetdev));
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering port = udev_device_get_sysattr_value(fcdev, "port_name");
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering path_prepend(path, "fc-%s-%s", port, lun);
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poetteringstatic struct udev_device *handle_scsi_sas_wide_port(struct udev_device *parent, char **path) {
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering struct udev *udev = udev_device_get_udev(parent);
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen target_parent = udev_device_get_parent(targetdev);
3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3Lennart Poettering sasdev = udev_device_new_from_subsystem_sysname(udev, "sas_device",
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering sas_address = udev_device_get_sysattr_value(sasdev, "sas_address");
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering path_prepend(path, "sas-%s-%s", sas_address, lun);
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poetteringstatic struct udev_device *handle_scsi_sas(struct udev_device *parent, char **path)
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering struct udev *udev = udev_device_get_udev(parent);
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering struct udev_device *target_sasdev = NULL;
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering struct udev_device *expander_sasdev = NULL;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering target_parent = udev_device_get_parent(targetdev);
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering /* Get sas device */
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering target_sasdev = udev_device_new_from_subsystem_sysname(udev,
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering "sas_device", udev_device_get_sysname(target_parent));
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering /* The next parent is sas port */
0b63e2789f984e84f40bf6e49f5da15c87298cedLennart Poettering port = udev_device_get_parent(target_parent);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering /* Get port device */
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering port_sasdev = udev_device_new_from_subsystem_sysname(udev,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering "sas_port", udev_device_get_sysname(port));
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering phy_count = udev_device_get_sysattr_value(port_sasdev, "num_phys");
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering /* Check if we are simple disk */
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering parent = handle_scsi_sas_wide_port(parent, path);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering /* Get connected phy */
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering phy_id = udev_device_get_sysattr_value(target_sasdev, "phy_identifier");
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering /* The port's parent is either hba or expander */
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering /* Get expander device */
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering expander_sasdev = udev_device_new_from_subsystem_sysname(udev,
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering "sas_device", udev_device_get_sysname(expander));
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering /* Get expander's address */
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sas_address = udev_device_get_sysattr_value(expander_sasdev,
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering "sas_address");
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering path_prepend(path, "sas-exp%s-phy%s-%s", sas_address, phy_id, lun);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering path_prepend(path, "sas-phy%s-%s", phy_id, lun);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringstatic struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **path) {
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering struct udev *udev = udev_device_get_udev(parent);
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering /* find iscsi session */
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering transportdev = udev_device_get_parent(transportdev);
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering if (startswith(udev_device_get_sysname(transportdev), "session"))
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering /* find iscsi session device */
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering sessiondev = udev_device_new_from_subsystem_sysname(udev, "iscsi_session", udev_device_get_sysname(transportdev));
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering target = udev_device_get_sysattr_value(sessiondev, "targetname");
b6b1849830f5e4a6065c3b0c993668e500c954d3Lennart Poettering if (asprintf(&connname, "connection%s:0", udev_device_get_sysnum(transportdev)) < 0) {
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering conndev = udev_device_new_from_subsystem_sysname(udev, "iscsi_connection", connname);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering addr = udev_device_get_sysattr_value(conndev, "persistent_address");
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering port = udev_device_get_sysattr_value(conndev, "persistent_port");
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering path_prepend(path, "ip-%s:%s-iscsi-%s-%s", addr, port, target, lun);
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poetteringstatic struct udev_device *handle_scsi_ata(struct udev_device *parent, char **path) {
b6b1849830f5e4a6065c3b0c993668e500c954d3Lennart Poettering struct udev *udev = udev_device_get_udev(parent);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering target_parent = udev_device_get_parent(targetdev);
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen atadev = udev_device_new_from_subsystem_sysname(udev, "ata_port", udev_device_get_sysname(target_parent));
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering port_no = udev_device_get_sysattr_value(atadev, "port_no");
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringstatic struct udev_device *handle_scsi_default(struct udev_device *parent, char **path) {
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4)
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering * Rebase host offset to get the local relative number
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering * Note: This is by definition racy, unreliable and too simple.
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * Please do not copy this model anywhere. It's just a left-over
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * from the time we had no idea how things should look like in
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * Making assumptions about a global in-kernel counter and use
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * that to calculate a local offset is a very broken concept. It
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering * can only work as long as things are in strict order.
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * The kernel needs to export the instance/port number of a
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering * controller directly, without the need for rebase magic like
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering * this. Manual driver unbind/bind, parallel hotplug/unplug will
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering * get into the way of this "I hope it works" logic.
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering base = strdup(udev_device_get_syspath(hostdev));
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) {
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering if (dent->d_type != DT_DIR && dent->d_type != DT_LNK)
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering i = strtoul(&dent->d_name[4], &rest, 10);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering * find the smallest number; the host really needs to export its
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering * own instance number per parent device; relying on the global host
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering * enumeration and plainly rebasing the numbers sounds unreliable
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringstatic struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char **path) {
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering vmbusdev = udev_device_get_parent(hostdev);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering guid_str = udev_device_get_sysattr_value(vmbusdev, "device_id");
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering if (strlen(guid_str) < 37 || guid_str[0] != '{' || guid_str[36] != '}')
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering path_prepend(path, "vmbus-%s-%s", guid, lun);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringstatic struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering devtype = udev_device_get_devtype(parent);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering if (devtype == NULL || !streq(devtype, "scsi_device"))
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering /* firewire */
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering id = udev_device_get_sysattr_value(parent, "ieee1394_id");
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers /* scsi sysfs does not have a "subsystem" for the transport */
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering parent = handle_scsi_fibre_channel(parent, path);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering parent = handle_scsi_hyperv(parent, path);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering parent = handle_scsi_default(parent, path);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringstatic struct udev_device *handle_cciss(struct udev_device *parent, char **path) {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if (sscanf(str, "c%ud%u%*s", &controller, &disk) != 2)
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering path_prepend(path, "cciss-disk%u", disk);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering parent = skip_subsystem(parent, "cciss");
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringstatic void handle_scsi_tape(struct udev_device *dev, char **path) {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering /* must be the last device in the syspath */
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if (startswith(name, "nst") && strchr("lma", name[3]) != NULL)
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering else if (startswith(name, "st") && strchr("lma", name[2]) != NULL)
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringstatic struct udev_device *handle_usb(struct udev_device *parent, char **path) {
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering devtype = udev_device_get_devtype(parent);
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering if (!streq(devtype, "usb_interface") && !streq(devtype, "usb_device"))
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poetteringstatic struct udev_device *handle_bcma(struct udev_device *parent, char **path) {
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering sysname = udev_device_get_sysname(parent);
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering if (sscanf(sysname, "bcma%*u:%u", &core) != 1)
89f7c8465cd1ab37347dd0c15920bce31e8225dfLennart Poettering/* Handle devices of AP bus in System z platform. */
89f7c8465cd1ab37347dd0c15920bce31e8225dfLennart Poetteringstatic struct udev_device *handle_ap(struct udev_device *parent, char **path) {
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering type = udev_device_get_sysattr_value(parent, "type");
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering func = udev_device_get_sysattr_value(parent, "ap_functions");
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering path_prepend(path, "ap-%s-%s", type, func);
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering path_prepend(path, "ap-%s", udev_device_get_sysname(parent));
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringstatic int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool test) {
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering /* walk up the chain of devices and compose path */
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering subsys = udev_device_get_subsystem(parent);
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering parent = handle_scsi(parent, &path, &supported_parent);
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent));
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering parent = skip_subsystem(parent, "serio");
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78Lennart Poettering path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
e7e55dbdc38f929805ab2407fbd50886043a9e7cDavid Herrmann path_prepend(&path, "platform-%s", udev_device_get_sysname(parent));
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent));
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
f647962d64e844689f3e2acfce6102fc47e76df2Michal Schmidt path_prepend(&path, "scm-%s", udev_device_get_sysname(parent));
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering path_prepend(&path, "ccw-%s", udev_device_get_sysname(parent));
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers path_prepend(&path, "ccwgroup-%s", udev_device_get_sysname(parent));
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering parent = skip_subsystem(parent, "ccwgroup");
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers path_prepend(&path, "iucv-%s", udev_device_get_sysname(parent));
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * Do not return devices with an unknown parent device type. They
fefdc04b38725457a91651218feb7000f6ccc1f4Lennart Poettering * might produce conflicting IDs if the parent does not provide a
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering * unique and predictable name.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * Do not return block devices without a well-known transport. Some
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * devices do not expose their buses and do not provide a unique
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering * and predictable name that way.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport)
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering const char *p;
8c841f21f5042b11acc91cc1b039cb162cbbe8f4Djalal Harouni /* compose valid udev tag name */
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers for (p = path, i = 0; *p; p++) {
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen /* skip all leading '_' */
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen /* avoid second '_' */
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen /* strip trailing '_' */
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers udev_builtin_add_property(dev, test, "ID_PATH", path);
fefdc04b38725457a91651218feb7000f6ccc1f4Lennart Poettering udev_builtin_add_property(dev, test, "ID_PATH_TAG", tag);
fefdc04b38725457a91651218feb7000f6ccc1f4Lennart Poetteringconst struct udev_builtin udev_builtin_path_id = {
fefdc04b38725457a91651218feb7000f6ccc1f4Lennart Poettering .help = "Compose persistent device path",