Lines Matching defs:value

115 		pr_debug("%s: %s\n", param->name, param->value);
119 char *name, char *value, u8 phase, u8 scope, u8 sender,
137 param->value = kstrdup(value, GFP_KERNEL);
138 if (!param->value) {
139 pr_err("Unable to allocate memory for parameter value.\n");
185 kfree(param->value);
212 * Initial value:
458 if (param->value)
593 new_param->value = kstrdup(param->value, GFP_KERNEL);
594 if (!new_param->value || !new_param->name) {
595 kfree(new_param->value);
598 pr_err("Unable to allocate memory for parameter name/value.\n");
647 kfree(param->value);
677 int iscsi_extract_key_value(char *textbuf, char **key, char **value)
679 *value = strchr(textbuf, '=');
680 if (!*value) {
687 **value = '\0';
688 *value = *value + 1;
693 int iscsi_update_param_value(struct iscsi_param *param, char *value)
695 kfree(param->value);
697 param->value = kstrdup(value, GFP_KERNEL);
698 if (!param->value) {
699 pr_err("Unable to allocate memory for value.\n");
704 param->name, param->value);
710 char *value,
715 if (strlen(value) > VALUE_MAXLEN) {
730 strlcpy(extra_response->value, NOTUNDERSTOOD,
731 sizeof(extra_response->value));
764 if (!strcmp(param->value, NO))
767 if (!strcmp(param->value, YES))
798 static int iscsi_check_boolean_value(struct iscsi_param *param, char *value)
800 if (strcmp(value, YES) && strcmp(value, NO)) {
801 pr_err("Illegal value for \"%s\", must be either"
812 int value = 0;
814 value = simple_strtoul(value_ptr, &tmpptr, 0);
817 if ((value < 0) || (value > 2)) {
818 pr_err("Illegal value for \"%s\", must be"
825 if ((value < 0) || (value > 3600)) {
826 pr_err("Illegal value for \"%s\", must be"
833 if ((value < 0) || (value > 32767)) {
834 pr_err("Illegal value for \"%s\", must be"
841 if ((value < 0) || (value > 65535)) {
842 pr_err("Illegal value for \"%s\", must be"
849 if ((value < 1) || (value > 65535)) {
850 pr_err("Illegal value for \"%s\", must be"
857 if ((value < 2) || (value > 3600)) {
858 pr_err("Illegal value for \"%s\", must be"
865 if ((value < 512) || (value > 16777215)) {
866 pr_err("Illegal value for \"%s\", must be"
876 static int iscsi_check_string_or_list_value(struct iscsi_param *param, char *value)
882 if (strcmp(value, KRB5) && strcmp(value, SPKM1) &&
883 strcmp(value, SPKM2) && strcmp(value, SRP) &&
884 strcmp(value, CHAP) && strcmp(value, NONE)) {
885 pr_err("Illegal value for \"%s\", must be"
893 if (strcmp(value, CRC32C) && strcmp(value, NONE)) {
894 pr_err("Illegal value for \"%s\", must be"
901 if (strcmp(value, DISCOVERY) && strcmp(value, NORMAL)) {
902 pr_err("Illegal value for \"%s\", must be"
914 char *value)
919 acceptor_values = param->value;
920 proposer_values = value;
928 acceptor_values = param->value;
957 static int iscsi_check_acceptor_state(struct iscsi_param *param, char *value,
973 if (!strcmp(value, YES))
975 if (!strcmp(param->value, YES))
986 if (!strcmp(value, YES))
988 if (!strcmp(param->value, YES))
998 u32 acceptor_value = simple_strtoul(param->value, &tmpptr, 0);
999 u32 proposer_value = simple_strtoul(value, &tmpptr, 0);
1015 if (iscsi_update_param_value(param, value) < 0)
1025 if (iscsi_update_param_value(param, value) < 0)
1029 if (iscsi_update_param_value(param, value) < 0)
1038 rc = kstrtoull(param->value, 0, &tmp);
1044 " original initiator received value: %u\n",
1054 param_mxdsl->value);
1058 pr_debug("Updated %s to target MXDSL value: %s\n",
1059 param->name, param->value);
1063 param, value);
1065 pr_err("Proposer's value list \"%s\" contains"
1066 " no valid values from Acceptor's value list"
1067 " \"%s\".\n", value, param->value);
1073 if (iscsi_update_param_value(param, value) < 0)
1081 static int iscsi_check_proposer_state(struct iscsi_param *param, char *value)
1092 comma_ptr = strchr(value, ',');
1099 tmp_ptr = iscsi_check_valuelist_for_support(param, value);
1104 if (iscsi_update_param_value(param, value) < 0)
1110 static int iscsi_check_value(struct iscsi_param *param, char *value)
1114 if (!strcmp(value, REJECT)) {
1124 pr_err("Received %s=%s\n", param->name, value);
1127 if (!strcmp(value, IRRELEVANT)) {
1128 pr_debug("Received %s=%s\n", param->name, value);
1132 if (!strcmp(value, NOTUNDERSTOOD)) {
1135 param->name, value);
1141 " with \"%s\", protocol error.\n", param->name, value);
1147 comma_ptr = strchr(value, ',');
1150 pr_err("Detected value separator \",\", but"
1151 " key \"%s\" does not allow a value list,"
1158 if (strlen(value) > VALUE_MAXLEN) {
1166 if (iscsi_check_boolean_value(param, value) < 0)
1169 if (iscsi_check_numerical_value(param, value) < 0)
1172 if (iscsi_check_string_or_list_value(param, value) < 0)
1182 value = comma_ptr;
1183 } while (value);
1299 if (!strcmp(param->value, NORMAL))
1302 ErrorRecoveryLevel = simple_strtoul(param->value,
1305 if (!strcmp(param->value, YES))
1308 MaxBurstLength = simple_strtoul(param->value,
1319 if (strcmp(param->value, "1")) {
1323 param->name, param->value);
1327 if (strcmp(param->value, "1")) {
1331 param->name, param->value);
1335 FirstBurstLength = simple_strtoul(param->value,
1344 param->name, param->value);
1374 char *key, *value;
1377 if (iscsi_extract_key_value(start, &key, &value) < 0)
1380 pr_debug("Got key: %s=%s\n", key, value);
1391 if (iscsi_add_notunderstood_response(key, value,
1395 start += strlen(key) + strlen(value) + 2;
1398 if (iscsi_check_value(param, value) < 0)
1401 start += strlen(key) + strlen(value) + 2;
1404 if (iscsi_check_proposer_state(param, value) < 0)
1409 if (iscsi_check_acceptor_state(param, value, conn) < 0)
1449 param->name, param->value);
1454 param->name, param->value);
1462 param->name, param->value);
1469 param->name, param->value);
1474 *length += sprintf(output_buf, "%s=%s", er->key, er->value);
1477 pr_debug("Sending key: %s=%s\n", er->key, er->value);
1509 char *key = NULL, *value = NULL;
1513 if (iscsi_extract_key_value(keyvalue, &key, &value) < 0)
1526 if (iscsi_check_value(param, value) < 0) {
1533 if (iscsi_update_param_value(param, value) < 0)
1556 simple_strtoul(param->value, &tmpptr, 0);
1558 param->value);
1565 param->value);
1567 ops->HeaderDigest = !strcmp(param->value, CRC32C);
1569 param->value);
1571 ops->DataDigest = !strcmp(param->value, CRC32C);
1573 param->value);
1578 * initiator provided value.
1584 simple_strtoul(param->value, &tmpptr, 0);
1586 param->value);
1592 simple_strtoul(param->value, &tmpptr, 0);
1594 param->value);
1618 if (!param->value)
1623 "%s", param->value);
1625 param->value);
1627 if (!param->value)
1631 "%s", param->value);
1633 param->value);
1635 if (!param->value)
1640 "%s", param->value);
1642 param->value);
1644 if (!param->value)
1647 "%s", param->value);
1649 param->value);
1652 simple_strtoul(param->value, &tmpptr, 0);
1654 param->value);
1657 simple_strtoul(param->value, &tmpptr, 0);
1659 param->value);
1661 ops->InitialR2T = !strcmp(param->value, YES);
1663 param->value);
1665 ops->ImmediateData = !strcmp(param->value, YES);
1667 param->value);
1670 simple_strtoul(param->value, &tmpptr, 0);
1672 param->value);
1675 simple_strtoul(param->value, &tmpptr, 0);
1677 param->value);
1680 simple_strtoul(param->value, &tmpptr, 0);
1682 param->value);
1685 simple_strtoul(param->value, &tmpptr, 0);
1687 param->value);
1690 simple_strtoul(param->value, &tmpptr, 0);
1692 param->value);
1694 ops->DataPDUInOrder = !strcmp(param->value, YES);
1696 param->value);
1698 ops->DataSequenceInOrder = !strcmp(param->value, YES);
1700 param->value);
1703 simple_strtoul(param->value, &tmpptr, 0);
1705 param->value);
1707 ops->SessionType = !strcmp(param->value, DISCOVERY);
1709 param->value);
1711 ops->RDMAExtensions = !strcmp(param->value, YES);
1713 param->value);