@@ -833,8 +833,7 @@ bool parse_pg_max_ports(struct torus *t, const char *parse_sep)
}
static
-bool parse_guid_port(struct torus *t, guid_t *guid, int *port,
- const char *typestr, const char *parse_sep)
+bool parse_guid(struct torus *t, guid_t *guid, const char *parse_sep)
{
char *val;
bool success = false;
@@ -845,11 +844,6 @@ bool parse_guid_port(struct torus *t, guid_t *guid, int *port,
*guid = strtoull(val, NULL, 0);
*guid = cl_hton64(*guid);
- val = strtok(NULL, parse_sep);
- if (!val)
- goto out;
- *port = strtol(val, NULL, 0);
-
success = true;
out:
return success;
@@ -858,15 +852,14 @@ out:
static
bool parse_dir_link(int c_dir, struct torus *t, const char *parse_sep)
{
- int sw_port0, sw_port1;
guid_t sw_guid0, sw_guid1;
struct link *l;
bool success = false;
- if (!parse_guid_port(t, &sw_guid0, &sw_port0, "switch", parse_sep))
+ if (!parse_guid(t, &sw_guid0, parse_sep))
goto out;
- if (!parse_guid_port(t, &sw_guid1, &sw_port1, "switch", parse_sep))
+ if (!parse_guid(t, &sw_guid1, parse_sep))
goto out;
if (!t) {