Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329139
b: refs/heads/master
c: 5c13f80
h: refs/heads/master
i:
  329137: d432c03
  329135: f3ba09a
v: v3
  • Loading branch information
Daniel De Graaf authored and Konrad Rzeszutek Wilk committed Aug 23, 2012
1 parent d5f48b9 commit 76dbb3e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 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: b8b0f559c7b1dcf5503817e518c81c9a18ee45e0
refs/heads/master: 5c13f8067745efc15f6ad0158b58d57c44104c25
13 changes: 12 additions & 1 deletion trunk/drivers/xen/sys-hypervisor.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static void xen_sysfs_version_destroy(void)

/* UUID */

static ssize_t uuid_show(struct hyp_sysfs_attr *attr, char *buffer)
static ssize_t uuid_show_fallback(struct hyp_sysfs_attr *attr, char *buffer)
{
char *vm, *val;
int ret;
Expand All @@ -135,6 +135,17 @@ static ssize_t uuid_show(struct hyp_sysfs_attr *attr, char *buffer)
return ret;
}

static ssize_t uuid_show(struct hyp_sysfs_attr *attr, char *buffer)
{
xen_domain_handle_t uuid;
int ret;
ret = HYPERVISOR_xen_version(XENVER_guest_handle, uuid);
if (ret)
return uuid_show_fallback(attr, buffer);
ret = sprintf(buffer, "%pU\n", uuid);
return ret;
}

HYPERVISOR_ATTR_RO(uuid);

static int __init xen_sysfs_uuid_init(void)
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/xen/interface/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@ struct xen_feature_info {
/* arg == NULL; returns host memory page size. */
#define XENVER_pagesize 7

/* arg == xen_domain_handle_t. */
#define XENVER_guest_handle 8

#endif /* __XEN_PUBLIC_VERSION_H__ */

0 comments on commit 76dbb3e

Please sign in to comment.