Re: [PATCH 2/3] sysfs: sysfs_attr_get_value() writes to a buffer instead of returning a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 10, 2008 at 04:09, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
> On Wed, 2008-09-10 at 11:21 +0100, Alan Jenkins wrote:
>> Alan Jenkins wrote:
>> > This avoids lifetime issues with the returned string, for subsequent changes
>> > to caching in sysfs.  All callers are changed accordingly.  Many callers
>> > copied the result to a buffer already, so this actually simplifies some code.
>> >
>>
>> Sorry, my re-implementation of sysfs_attr_get_value() was defective.  It
>> didn't return cached values correctly.
>>
>> I suggest you drop these two patches.  I'll fix the bug and update them
>> to apply on top of the recent libudev/logging changes.
>
> I didn't apply them, as I was busy with other stuff in libudev. We
> should move the "sysfs cache" to the lib, hanging off of the the
> udev_device, I guess. For this we will need to add parent device
> relations in the udev_device. The current global device and attribute
> cache will just go away then.
>
> We will get there after the current work on the lib, which means
> converting more stuff to libudev, and use it in the udev code.
> We will also soon get rid of all dependencies on udev code in libudev,
> which will remove the current udev sysfs code from libudev.

We are getting closer. Current libudev does not use any main udev code
anymore. Libudev's "udev_device" does parent-device and
sysfs-attribute value "caching" now.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux