Skip to content

Commit

Permalink
ctladm: Only autoload cfiscsi.ko for iSCSI-specific commands
Browse files Browse the repository at this point in the history
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D42935
  • Loading branch information
bsdjhb committed Mar 13, 2024
2 parents d11b857 + 0f3210b commit cdd3e7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion usr.sbin/ctladm/ctladm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4144,10 +4144,16 @@ main(int argc, char **argv)
goto bailout;
}
#ifdef WANT_ISCSI
else {
switch (command) {
case CTLADM_CMD_ISLIST:
case CTLADM_CMD_ISLOGOUT:
case CTLADM_CMD_ISTERMINATE:
if (modfind("cfiscsi") == -1 &&
kldload("cfiscsi") == -1)
warn("couldn't load cfiscsi");
break;
default:
break;
}
#endif
} else if ((command != CTLADM_CMD_HELP)
Expand Down

0 comments on commit cdd3e7f

Please sign in to comment.