[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7
Mike Christie
michaelc at cs.wisc.edu
Sat Apr 7 15:44:20 UTC 2012
The following commit has been merged in the upstream-mnc branch:
commit d43143e673eec118e6645a2f46a9f202f341afd7
Author: Mike Christie <michaelc at cs.wisc.edu>
Date: Wed Apr 4 20:51:53 2012 -0500
iscsi tools: fix unknown param warnings
commit 3d87f013c53c3e229e16c79f5d5fa29a9e3fcef8 added a log
message when we do not match the param name in idbm_rec_update_param.
We cannot do this because when reading iscsid.conf to setup a
record the record type might not support all the settings in
iscsid.conf. We then get a flood of unkown params messages in the
log or stdout.
Fix this by moving the match check to the caller if needed.
diff --git a/usr/idbm.c b/usr/idbm.c
index d4bb150..4d30aa9 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -599,14 +599,12 @@ int idbm_rec_update_param(recinfo_t *info, char *name, char *value,
int i;
int passwd_done = 0;
char passwd_len[8];
- int found = 0;
setup_passwd_len:
for (i=0; i<MAX_KEYS; i++) {
if (!strcmp(name, info[i].name)) {
int j;
- found = 1;
log_debug(7, "updated '%s', '%s' => '%s'", name,
info[i].value, value);
/* parse recinfo by type */
@@ -661,9 +659,6 @@ setup_passwd_len:
}
}
- if (!found)
- log_error("Unknown parameter %s.", name);
-
return ISCSI_ERR_INVAL;
updated:
@@ -2413,8 +2408,11 @@ int idbm_node_set_rec_from_param(struct list_head *params, node_rec_t *rec,
list_for_each_entry(param, params, list) {
rc = idbm_rec_update_param(info, param->name, param->value, 0);
- if (rc)
+ if (rc) {
+ if (rc == ISCSI_ERR_INVAL)
+ log_error("Unknown parameter %s.", param->name);
goto free_info;
+ }
}
free_info:
--
Debian Open-iSCSI Packaging
More information about the Pkg-iscsi-maintainers
mailing list