target/sbp: Remove strict param from sbp_parse_wwn
It's always set, and controls whether uppercase A-F are allowed hex values. I don't see a reason not to accept these. Signed-off-by: Andy Grover <agrover@redhat.com> Cc: Chris Boot <bootc@bootc.net> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
283669d282
commit
343d475d61
1 changed files with 4 additions and 4 deletions
|
@ -2068,7 +2068,7 @@ static int sbp_update_unit_directory(struct sbp_tport *tport)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t sbp_parse_wwn(const char *name, u64 *wwn, int strict)
|
static ssize_t sbp_parse_wwn(const char *name, u64 *wwn)
|
||||||
{
|
{
|
||||||
const char *cp;
|
const char *cp;
|
||||||
char c, nibble;
|
char c, nibble;
|
||||||
|
@ -2088,7 +2088,7 @@ static ssize_t sbp_parse_wwn(const char *name, u64 *wwn, int strict)
|
||||||
err = 3;
|
err = 3;
|
||||||
if (isdigit(c))
|
if (isdigit(c))
|
||||||
nibble = c - '0';
|
nibble = c - '0';
|
||||||
else if (isxdigit(c) && (islower(c) || !strict))
|
else if (isxdigit(c))
|
||||||
nibble = tolower(c) - 'a' + 10;
|
nibble = tolower(c) - 'a' + 10;
|
||||||
else
|
else
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -2117,7 +2117,7 @@ static struct se_node_acl *sbp_make_nodeacl(
|
||||||
u64 guid = 0;
|
u64 guid = 0;
|
||||||
u32 nexus_depth = 1;
|
u32 nexus_depth = 1;
|
||||||
|
|
||||||
if (sbp_parse_wwn(name, &guid, 1) < 0)
|
if (sbp_parse_wwn(name, &guid) < 0)
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
se_nacl_new = sbp_alloc_fabric_acl(se_tpg);
|
se_nacl_new = sbp_alloc_fabric_acl(se_tpg);
|
||||||
|
@ -2253,7 +2253,7 @@ static struct se_wwn *sbp_make_tport(
|
||||||
struct sbp_tport *tport;
|
struct sbp_tport *tport;
|
||||||
u64 guid = 0;
|
u64 guid = 0;
|
||||||
|
|
||||||
if (sbp_parse_wwn(name, &guid, 1) < 0)
|
if (sbp_parse_wwn(name, &guid) < 0)
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
tport = kzalloc(sizeof(*tport), GFP_KERNEL);
|
tport = kzalloc(sizeof(*tport), GFP_KERNEL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue