lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: VPD in sysfs
On Fri, Aug 20, 2004 at 03:21:43PM +0100, Matthew Wilcox wrote:
> On Sat, Aug 14, 2004 at 07:29:32PM +0100, Matthew Wilcox wrote:
> > Thoughts? Since there's at least four and probably more ways of getting
> > at VPD, we either need to fill in some VPD structs at initialisation or
> > have some kind of vpd_ops that a driver can fill in so the core can get
> > at the data.
>
> I've tried the first option -- creating a large block of sysfs entries for
> all the VPD entries that are present. However, I've come upon a problem
> with sysfs that prevents me from doing so.
>
> Basically, the problem is that sysfs doesn't pass the attribute that's
> being invoked to the attribute ->show method. So I can't determine
> which one is being read. This isn't a problem for any other sysfs attribute
> because they're all static, but for dynamically created attributes, it's
> not possible to work this way.

Ya, I ran into some similar restrictions with a driver I was
writing...after talking to gregkh, you are going to have to go down a
level and use kobjects directly...each piece of data will have a kobject,
and that's what you dereference in the show method.

--
Dave Boutcher
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.099 / U:16.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site