1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

udev/path-id: comment why USB host number is dropped from the PATH_ID

Closes #21617.

The comment is borrowed from https://github.com/systemd/systemd/pull/21620#discussion_r762521508.
This commit is contained in:
Yu Watanabe 2021-12-06 16:05:35 +09:00
parent 56615f203b
commit 6885a857e4

View File

@ -503,6 +503,10 @@ static sd_device *handle_usb(sd_device *parent, char **path) {
return parent;
port++;
/* USB host number may change across reboots (and probably even without reboot). The part after
* USB host number is determined by device topology and so does not change. Hence, drop the
* host number and always use '0' instead. */
path_prepend(path, "usb-0:%s", port);
return skip_subsystem(parent, "usb");
}