• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/usr.sbin/ctld/

Lines Matching refs:targ

115 	struct target *targ, *tmp;
125 TAILQ_FOREACH_SAFE(targ, &conf->conf_targets, t_next, tmp)
126 target_delete(targ);
1384 struct target *targ;
1387 targ = target_find(conf, name);
1388 if (targ != NULL) {
1396 targ = calloc(1, sizeof(*targ));
1397 if (targ == NULL)
1399 targ->t_name = checked_strdup(name);
1406 targ->t_name[i] = tolower(targ->t_name[i]);
1408 targ->t_conf = conf;
1409 TAILQ_INIT(&targ->t_ports);
1410 TAILQ_INSERT_TAIL(&conf->conf_targets, targ, t_next);
1412 return (targ);
1416 target_delete(struct target *targ)
1420 TAILQ_FOREACH_SAFE(port, &targ->t_ports, p_ts, tport)
1422 TAILQ_REMOVE(&targ->t_conf->conf_targets, targ, t_next);
1424 free(targ->t_name);
1425 free(targ->t_redirection);
1426 free(targ);
1432 struct target *targ;
1434 TAILQ_FOREACH(targ, &conf->conf_targets, t_next) {
1435 if (strcasecmp(targ->t_name, name) == 0)
1436 return (targ);
1484 struct target *targ;
1488 TAILQ_FOREACH(targ, &lun->l_conf->conf_targets, t_next) {
1490 if (targ->t_luns[i] == lun)
1491 targ->t_luns[i] = NULL;
1671 struct target *targ;
1703 TAILQ_FOREACH(targ, &conf->conf_targets, t_next) {
1704 fprintf(stderr, "target %s {\n", targ->t_name);
1705 if (targ->t_alias != NULL)
1706 fprintf(stderr, "\t alias %s\n", targ->t_alias);
1774 struct target *targ;
1787 TAILQ_FOREACH(targ, &conf->conf_targets, t_next) {
1788 if (targ->t_auth_group == NULL) {
1789 targ->t_auth_group = auth_group_find(conf,
1791 assert(targ->t_auth_group != NULL);
1793 if (TAILQ_EMPTY(&targ->t_ports)) {
1796 port_new(conf, targ, pg);
1800 if (targ->t_luns[i] != NULL)
1803 if (!found && targ->t_redirection == NULL) {
1805 targ->t_name);
1807 if (found && targ->t_redirection != NULL) {
1810 targ->t_name);
1848 TAILQ_FOREACH(targ, &conf->conf_targets, t_next) {
1849 if (targ->t_auth_group == ag) {