Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288894
b: refs/heads/master
c: e485cea
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Mar 13, 2012
1 parent d46d4a1 commit 5d47126
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04bf30115f4ba2beda1efb6cfbae49cdc757f3a9
refs/heads/master: e485ceac9ebd43901ef0ce13622385d509e072e7
5 changes: 3 additions & 2 deletions trunk/drivers/hv/hv_kvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ kvp_register(void)

if (msg) {
kvp_msg = (struct hv_kvp_msg *)msg->data;
version = kvp_msg->body.kvp_version;
version = kvp_msg->body.kvp_register.version;
msg->id.idx = CN_KVP_IDX;
msg->id.val = CN_KVP_VAL;

Expand Down Expand Up @@ -122,7 +122,8 @@ kvp_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
* to the host. But first, cancel the timeout.
*/
if (cancel_delayed_work_sync(&kvp_work))
kvp_respond_to_host(data->data.key, data->data.value,
kvp_respond_to_host(data->data.key,
data->data.value,
!strlen(data->data.key));
}
}
Expand Down
30 changes: 27 additions & 3 deletions trunk/include/linux/hyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,43 @@ struct hv_kvp_exchg_msg_value {
__u32 key_size;
__u32 value_size;
__u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
__u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
union {
__u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE];
__u32 value_u32;
__u64 value_u64;
};
} __attribute__((packed));

struct hv_kvp_msg_enumerate {
__u32 index;
struct hv_kvp_exchg_msg_value data;
} __attribute__((packed));

struct hv_kvp_msg_get {
struct hv_kvp_exchg_msg_value data;
};

struct hv_kvp_msg_set {
struct hv_kvp_exchg_msg_value data;
};

struct hv_kvp_msg_delete {
__u32 key_size;
__u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
};

struct hv_kvp_register {
__u8 version[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
};

struct hv_kvp_msg {
struct hv_kvp_hdr kvp_hdr;
union {
struct hv_kvp_msg_enumerate kvp_enum_data;
char kvp_version[HV_KVP_EXCHANGE_MAX_KEY_SIZE];
struct hv_kvp_msg_get kvp_get;
struct hv_kvp_msg_set kvp_set;
struct hv_kvp_msg_delete kvp_delete;
struct hv_kvp_msg_enumerate kvp_enum_data;
struct hv_kvp_register kvp_register;
} body;
} __attribute__((packed));

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ int main(void)
* Driver is registering with us; stash away the version
* information.
*/
p = (char *)hv_msg->body.kvp_version;
p = (char *)hv_msg->body.kvp_register.version;
lic_version = malloc(strlen(p) + 1);
if (lic_version) {
strcpy(lic_version, p);
Expand Down

0 comments on commit 5d47126

Please sign in to comment.