|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2.6.12.6-xen] sysfs attributes for xen
Comments inlined. Mike D. Day wrote: Creates /sys/hypervisor/xen and populates that dir with xen version, changeset, compilation, and capabilities info. Intended for the xen merge tree and later upstream. <snip> This formatting is off. You want a space after the if and no space after the (. See CodingStyle. It could be your mailer (it munged the newlines) but it appears you've got 4 space tabs? Linux style is 8. + if( ! HYPERVISOR_xen_version(XENVER_extraversion, + extra_version) ) {+ page[PAGE_SIZE - 1] = 0x00;+ return snprintf(page, PAGE_SIZE - 1, + "xen-%ld.%ld%s\n",+ major, minor, extra_version); snprintf takes into account the terminating byte so you don't have to. <snip> +/* xen compile info */+static ssize_t xen_compile_show(struct kobject * kobj, + struct attribute * attr, + char * page) I'm not the best person to speak to this but I'm pretty sure sysfs prefers single values per file so you probably want to split this up into compile_by, compile_date, compiler.
I reckon you want to use default attributes here instead of immediately calling sysfs_create_file(). Regards, Anthony Liguori _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |