Displaying 2 results from an estimated 2 matches for "version_group".
Did you mean:
person_group
2012 Feb 17
0
[PATCH] linux-2.6.18/drivers/xen/: constify all instances of "struct attribute_group"
...oup = {
+static const struct attribute_group tapstat_group = {
.name = "statistics",
.attrs = tapstat_attrs,
};
--- a/drivers/xen/core/xen_sysfs.c
+++ b/drivers/xen/core/xen_sysfs.c
@@ -84,7 +84,7 @@ static struct attribute *version_attrs[]
NULL
};
-static struct attribute_group version_group = {
+static const struct attribute_group version_group = {
.name = "version",
.attrs = version_attrs,
};
@@ -197,12 +197,12 @@ static struct attribute *xen_compile_att
NULL
};
-static struct attribute_group xen_compilation_group = {
+static const struct attribute_group xen_compi...
2006 May 18
27
[PATCH] /sys/hypervisor/uuid
...include <xen/xenbus.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike D. Day <ncmike@us.ibm.com>");
@@ -92,6 +94,37 @@ static void xen_sysfs_version_destroy(vo
static void xen_sysfs_version_destroy(void)
{
sysfs_remove_group(&hypervisor_subsys.kset.kobj, &version_group);
+}
+
+/* UUID */
+
+static ssize_t uuid_show(struct hyp_sysfs_attr *attr, char *buffer)
+{
+ char *val;
+ int ret;
+
+ val = xenbus_read(XBT_NULL, "vm", "", NULL);
+ if (IS_ERR(val))
+ ret = PTR_ERR(val);
+ else if (strncmp(val, "/vm/", 4))
+ ret = -EIO;
+ else
+...