Skip to content

Commit 9e0ead7

Browse files
committed
driver/usbloader: specify usb device path when invoking uuu
Avoid races/colisions when multiple targets are connected to the same exporter by telling `uuu` which usb device path to use.
1 parent 5079ec3 commit 9e0ead7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labgrid/driver/usbloader.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ def load(self, filename=None):
192192
file_mf.hash = self.get_hash(filename)
193193
file_mf.sync_to_resource()
194194

195-
# Enable verbose mode to avoid messing up the terminal
196-
cmd = ["-v"]
195+
# Enable verbose mode to avoid messing up the terminal, and pass the usb device path to `uuu`. Notice that
196+
# `uuu` specifies paths in <bus>:<port><port>... format.
197+
cmd = ["-v", "-m", self.loader.path.replace(".", "").replace("-", ":")]
197198
cmd += ['-b', self.script] if self.script else []
198199

199200
processwrapper.check_output(

0 commit comments

Comments
 (0)