• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
2index 049d565..d819640 100644
3--- a/libusb/os/linux_usbfs.c
4+++ b/libusb/os/linux_usbfs.c
5@@ -215,7 +215,7 @@ static int get_usbfs_fd(struct libusb_device *dev, int access_mode, int silent)
6 	}
7
8 	if (!silent) {
9-		usbi_err(ctx, "libusb couldn't open USB device %s, errno=%d", path, errno);
10+		usbi_err(ctx, "libusb couldn't open USB device, errno=%d", errno);
11 		if (errno == EACCES && access_mode == O_RDWR)
12 			usbi_err(ctx, "libusb requires write access to USB device nodes");
13 	}
14diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c
15index 761ca37..b8001da 100644
16--- a/libusb/os/sunos_usb.c
17+++ b/libusb/os/sunos_usb.c
18@@ -173,7 +173,6 @@ sunos_usb_ioctl(struct libusb_device *dev, int cmd)
19 	nvlist_add_int32(nvlist, "port", dev->port_number);
20 	/* find the hub path */
21 	snprintf(path_arg, sizeof(path_arg), "/devices%s:hubd", hubpath);
22-	usbi_dbg(DEVICE_CTX(dev), "ioctl hub path: %s", path_arg);
23
24 	fd = open(path_arg, O_RDONLY);
25 	if (fd < 0) {
26@@ -530,9 +529,9 @@ sunos_fill_in_dev_info(di_node_t node, struct libusb_device *dev)
27 		dev->speed = LIBUSB_SPEED_SUPER;
28 	}
29
30-	usbi_dbg(DEVICE_CTX(dev), "vid=%x pid=%x, path=%s, bus_nmber=0x%x, port_number=%d, speed=%d",
31+	usbi_dbg(DEVICE_CTX(dev), "vid=%x pid=%x, bus_nmber=0x%x, port_number=%d, speed=%d",
32 	    dev->device_descriptor.idVendor, dev->device_descriptor.idProduct,
33-	    dpriv->phypath, dev->bus_number, dev->port_number, dev->speed);
34+	    dev->bus_number, dev->port_number, dev->speed);
35
36 	return (LIBUSB_SUCCESS);
37 }
38@@ -592,7 +591,6 @@ sunos_add_devices(di_devlink_t link, void *arg)
39
40 	/* dn is the usb device */
41 	for (dn = di_child_node(myself); dn != DI_NODE_NIL; dn = di_sibling_node(dn)) {
42-		usbi_dbg(NULL, "device path:%s", di_devfs_path(dn));
43 		/* skip hub devices, because its driver can not been unload */
44 		if (di_prop_lookup_ints(DDI_DEV_T_ANY, dn, "usb-port-count", &addr_prop) != -1)
45 			continue;
46@@ -1051,7 +1049,7 @@ sunos_get_active_config_descriptor(struct libusb_device *dev,
47 	cfg = (struct libusb_config_descriptor *)dpriv->raw_cfgdescr;
48 	len = MIN(len, libusb_le16_to_cpu(cfg->wTotalLength));
49 	memcpy(buf, dpriv->raw_cfgdescr, len);
50-	usbi_dbg(DEVICE_CTX(dev), "path:%s len %zu", dpriv->phypath, len);
51+	usbi_dbg(DEVICE_CTX(dev), "len %zu", len);
52
53 	return (len);
54 }
55diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
56index c77bd20..e228e44 100644
57--- a/libusb/os/windows_winusb.c
58+++ b/libusb/os/windows_winusb.c
59@@ -745,7 +745,7 @@ static void cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handl
60
61 	priv->config_descriptor = calloc(num_configurations, sizeof(PUSB_CONFIGURATION_DESCRIPTOR));
62 	if (priv->config_descriptor == NULL) {
63-		usbi_err(ctx, "could not allocate configuration descriptor array for '%s'", priv->dev_id);
64+		usbi_err(ctx, "could not allocate configuration descriptor array");
65 		return;
66 	}
67
68@@ -770,19 +770,19 @@ static void cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handl
69 		// coverity[tainted_data_argument]
70 		if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, &cd_buf_short, size,
71 			&cd_buf_short, size, &ret_size, NULL)) {
72-			usbi_info(ctx, "could not access configuration descriptor %u (dummy) for '%s': %s", i, priv->dev_id, windows_error_str(0));
73+			usbi_info(ctx, "could not access configuration descriptor %u (dummy): %s", i, windows_error_str(0));
74 			continue;
75 		}
76
77 		if ((ret_size != size) || (cd_buf_short.desc.wTotalLength < sizeof(USB_CONFIGURATION_DESCRIPTOR))) {
78-			usbi_info(ctx, "unexpected configuration descriptor %u size (dummy) for '%s'", i, priv->dev_id);
79+			usbi_info(ctx, "unexpected configuration descriptor %u size (dummy)", i);
80 			continue;
81 		}
82
83 		size = sizeof(USB_DESCRIPTOR_REQUEST) + cd_buf_short.desc.wTotalLength;
84 		cd_buf_actual = malloc(size);
85 		if (cd_buf_actual == NULL) {
86-			usbi_err(ctx, "could not allocate configuration descriptor %u buffer for '%s'", i, priv->dev_id);
87+			usbi_err(ctx, "could not allocate configuration descriptor %u buffer for", i);
88 			continue;
89 		}
90
91@@ -796,19 +796,19 @@ static void cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handl
92
93 		if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, cd_buf_actual, size,
94 			cd_buf_actual, size, &ret_size, NULL)) {
95-			usbi_err(ctx, "could not access configuration descriptor %u (actual) for '%s': %s", i, priv->dev_id, windows_error_str(0));
96+			usbi_err(ctx, "could not access configuration descriptor %u (actual): %s", i, windows_error_str(0));
97 			continue;
98 		}
99
100 		cd_data = (PUSB_CONFIGURATION_DESCRIPTOR)((UCHAR *)cd_buf_actual + USB_DESCRIPTOR_REQUEST_SIZE);
101
102 		if ((size != ret_size) || (cd_data->wTotalLength != cd_buf_short.desc.wTotalLength)) {
103-			usbi_err(ctx, "unexpected configuration descriptor %u size (actual) for '%s'", i, priv->dev_id);
104+			usbi_err(ctx, "unexpected configuration descriptor %u size (actual)", i);
105 			continue;
106 		}
107
108 		if (cd_data->bDescriptorType != LIBUSB_DT_CONFIG) {
109-			usbi_err(ctx, "descriptor %u not a configuration descriptor for '%s'", i, priv->dev_id);
110+			usbi_err(ctx, "descriptor %u not a configuration descriptor", i);
111 			continue;
112 		}
113
114@@ -918,18 +918,18 @@ static int init_root_hub(struct libusb_device *dev)
115 	// changes if/how Windows returns any useful speed information.
116 	handle = CreateFileA(priv->path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
117 	if (handle == INVALID_HANDLE_VALUE) {
118-		usbi_err(ctx, "could not open root hub %s: %s", priv->path, windows_error_str(0));
119+		usbi_err(ctx, "could not open root hub: %s", windows_error_str(0));
120 		return LIBUSB_ERROR_ACCESS;
121 	}
122
123 	if (!DeviceIoControl(handle, IOCTL_USB_GET_NODE_INFORMATION, NULL, 0, &hub_info, sizeof(hub_info), &size, NULL)) {
124-		usbi_warn(ctx, "could not get root hub info for '%s': %s", priv->dev_id, windows_error_str(0));
125+		usbi_warn(ctx, "could not get root hub info: %s", windows_error_str(0));
126 		CloseHandle(handle);
127 		return LIBUSB_ERROR_ACCESS;
128 	}
129
130 	num_ports = hub_info.u.HubInformation.HubDescriptor.bNumberOfPorts;
131-	usbi_dbg(ctx, "root hub '%s' reports %lu ports", priv->dev_id, ULONG_CAST(num_ports));
132+	usbi_dbg(ctx, "root hub reports %lu ports", ULONG_CAST(num_ports));
133
134 	if (windows_version >= WINDOWS_8) {
135 		// Windows 8 and later is better at reporting the speed capabilities of the root hub,
136@@ -942,8 +942,8 @@ static int init_root_hub(struct libusb_device *dev)
137 			conn_info_v2.SupportedUsbProtocols.Usb300 = 1;
138 			if (!DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2,
139 				&conn_info_v2, sizeof(conn_info_v2), &conn_info_v2, sizeof(conn_info_v2), &size, NULL)) {
140-				usbi_warn(ctx, "could not get node connection information (V2) for root hub '%s' port %lu: %s",
141-					priv->dev_id, ULONG_CAST(port_number), windows_error_str(0));
142+				usbi_warn(ctx, "could not get node connection information (V2) for root hub port %lu: %s",
143+					ULONG_CAST(port_number), windows_error_str(0));
144 				break;
145 			}
146
147@@ -982,8 +982,8 @@ static int init_root_hub(struct libusb_device *dev)
148 		conn_info.ConnectionIndex = port_number;
149 		if (!DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, &conn_info, sizeof(conn_info),
150 			&conn_info, sizeof(conn_info), &size, NULL)) {
151-			usbi_warn(ctx, "could not get node connection information for root hub '%s' port %lu: %s",
152-				priv->dev_id, ULONG_CAST(port_number), windows_error_str(0));
153+			usbi_warn(ctx, "could not get node connection information for root hub port %lu: %s",
154+				ULONG_CAST(port_number), windows_error_str(0));
155 			continue;
156 		}
157
158@@ -1053,7 +1053,7 @@ make_descriptors:
159
160 	r = alloc_root_hub_config_desc(dev, num_ports, config_desc_length, ep_interval);
161 	if (r)
162-		usbi_err(ctx, "could not allocate config descriptor for root hub '%s'", priv->dev_id);
163+		usbi_err(ctx, "could not allocate config descriptor");
164
165 	return r;
166 }
167@@ -1084,7 +1084,7 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
168 		ctx = DEVICE_CTX(dev);
169 		parent_priv = usbi_get_device_priv(parent_dev);
170 		if (parent_priv->apib->id != USB_API_HUB) {
171-			usbi_warn(ctx, "parent for device '%s' is not a hub", priv->dev_id);
172+			usbi_warn(ctx, "parent is not a hub");
173 			return LIBUSB_ERROR_NOT_FOUND;
174 		}
175
176@@ -1101,7 +1101,7 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
177 			for (depth = 1; bus_number == 0; depth++) {
178 				tmp_dev = get_ancestor(ctx, devinst, &devinst);
179 				if (tmp_dev == NULL) {
180-					usbi_warn(ctx, "ancestor for device '%s' not found at depth %u", priv->dev_id, depth);
181+					usbi_warn(ctx, "ancestor not found at depth %u", depth);
182 					return LIBUSB_ERROR_NO_DEVICE;
183 				}
184 				if (tmp_dev->bus_number != 0) {
185@@ -1116,7 +1116,7 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
186 		}
187
188 		if (bus_number == 0) {
189-			usbi_err(ctx, "program assertion failed - bus number not found for '%s'", priv->dev_id);
190+			usbi_err(ctx, "program assertion failed - bus number not found");
191 			return LIBUSB_ERROR_NOT_FOUND;
192 		}
193
194@@ -1127,7 +1127,7 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
195
196 		hub_handle = CreateFileA(parent_priv->path, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
197 		if (hub_handle == INVALID_HANDLE_VALUE) {
198-			usbi_warn(ctx, "could not open hub %s: %s", parent_priv->path, windows_error_str(0));
199+			usbi_warn(ctx, "could not open hub: %s", windows_error_str(0));
200 			return LIBUSB_ERROR_ACCESS;
201 		}
202
203@@ -1136,21 +1136,21 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
204
205 		if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, &conn_info, sizeof(conn_info),
206 			&conn_info, sizeof(conn_info), &size, NULL)) {
207-			usbi_warn(ctx, "could not get node connection information for device '%s': %s",
208-				priv->dev_id, windows_error_str(0));
209+			usbi_warn(ctx, "could not get node connection information': %s",
210+				windows_error_str(0));
211 			CloseHandle(hub_handle);
212 			return LIBUSB_ERROR_NO_DEVICE;
213 		}
214
215 		if (conn_info.ConnectionStatus == NoDeviceConnected) {
216-			usbi_err(ctx, "device '%s' is no longer connected!", priv->dev_id);
217+			usbi_err(ctx, "device is no longer connected!");
218 			CloseHandle(hub_handle);
219 			return LIBUSB_ERROR_NO_DEVICE;
220 		}
221
222 		if ((conn_info.DeviceDescriptor.bLength != LIBUSB_DT_DEVICE_SIZE)
223 			|| (conn_info.DeviceDescriptor.bDescriptorType != LIBUSB_DT_DEVICE)) {
224-			usbi_err(ctx, "device '%s' has invalid descriptor!", priv->dev_id);
225+			usbi_err(ctx, "device has invalid descriptor!");
226 			CloseHandle(hub_handle);
227 			return LIBUSB_ERROR_OTHER;
228 		}
229@@ -1161,16 +1161,15 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
230 		usbi_localize_device_descriptor(&dev->device_descriptor);
231
232 		if (conn_info.CurrentConfigurationValue == 0) {
233-			usbi_dbg(ctx, "found %u configurations for device '%s' but device is not configured (i.e. current config: 0), ignoring it",
234-				dev->device_descriptor.bNumConfigurations,
235-				priv->dev_id);
236+			usbi_dbg(ctx, "found %u configurations but device is not configured (i.e. current config: 0), ignoring it",
237+				dev->device_descriptor.bNumConfigurations);
238 			CloseHandle(hub_handle);
239 			return LIBUSB_ERROR_OTHER;
240 		}
241
242 		priv->active_config = conn_info.CurrentConfigurationValue;
243-		usbi_dbg(ctx, "found %u configurations (current config: %u) for device '%s'",
244-			dev->device_descriptor.bNumConfigurations, priv->active_config,	priv->dev_id);
245+		usbi_dbg(ctx, "found %u configurations (current config: %u)",
246+			dev->device_descriptor.bNumConfigurations, priv->active_config);
247
248 		// Cache as many config descriptors as we can
249 		cache_config_descriptors(dev, hub_handle);
250@@ -1182,8 +1181,8 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
251 			conn_info_v2.SupportedUsbProtocols.Usb300 = 1;
252 			if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2,
253 				&conn_info_v2, sizeof(conn_info_v2), &conn_info_v2, sizeof(conn_info_v2), &size, NULL)) {
254-				usbi_warn(ctx, "could not get node connection information (V2) for device '%s': %s",
255-					priv->dev_id,  windows_error_str(0));
256+				usbi_warn(ctx, "could not get node connection information (V2): %s",
257+					windows_error_str(0));
258 			} else if (conn_info_v2.Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher) {
259 				conn_info.Speed = UsbSuperSpeedPlus;
260 			} else if (conn_info_v2.Flags.DeviceIsOperatingAtSuperSpeedOrHigher) {
261@@ -1220,8 +1219,8 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d
262
263 	priv->initialized = true;
264
265-	usbi_dbg(ctx, "(bus: %u, addr: %u, depth: %u, port: %u): '%s'",
266-		dev->bus_number, dev->device_address, priv->depth, dev->port_number, priv->dev_id);
267+	usbi_dbg(ctx, "(bus: %u, addr: %u, depth: %u, port: %u)",
268+		dev->bus_number, dev->device_address, priv->depth, dev->port_number);
269
270 	return LIBUSB_SUCCESS;
271 }
272@@ -1290,18 +1289,18 @@ static int enumerate_hcd_root_hub(struct libusb_context *ctx, const char *dev_id
273 	struct libusb_device* dev;
274
275 	if (CM_Get_Child(&child_devinst, devinst, 0) != CR_SUCCESS) {
276-		usbi_warn(ctx, "could not get child devinst for '%s'", dev_id);
277+		usbi_warn(ctx, "could not get child devinst");
278 		return LIBUSB_SUCCESS;
279 	}
280
281 	dev = usbi_get_device_by_session_id(ctx, (unsigned long)child_devinst);
282 	if (dev == NULL) {
283-		usbi_warn(ctx, "HCD '%s' child not found", dev_id);
284+		usbi_warn(ctx, "HCD child not found");
285 		return LIBUSB_SUCCESS;
286 	}
287
288 	if (sscanf(dev_id, "PCI\\VEN_%04hx&DEV_%04hx%*s", &dev->device_descriptor.idVendor, &dev->device_descriptor.idProduct) != 2)
289-			usbi_warn(ctx, "could not infer VID/PID of HCD from '%s'", dev_id);
290+			usbi_warn(ctx, "could not infer VID/PID of HCD");
291 	libusb_unref_device(dev);
292 	return LIBUSB_SUCCESS;
293 }
294@@ -1388,7 +1387,7 @@ static int set_composite_interface(struct libusb_context *ctx, struct libusb_dev
295 	}
296
297 	if (interface_number >= USB_MAXINTERFACES) {
298-		usbi_warn(ctx, "interface %d too large - ignoring interface path %s", interface_number, dev_interface_path);
299+		usbi_warn(ctx, "interface %d too large - ignoring interface path", interface_number);
300 		return LIBUSB_ERROR_ACCESS;
301 	}
302
303@@ -1403,7 +1402,6 @@ static int set_composite_interface(struct libusb_context *ctx, struct libusb_dev
304 		safe_free(priv->usb_interface[interface_number].path);
305 	}
306
307-	usbi_dbg(ctx, "interface[%d] = %s", interface_number, dev_interface_path);
308 	priv->usb_interface[interface_number].path = dev_interface_path;
309 	priv->usb_interface[interface_number].apib = &usb_api_backend[api];
310 	priv->usb_interface[interface_number].sub_api = sub_api;
311@@ -1453,7 +1451,7 @@ static int set_hid_interface(struct libusb_context *ctx, struct libusb_device *d
312
313 	for (i = 0; i < priv->hid->nb_interfaces; i++) {
314 		if ((priv->usb_interface[i].path != NULL) && strcmp(priv->usb_interface[i].path, dev_interface_path) == 0) {
315-			usbi_dbg(ctx, "interface[%u] already set to %s", i, dev_interface_path);
316+			usbi_dbg(ctx, "interface[%u] already set", i);
317 			return LIBUSB_ERROR_ACCESS;
318 		}
319 	}
320@@ -1482,7 +1480,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
321
322 	key = pSetupDiOpenDevRegKey(*dev_info, dev_info_data, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ);
323 	if (key == INVALID_HANDLE_VALUE) {
324-		usbi_warn(ctx, "Cannot get the additional GUIDs for '%s'", dev_id);
325+		usbi_warn(ctx, "Cannot get the additional GUIDs");
326 		return LIBUSB_ERROR_ACCESS;
327 	}
328 	// Reserve buffer large enough to hold one GUID with two terminating characters
329@@ -1509,13 +1507,13 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
330 			// The GUID was read successfully
331 			break;
332 		} else if (s == ERROR_FILE_NOT_FOUND) {
333-			usbi_dbg(ctx, "no DeviceInterfaceGUID registered for '%s'", dev_id);
334+			usbi_dbg(ctx, "no DeviceInterfaceGUID registered");
335 			err = LIBUSB_ERROR_ACCESS;
336 			goto exit;
337 		} else if (s == ERROR_MORE_DATA) {
338 			if (pass == 1) {
339 				// Previous pass should have allocated enough memory, but reading failed
340-				usbi_warn(ctx, "unexpected error from pRegQueryValueExA for '%s'", dev_id);
341+				usbi_warn(ctx, "unexpected error from pRegQueryValueExA");
342 				err = LIBUSB_ERROR_OTHER;
343 				goto exit;
344 			}
345@@ -1527,7 +1525,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
346 			}
347 			guid_string = new_guid_string;
348 		} else {
349-			usbi_warn(ctx, "unexpected error from pRegQueryValueExA for '%s'", dev_id);
350+			usbi_warn(ctx, "unexpected error from pRegQueryValueExA");
351 			err = LIBUSB_ERROR_ACCESS;
352 			goto exit;
353 		}
354@@ -1552,7 +1550,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
355 		while (guids_left) {
356 			guid = strchr(guid, '}');
357 			if (guid == NULL) {
358-				usbi_warn(ctx, "no GUID with index %d registered for '%s'", guid_number, dev_id);
359+				usbi_warn(ctx, "no GUID with index %d registered", guid_number);
360 				err = LIBUSB_ERROR_ACCESS;
361 				goto exit;
362 			}
363@@ -1566,7 +1564,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
364 		// Add terminating char to the string
365 		guid_term = strchr(guid, '}');
366 		if (guid_term == NULL) {
367-			usbi_warn(ctx, "no GUID with index %d registered for '%s'", guid_number, dev_id);
368+			usbi_warn(ctx, "no GUID with index %d registered", guid_number);
369 			err = LIBUSB_ERROR_ACCESS;
370 			goto exit;
371 		}
372@@ -1574,7 +1572,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
373 		guid_term++;
374 		*guid_term = '\0';
375 	} else {
376-		usbi_warn(ctx, "unexpected type of DeviceInterfaceGUID for '%s'", dev_id);
377+		usbi_warn(ctx, "unexpected type of DeviceInterfaceGUID");
378 		err = LIBUSB_ERROR_ACCESS;
379 		goto exit;
380 	}
381@@ -1586,7 +1584,7 @@ static int get_guid(struct libusb_context *ctx, char *dev_id, HDEVINFO *dev_info
382 		goto exit;
383 	}
384 	if (!string_to_guid(guid, *if_guid)) {
385-		usbi_warn(ctx, "device '%s' has malformed DeviceInterfaceGUID string '%s', skipping", dev_id, guid);
386+		usbi_warn(ctx, "device has malformed DeviceInterfaceGUID string '%s', skipping", guid);
387 		free(*if_guid);
388 		*if_guid = NULL;
389 		goto exit;
390@@ -1738,7 +1736,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
391 				continue;
392 			}
393
394-			usbi_dbg(ctx, "ENUM processing %s", dev_id);
395+			usbi_dbg(ctx, "ENUM processing");
396
397 			// Set API to use or get additional data from generic pass
398 			api = USB_API_UNSUPPORTED;
399@@ -1752,7 +1750,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
400 				// This will allow us to enumerate all classes during the GEN pass
401 				if (!pSetupDiGetDeviceRegistryPropertyA(*dev_info, &dev_info_data, SPDRP_ENUMERATOR_NAME,
402 					NULL, (PBYTE)enumerator, sizeof(enumerator), NULL)) {
403-					usbi_err(ctx, "could not read enumerator string for device '%s': %s", dev_id, windows_error_str(0));
404+					usbi_err(ctx, "could not read enumerator string for device: %s", windows_error_str(0));
405 					LOOP_BREAK(LIBUSB_ERROR_OTHER);
406 				}
407 				for (j = 0; j < nb_usb_enumerators; j++) {
408@@ -1778,7 +1776,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
409 				// We use the GEN pass to detect driverless devices...
410 				if (!pSetupDiGetDeviceRegistryPropertyA(*dev_info, &dev_info_data, SPDRP_DRIVER,
411 					NULL, NULL, 0, NULL) && (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) {
412-					usbi_info(ctx, "The following device has no driver: '%s'", dev_id);
413+					usbi_info(ctx, "The following device has no driver");
414 					usbi_info(ctx, "libusb will not be able to access it");
415 				}
416 				// ...and to add the additional device interface GUIDs
417@@ -1813,7 +1811,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
418 					LOOP_BREAK(LIBUSB_ERROR_NO_MEM);
419 				} else {
420 					if (r != LIBUSB_SUCCESS) {
421-						usbi_warn(ctx, "unexpected error during getting DeviceInterfaceGUID for '%s'", dev_id);
422+						usbi_warn(ctx, "unexpected error during getting DeviceInterfaceGUID");
423 					}
424 				}
425 				break;
426@@ -1825,11 +1823,11 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
427 				// Get the API type (after checking that the driver installation is OK)
428 				if ((!pSetupDiGetDeviceRegistryPropertyA(*dev_info, &dev_info_data, SPDRP_INSTALL_STATE,
429 					NULL, (PBYTE)&install_state, sizeof(install_state), &size)) || (size != sizeof(install_state))) {
430-					usbi_warn(ctx, "could not detect installation state of driver for '%s': %s",
431-						dev_id, windows_error_str(0));
432+					usbi_warn(ctx, "could not detect installation state of driver: %s",
433+						windows_error_str(0));
434 				} else if (install_state != 0) {
435-					usbi_warn(ctx, "driver for device '%s' is reporting an issue (code: %lu) - skipping",
436-						dev_id, ULONG_CAST(install_state));
437+					usbi_warn(ctx, "driver for device is reporting an issue (code: %lu) - skipping",
438+						ULONG_CAST(install_state));
439 					continue;
440 				}
441 				get_api_type(dev_info, &dev_info_data, &api, &sub_api);
442@@ -1851,7 +1849,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
443 						libusb_unref_device(dev);
444 					}
445
446-					usbi_dbg(ctx, "unlisted ancestor for '%s' (non USB HID, newly connected, etc.) - ignoring", dev_id);
447+					usbi_dbg(ctx, "unlisted ancestor (non USB HID, newly connected, etc.) - ignoring");
448 					continue;
449 				}
450
451@@ -1939,7 +1937,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
452 							}
453 							priv->root_hub = true;
454 							dev->bus_number = ++bus_number;
455-							usbi_dbg(ctx, "assigning Root Hub '%s' bus number %u", dev_id, bus_number);
456+							usbi_dbg(ctx, "assigning Root Hub bus number %u", bus_number);
457 						}
458 					} else {
459 						libusb_unref_device(parent_dev);
460@@ -1968,7 +1966,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
461 			case GEN_PASS:
462 				port_nr = 0;
463 				if (!get_dev_port_number(*dev_info, &dev_info_data, &port_nr))
464-					usbi_warn(ctx, "could not retrieve port number for device '%s': %s", dev_id, windows_error_str(0));
465+					usbi_warn(ctx, "could not retrieve port number: %s", windows_error_str(0));
466 				r = init_device(dev, parent_dev, (uint8_t)port_nr, dev_info_data.DevInst);
467 				if (r == LIBUSB_SUCCESS) {
468 					// Append device to the list of discovered devices
469@@ -1980,7 +1978,7 @@ static int winusb_get_device_list(struct libusb_context *ctx, struct discovered_
470 				} else {
471 					// Failed to initialize a single device doesn't stop us from enumerating all other devices,
472 					// but we skip it (don't add to list of discovered devices)
473-					usbi_warn(ctx, "failed to initialize device '%s'", priv->dev_id);
474+					usbi_warn(ctx, "failed to initialize device");
475 					r = LIBUSB_SUCCESS;
476 				}
477 				break;
478@@ -2609,7 +2607,7 @@ static int winusbx_open(int sub_api, struct libusb_device_handle *dev_handle)
479 				&& (priv->usb_interface[i].apib->id == USB_API_WINUSBX)) {
480 			file_handle = windows_open(dev_handle, priv->usb_interface[i].path, GENERIC_READ | GENERIC_WRITE);
481 			if (file_handle == INVALID_HANDLE_VALUE) {
482-				usbi_err(HANDLE_CTX(dev_handle), "could not open device %s (interface %d): %s", priv->usb_interface[i].path, i, windows_error_str(0));
483+				usbi_err(HANDLE_CTX(dev_handle), "could not open device (interface %d): %s", i, windows_error_str(0));
484 				switch (GetLastError()) {
485 				case ERROR_FILE_NOT_FOUND: // The device was disconnected
486 					return LIBUSB_ERROR_NO_DEVICE;
487@@ -4004,7 +4002,7 @@ static int hid_open(int sub_api, struct libusb_device_handle *dev_handle)
488 				usbi_warn(HANDLE_CTX(dev_handle), "could not open HID device in R/W mode (keyboard or mouse?) - trying without");
489 				hid_handle = windows_open(dev_handle, priv->usb_interface[i].path, 0);
490 				if (hid_handle == INVALID_HANDLE_VALUE) {
491-					usbi_err(HANDLE_CTX(dev_handle), "could not open device %s (interface %d): %s", priv->path, i, windows_error_str(0));
492+					usbi_err(HANDLE_CTX(dev_handle), "could not open device (interface %d): %s", i, windows_error_str(0));
493 					switch (GetLastError()) {
494 					case ERROR_FILE_NOT_FOUND: // The device was disconnected
495 						return LIBUSB_ERROR_NO_DEVICE;
496