Skip to content

Commit c3fae34

Browse files
committed
adapter: replace 'interface' with 'adapter driver'
Comments and output strings still reference the term 'interface', while 'adapter driver' should be used. While there, drop the useless test if CMD_ARGV[0] is an empty string, as this is not possible when CMD_ARGC > 0. Change-Id: I7b46b5dd3cec53d8b5b7559d941ee9ae3bd1d89b Signed-off-by: Antonio Borneo <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8808 Tested-by: jenkins Reviewed-by: zapb <[email protected]>
1 parent cbd7987 commit c3fae34

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/jtag/adapter.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ int adapter_init(struct command_context *cmd_ctx)
187187
int adapter_quit(void)
188188
{
189189
if (is_adapter_initialized() && adapter_driver->quit) {
190-
/* close the JTAG interface */
191190
int result = adapter_driver->quit();
192191
if (result != ERROR_OK)
193192
LOG_ERROR("failed: %d", result);
@@ -380,7 +379,7 @@ bool adapter_usb_location_equal(uint8_t dev_bus, uint8_t *port_path, size_t path
380379

381380
COMMAND_HANDLER(handle_adapter_name)
382381
{
383-
/* return the name of the interface */
382+
/* return the name of the adapter driver */
384383
/* TCL code might need to know the exact type... */
385384
/* FUTURE: we allow this as a means to "set" the interface. */
386385

@@ -414,14 +413,14 @@ COMMAND_HANDLER(handle_adapter_driver_command)
414413
{
415414
int retval;
416415

417-
/* check whether the interface is already configured */
416+
/* check whether the adapter driver is already configured */
418417
if (adapter_driver) {
419-
LOG_WARNING("Interface already configured, ignoring");
418+
LOG_WARNING("Adapter driver already configured, ignoring");
420419
return ERROR_OK;
421420
}
422421

423-
/* interface name is a mandatory argument */
424-
if (CMD_ARGC != 1 || CMD_ARGV[0][0] == '\0')
422+
/* adapter driver name is a mandatory argument */
423+
if (CMD_ARGC != 1)
425424
return ERROR_COMMAND_SYNTAX_ERROR;
426425

427426
for (unsigned int i = 0; adapter_drivers[i]; i++) {
@@ -439,10 +438,10 @@ COMMAND_HANDLER(handle_adapter_driver_command)
439438
return allow_transports(CMD_CTX, adapter_driver->transports);
440439
}
441440

442-
/* no valid interface was found (i.e. the configuration option,
443-
* didn't match one of the compiled-in interfaces
441+
/* no valid adapter driver was found (i.e. the configuration option,
442+
* didn't match one of the compiled-in drivers
444443
*/
445-
LOG_ERROR("The specified debug interface was not found (%s)",
444+
LOG_ERROR("The specified adapter driver was not found (%s)",
446445
CMD_ARGV[0]);
447446
command_print(CMD, "The following adapter drivers are available:");
448447
CALL_COMMAND_HANDLER(dump_adapter_driver_list);

0 commit comments

Comments
 (0)