diff options
author | cracauer <cracauer@FreeBSD.org> | 2011-01-25 22:25:16 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 2011-01-25 22:25:16 +0000 |
commit | c067e14d2edb339f4088673831f62fadbd509161 (patch) | |
tree | ae6aa90f685fc3ee96ec978841c8e7fde4c8a53c /sbin/iscontrol | |
parent | 056b61df17d992c274cce67026827da3dd9f3ee8 (diff) | |
download | FreeBSD-src-c067e14d2edb339f4088673831f62fadbd509161.zip FreeBSD-src-c067e14d2edb339f4088673831f62fadbd509161.tar.gz |
Fix compilation with debug on.
Fix segfault when TargetAddress is missing or mis-spelled in config file.
Diffstat (limited to 'sbin/iscontrol')
-rw-r--r-- | sbin/iscontrol/config.c | 2 | ||||
-rw-r--r-- | sbin/iscontrol/fsm.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sbin/iscontrol/config.c b/sbin/iscontrol/config.c index 197f178..6307f66 100644 --- a/sbin/iscontrol/config.c +++ b/sbin/iscontrol/config.c @@ -295,7 +295,7 @@ keyLookup(char *key) { textkey_t *tk; - for(tk = keyMap; tk->name; tk++) { + for(tk = keyMap; tk->name && strcmp(tk->name, "end"); tk++) { if(strcasecmp(key, tk->name) == 0) return tk; } diff --git a/sbin/iscontrol/fsm.c b/sbin/iscontrol/fsm.c index ec71931..b74daa0 100644 --- a/sbin/iscontrol/fsm.c +++ b/sbin/iscontrol/fsm.c @@ -359,8 +359,8 @@ doCAM(isess_t *sess) | for now will do this for each lun ... */ for(n = i = 0; i < sess->cam.target_nluns; i++) { - debug(2, "CAM path_id=%d target_id=%d target_lun=%d", - sess->cam.path_id, sess->cam.target_id, sess->cam.target_lun[i]); + debug(2, "CAM path_id=%d target_id=%d", + sess->cam.path_id, sess->cam.target_id); sess->camdev = cam_open_btl(sess->cam.path_id, sess->cam.target_id, i, O_RDWR, NULL); |