* concerns about sysfs_ops
@ 2003-01-13 11:17 Louis Zhuang
2003-01-13 15:08 ` Patrick Mochel
0 siblings, 1 reply; 3+ messages in thread
From: Louis Zhuang @ 2003-01-13 11:17 UTC (permalink / raw)
To: Patrick Mochel; +Cc: LKML
Dear Mochel,
I found you removed off/count params in new sysfs_ops functions. That's
good change for show functions, but for store function, if you don't
give the len of data, the chained xxx_store function has to assume
or/and guess how long the data is. This might be a potential issue. So I
suggest you add 'size_t count' in store function of sysfs_ops.
include/linux/sysfs.h: 1.21 1.22 louis 03/01/13 18:39:41 (modified,
needs delta)
@@ -18,7 +18,7 @@
struct sysfs_ops {
ssize_t (*show)(struct kobject *, struct attribute *,char *);
- ssize_t (*store)(struct kobject *,struct attribute *,const char *);
+ ssize_t (*store)(struct kobject *,struct attribute *,const char *,
size_t count);
};
extern int
Yours truly,
Louis Zhuang
---------------
Fault Injection Test Harness Project
BK tree: http://fault-injection.bkbits.net/linux-2.5
Home Page: http://sf.net/projects/fault-injection
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: concerns about sysfs_ops
2003-01-13 11:17 concerns about sysfs_ops Louis Zhuang
@ 2003-01-13 15:08 ` Patrick Mochel
2003-01-14 0:43 ` Louis Zhuang
0 siblings, 1 reply; 3+ messages in thread
From: Patrick Mochel @ 2003-01-13 15:08 UTC (permalink / raw)
To: Louis Zhuang; +Cc: LKML
On 13 Jan 2003, Louis Zhuang wrote:
> Dear Mochel,
> I found you removed off/count params in new sysfs_ops functions. That's
> good change for show functions, but for store function, if you don't
> give the len of data, the chained xxx_store function has to assume
> or/and guess how long the data is. This might be a potential issue. So I
> suggest you add 'size_t count' in store function of sysfs_ops.
>
> include/linux/sysfs.h: 1.21 1.22 louis 03/01/13 18:39:41 (modified,
> needs delta)
>
> @@ -18,7 +18,7 @@
>
> struct sysfs_ops {
> ssize_t (*show)(struct kobject *, struct attribute *,char *);
> - ssize_t (*store)(struct kobject *,struct attribute *,const char *);
> + ssize_t (*store)(struct kobject *,struct attribute *,const char *,
> size_t count);
> };
I agree, and Linus pointed out that obvious flaw in the interface when I
sent it to him on Friday. I'll fixing that, and should up in his tree
later today..
-pat
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: concerns about sysfs_ops
2003-01-13 15:08 ` Patrick Mochel
@ 2003-01-14 0:43 ` Louis Zhuang
0 siblings, 0 replies; 3+ messages in thread
From: Louis Zhuang @ 2003-01-14 0:43 UTC (permalink / raw)
To: Patrick Mochel; +Cc: LKML
> I agree, and Linus pointed out that obvious flaw in the interface when I
> sent it to him on Friday. I'll fixing that, and should up in his tree
> later today..
>
> -pat
And more, could you possibly export 'kset_find_obj'? I thinks it is
useful for module too.
Yours truly,
Louis Zhuang
---------------
Fault Injection Test Harness Project
BK tree: http://fault-injection.bkbits.net/linux-2.5
Home Page: http://sf.net/projects/fault-injection
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-14 1:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-13 11:17 concerns about sysfs_ops Louis Zhuang
2003-01-13 15:08 ` Patrick Mochel
2003-01-14 0:43 ` Louis Zhuang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox