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 strscpy(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);
1372 char *key, *value;
1375 if (iscsi_extract_key_value(start, &key, &value) < 0)
1378 pr_debug("Got key: %s=%s\n", key, value);
1389 if (iscsi_add_notunderstood_response(key, value,
1393 start += strlen(key) + strlen(value) + 2;
1396 if (iscsi_check_value(param, value) < 0)
1399 start += strlen(key) + strlen(value) + 2;
1402 if (iscsi_check_proposer_state(param, value) < 0)
1407 if (iscsi_check_acceptor_state(param, value, conn) < 0)
1447 param->name, param->value);
1452 param->name, param->value);
1460 param->name, param->value);
1467 param->name, param->value);
1472 *length += sprintf(output_buf, "%s=%s", er->key, er->value);
1475 pr_debug("Sending key: %s=%s\n", er->key, er->value);
1507 char *key = NULL, *value = NULL;
1511 if (iscsi_extract_key_value(keyvalue, &key, &value) < 0)
1524 if (iscsi_check_value(param, value) < 0) {
1531 if (iscsi_update_param_value(param, value) < 0)
1554 simple_strtoul(param->value, &tmpptr, 0);
1556 param->value);
1563 param->value);
1565 ops->HeaderDigest = !strcmp(param->value, CRC32C);
1567 param->value);
1569 ops->DataDigest = !strcmp(param->value, CRC32C);
1571 param->value);
1576 * initiator provided value.
1582 simple_strtoul(param->value, &tmpptr, 0);
1584 param->value);
1590 simple_strtoul(param->value, &tmpptr, 0);
1592 param->value);
1616 if (!param->value)
1621 "%s", param->value);
1623 param->value);
1625 if (!param->value)
1629 "%s", param->value);
1631 param->value);
1633 if (!param->value)
1638 "%s", param->value);
1640 param->value);
1642 if (!param->value)
1645 "%s", param->value);
1647 param->value);
1650 simple_strtoul(param->value, &tmpptr, 0);
1652 param->value);
1655 simple_strtoul(param->value, &tmpptr, 0);
1657 param->value);
1659 ops->InitialR2T = !strcmp(param->value, YES);
1661 param->value);
1663 ops->ImmediateData = !strcmp(param->value, YES);
1665 param->value);
1668 simple_strtoul(param->value, &tmpptr, 0);
1670 param->value);
1673 simple_strtoul(param->value, &tmpptr, 0);
1675 param->value);
1678 simple_strtoul(param->value, &tmpptr, 0);
1680 param->value);
1683 simple_strtoul(param->value, &tmpptr, 0);
1685 param->value);
1688 simple_strtoul(param->value, &tmpptr, 0);
1690 param->value);
1692 ops->DataPDUInOrder = !strcmp(param->value, YES);
1694 param->value);
1696 ops->DataSequenceInOrder = !strcmp(param->value, YES);
1698 param->value);
1701 simple_strtoul(param->value, &tmpptr, 0);
1703 param->value);
1705 ops->SessionType = !strcmp(param->value, DISCOVERY);
1707 param->value);
1709 ops->RDMAExtensions = !strcmp(param->value, YES);
1711 param->value);