projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56615f2
)
udev/path-id: comment why USB host number is dropped from the PATH_ID
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 6 Dec 2021 07:05:35 +0000
(16:05 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 6 Dec 2021 07:06:04 +0000
(16:06 +0900)
Closes #21617.
The comment is borrowed from https://github.com/systemd/systemd/pull/21620#discussion_r762521508.
src/udev/udev-builtin-path_id.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-builtin-path_id.c
b/src/udev/udev-builtin-path_id.c
index 9f71fadeea8b1f31446be24d0fc3adaabcaf33d5..6fdd3eceea3176bab212ad2cf912cc5b4b84298f 100644
(file)
--- a/
src/udev/udev-builtin-path_id.c
+++ b/
src/udev/udev-builtin-path_id.c
@@
-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");
}