search for: xen_sysfs_uuid_init

Displaying 1 result from an estimated 1 matches for "xen_sysfs_uuid_init".

2006 May 18
27
[PATCH] /sys/hypervisor/uuid
...s_read(XBT_NULL, "vm", "", NULL); + if (IS_ERR(val)) + ret = PTR_ERR(val); + else if (strncmp(val, "/vm/", 4)) + ret = -EIO; + else + ret = sprintf(buffer, "%s\n", val + 4); + kfree(val); + + return ret; +} + +HYPERVISOR_ATTR_RO(uuid); + +static int __init xen_sysfs_uuid_init(void) +{ + return sysfs_create_file(&hypervisor_subsys.kset.kobj, &uuid_attr.attr); +} + +static void xen_sysfs_uuid_destroy(void) +{ + sysfs_remove_file(&hypervisor_subsys.kset.kobj, &uuid_attr.attr); } /* xen compilation attributes */ @@ -285,10 +318,15 @@ static int __init hy...