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, 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.

Thanks,
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