"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/hv/hv_kvp.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

hv_kvp.c  (linux-3.16.62.tar.xz):hv_kvp.c  (linux-3.16.63.tar.xz)
skipping to change at line 324 skipping to change at line 324
MAX_GATEWAY_SIZE); MAX_GATEWAY_SIZE);
utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.dns_addr, utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.dns_addr,
MAX_IP_ADDR_SIZE, MAX_IP_ADDR_SIZE,
UTF16_LITTLE_ENDIAN, UTF16_LITTLE_ENDIAN,
(__u8 *)out->body.kvp_ip_val.dns_addr, (__u8 *)out->body.kvp_ip_val.dns_addr,
MAX_IP_ADDR_SIZE); MAX_IP_ADDR_SIZE);
out->body.kvp_ip_val.dhcp_enabled = in->kvp_ip_val.dhcp_enabled; out->body.kvp_ip_val.dhcp_enabled = in->kvp_ip_val.dhcp_enabled;
default: /* fallthrough */
case KVP_OP_GET_IP_INFO:
utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.adapter_id, utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.adapter_id,
MAX_ADAPTER_ID_SIZE, MAX_ADAPTER_ID_SIZE,
UTF16_LITTLE_ENDIAN, UTF16_LITTLE_ENDIAN,
(__u8 *)out->body.kvp_ip_val.adapter_id, (__u8 *)out->body.kvp_ip_val.adapter_id,
MAX_ADAPTER_ID_SIZE); MAX_ADAPTER_ID_SIZE);
out->body.kvp_ip_val.addr_family = in->kvp_ip_val.addr_family; out->body.kvp_ip_val.addr_family = in->kvp_ip_val.addr_family;
} }
} }
skipping to change at line 374 skipping to change at line 376
* function we limit the size of the buffer where the converted * function we limit the size of the buffer where the converted
* string is placed to HV_KVP_EXCHANGE_MAX_*_SIZE -1 to gaurantee * string is placed to HV_KVP_EXCHANGE_MAX_*_SIZE -1 to gaurantee
* that the strings can be properly terminated! * that the strings can be properly terminated!
*/ */
switch (message->kvp_hdr.operation) { switch (message->kvp_hdr.operation) {
case KVP_OP_SET_IP_INFO: case KVP_OP_SET_IP_INFO:
process_ib_ipinfo(in_msg, message, KVP_OP_SET_IP_INFO); process_ib_ipinfo(in_msg, message, KVP_OP_SET_IP_INFO);
break; break;
case KVP_OP_GET_IP_INFO: case KVP_OP_GET_IP_INFO:
/*
* We only need to pass on the info of operation, adapter_id
* and addr_family to the userland kvp daemon.
*/
process_ib_ipinfo(in_msg, message, KVP_OP_GET_IP_INFO); process_ib_ipinfo(in_msg, message, KVP_OP_GET_IP_INFO);
break; break;
case KVP_OP_SET: case KVP_OP_SET:
switch (in_msg->body.kvp_set.data.value_type) { switch (in_msg->body.kvp_set.data.value_type) {
case REG_SZ: case REG_SZ:
/* /*
* The value is a string - utf16 encoding. * The value is a string - utf16 encoding.
*/ */
message->body.kvp_set.data.value_size = message->body.kvp_set.data.value_size =
utf16s_to_utf8s( utf16s_to_utf8s(
skipping to change at line 414 skipping to change at line 420
* The value is a 64 bit scalar. * The value is a 64 bit scalar.
* We save this as a utf8 string. * We save this as a utf8 string.
*/ */
val64 = in_msg->body.kvp_set.data.value_u64; val64 = in_msg->body.kvp_set.data.value_u64;
message->body.kvp_set.data.value_size = message->body.kvp_set.data.value_size =
sprintf(message->body.kvp_set.data.value, sprintf(message->body.kvp_set.data.value,
"%llu", val64) + 1; "%llu", val64) + 1;
break; break;
} }
case KVP_OP_GET:
/*
* The key is always a string - utf16 encoding.
*/
message->body.kvp_set.data.key_size = message->body.kvp_set.data.key_size =
utf16s_to_utf8s( utf16s_to_utf8s(
(wchar_t *)in_msg->body.kvp_set.data.key, (wchar_t *)in_msg->body.kvp_set.data.key,
in_msg->body.kvp_set.data.key_size, in_msg->body.kvp_set.data.key_size,
UTF16_LITTLE_ENDIAN, UTF16_LITTLE_ENDIAN,
message->body.kvp_set.data.key, message->body.kvp_set.data.key,
HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1) + 1; HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1) + 1;
break;
case KVP_OP_GET:
message->body.kvp_get.data.key_size =
utf16s_to_utf8s(
(wchar_t *)in_msg->body.kvp_get.data.key,
in_msg->body.kvp_get.data.key_size,
UTF16_LITTLE_ENDIAN,
message->body.kvp_get.data.key,
HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1) + 1;
break; break;
case KVP_OP_DELETE: case KVP_OP_DELETE:
message->body.kvp_delete.key_size = message->body.kvp_delete.key_size =
utf16s_to_utf8s( utf16s_to_utf8s(
(wchar_t *)in_msg->body.kvp_delete.key, (wchar_t *)in_msg->body.kvp_delete.key,
in_msg->body.kvp_delete.key_size, in_msg->body.kvp_delete.key_size,
UTF16_LITTLE_ENDIAN, UTF16_LITTLE_ENDIAN,
message->body.kvp_delete.key, message->body.kvp_delete.key,
HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1) + 1; HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1) + 1;
 End of changes. 4 change blocks. 
2 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)