transport: use a bitmask for the transport
Move the transport's names in a local array in the transport framework. Replace the string struct transport::name, that identifies the transport, with a bitmask where each bit corresponds to one of the available transports. Change-Id: I6bdf7264d5979c355299f63fcf80bf54dcd95cee Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8674 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
@@ -136,7 +136,7 @@ static int swim_transport_init(struct command_context *cmd_ctx)
|
||||
}
|
||||
|
||||
static struct transport swim_transport = {
|
||||
.name = "swim",
|
||||
.id = TRANSPORT_SWIM,
|
||||
.select = swim_transport_select,
|
||||
.init = swim_transport_init,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user