diff options
author | mav <mav@FreeBSD.org> | 2015-02-03 16:17:54 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-02-03 16:17:54 +0000 |
commit | 4bbf5a53e0ad410f119cb2cb19979a6500a78d0b (patch) | |
tree | bc047d38b772f9e2084581fa32500f8f36a703ec /usr.sbin/ctld/kernel.c | |
parent | 4a166f3239c983d5729d90512ccfbf660c4f53d1 (diff) | |
download | FreeBSD-src-4bbf5a53e0ad410f119cb2cb19979a6500a78d0b.zip FreeBSD-src-4bbf5a53e0ad410f119cb2cb19979a6500a78d0b.tar.gz |
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.
MFC after: 2 weeks
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 ae1b11d..0c5d2ce 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); |