WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [ PATCH 2.6.16-rc3-xen 3/3] sysfs: export Xen hypervisor

To: Dave Hansen <haveblue@xxxxxxxxxx>
Subject: [Xen-devel] Re: [ PATCH 2.6.16-rc3-xen 3/3] sysfs: export Xen hypervisor attributes to sysfs
From: "Mike D. Day" <ncmike@xxxxxxxxxx>
Date: Tue, 21 Feb 2006 12:48:43 -0500
Cc: Greg KH <greg@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, lkml <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Tue, 21 Feb 2006 18:02:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1140542130.8693.18.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <43FB2642.7020109@xxxxxxxxxx> <1140542130.8693.18.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5 (Macintosh/20051201)
Dave Hansen wrote:
It could be:

+---sys
        +---hypervisor
                +---type
                +---version
                        +---major
                        +---minor
                        +---extra


Yeah, the type file could be useful.

+static ssize_t extra_show(struct kobject * kobj,
+                         struct attribute * attr,
+                         char * page)
+{
+       char extra_ver[XENVER_EXTRAVERSION_LEN];

At 1k, this is a wee bit too big to be on the stack.  I'd just kmalloc
it instead.

This particular constant is 16 bytes so I'll leave it as is. The other one (CAPABILTIES_INFO), which is 1k, I did kmalloc as you suggested.

+static void xen_compilation_destroy(void)
+{
+       sysfs_remove_group(c_kobj, &xen_compilation_group);
+       kobject_put(c_kobj);
+       return;
+}

Yup, this is another excellent function name.

I'll change the others to be as descriptive. Thanks,

Mike Day

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel