lkml.org 
[lkml]   [2007]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix OOPS in show_uevent()
Cornelia Huck wrote:
> On Fri, 10 Aug 2007 14:23:56 +0200,
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
>
>> But we still don't update the remaining buffer size and the remaining
>> array fields which are left after the call. Shouldn't we instead just
>> change the:
>> int (*dev_uevent)(struct device *dev,
>> char **envp, int num_envp,
>> char *buffer, int buffer_size);
>> to:
>> int (*dev_uevent)(struct device *dev,
>> char **envp, int num_envp, int *cur_index,
>> char *buffer, int buffer_size, int *cur_len);
>>
>> like we do for:
>> int add_uevent_var(char **envp, int num_envp, int *cur_index,
>> char *buffer, int buffer_size, int *cur_len,
>> const char *format, ...)
>>
>> and along with the change of the callers, we would update the values
>> properly, so the next call has the correct numbers? There are 6
>> classes and something like 12 buses using this method, so it shouldn't
>> be too much trouble.

isn't it better to change
int (*dev_uevent)(struct device *dev,
char **envp, int num_envp,
char *buffer, int buffer_size);
to
int (*dev_uevent)(struct device *dev,
char **envp, int num_envp,
char **buffer);
and alter the buffer pointer inside?


> Sounds like a sensible approach. We may want the remaining non-users to
> add_uevent_var() at the same time, I guess.
>

Thanks,
Pavel
-
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: 2007-08-10 15:27    [W:0.041 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site