Change in osmo-remsim[master]: remsim-client: Query + Store the USB device path

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Feb 16 14:46:49 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16628 )

Change subject: remsim-client: Query + Store the USB device path
......................................................................

remsim-client: Query + Store the USB device path

While the user may have specified a USB path at the command line
(or not), let's make sure we obtain the actual path after opening
the respective USB device.

Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97
---
M src/client/simtrace2-remsim_client.c
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c
index 173b890..846ce85 100644
--- a/src/client/simtrace2-remsim_client.c
+++ b/src/client/simtrace2-remsim_client.c
@@ -87,6 +87,7 @@
 	/* slot on which this card emulation instance runs */
 	struct st_slot *slot;
 	struct cardemu_usb_msg_status last_status;
+	char *usb_path;
 };
 
 /* global GSMTAP instance */
@@ -993,6 +994,10 @@
 		return;
 	}
 
+	/* (re)determine the USB path of the opened device */
+	talloc_free(ci->usb_path);
+	ci->usb_path = osmo_libusb_dev_get_path_c(ci, libusb_get_device(transp->usb_devh));
+
 	rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num);
 	if (rc < 0) {
 		fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97
Gerrit-Change-Number: 16628
Gerrit-PatchSet: 8
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200216/e5803533/attachment.htm>


More information about the gerrit-log mailing list