diff options
author | mav <mav@FreeBSD.org> | 2015-02-19 14:33:46 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-02-19 14:33:46 +0000 |
commit | 2116079c78d5da438cb804a681902bae1291f6ac (patch) | |
tree | 88f1af4f9db5534f9f00e4dde1aae98327d7d8e3 /usr.sbin/ctld/kernel.c | |
parent | aa6a7df89f1b4850d6005220f912240b8daeece7 (diff) | |
download | FreeBSD-src-2116079c78d5da438cb804a681902bae1291f6ac.zip FreeBSD-src-2116079c78d5da438cb804a681902bae1291f6ac.tar.gz |
MFC r278161: Bring some more order into iSCSI portal group tags support.
While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'usr.sbin/ctld/kernel.c')
-rw-r--r-- | usr.sbin/ctld/kernel.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index 890bb2b..02b616c 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -913,12 +913,8 @@ kernel_port_remove(struct target *targ) req.num_args = 2; req.args = malloc(req.num_args * sizeof(*req.args)); str_arg(&req.args[0], "cfiscsi_target", targ->t_name); - if (targ->t_portal_group) { - snprintf(tagstr, sizeof(tagstr), "%d", - targ->t_portal_group->pg_tag); - str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); - } else - req.num_args--; + snprintf(tagstr, sizeof(tagstr), "%d", targ->t_portal_group->pg_tag); + str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); error = ioctl(ctl_fd, CTL_PORT_REQ, &req); free(req.args); |