|
@@ -1178,11 +1178,11 @@ static struct interface_descriptor fc_port_ns_plogi_desc =
|
1178
|
1178
|
* @v transport Transport interface
|
1179
|
1179
|
* @v node Fibre Channel node name
|
1180
|
1180
|
* @v port Fibre Channel port name
|
|
1181
|
+ * @v name Symbolic port name
|
1181
|
1182
|
* @ret rc Return status code
|
1182
|
1183
|
*/
|
1183
|
1184
|
int fc_port_open ( struct interface *transport, const struct fc_name *node_wwn,
|
1184
|
|
- const struct fc_name *port_wwn ) {
|
1185
|
|
- static unsigned int portindex = 0;
|
|
1185
|
+ const struct fc_name *port_wwn, const char *name ) {
|
1186
|
1186
|
struct fc_port *port;
|
1187
|
1187
|
|
1188
|
1188
|
/* Allocate and initialise structure */
|
|
@@ -1198,9 +1198,7 @@ int fc_port_open ( struct interface *transport, const struct fc_name *node_wwn,
|
1198
|
1198
|
INIT_LIST_HEAD ( &port->xchgs );
|
1199
|
1199
|
memcpy ( &port->node_wwn, node_wwn, sizeof ( port->node_wwn ) );
|
1200
|
1200
|
memcpy ( &port->port_wwn, port_wwn, sizeof ( port->port_wwn ) );
|
1201
|
|
-
|
1202
|
|
- /* Create device name */
|
1203
|
|
- snprintf ( port->name, sizeof ( port->name ), "fc%d", portindex++ );
|
|
1201
|
+ snprintf ( port->name, sizeof ( port->name ), "%s", name );
|
1204
|
1202
|
|
1205
|
1203
|
DBGC ( port, "FCPORT %s opened as %s",
|
1206
|
1204
|
port->name, fc_ntoa ( &port->node_wwn ) );
|