Libsysfs updates
PATCH 1/1 Libsysfs updates
Hello Greg,
Please find attached a _BIG_ patch to update udev's libsysfs. Patch applies on udev-021 and contains:
1. Updates to get udev's libsysfs to the latest (to be released) level.
2. Changes for C++ compatibility (use "char" and not "unsigned char" unless absolutely necessary).
3. More importantly, take care of buffer overflows. Libsysfs now uses a scaled down version of Kay's "safe" macros.
Tested using a usb-storage device.
I will send you a doc update shortly.
Thanks,
Ananth
Signature · 3 lines
Ananth Narayan Linux Technology Center, IBM Software Lab, INDIA
libsysfs/dlist.c renamed from udev-021/libsysfs/dlist.c +10 -0
@@ -260,6 +260,16 @@dlist_insert (list,data,0 ); } +void dlist_unshift_sorted (Dlist *list,void *data, +int (*sorter)(void *new,void *old)) +{ +if (list->count ==0 ) +dlist_unshift (list, data); +else { + list->marker=list->head->next; +dlist_insert_sorted (list, data, sorter); + } +}/* * Remove end node from list.
libsysfs/dlist.h renamed from udev-021/libsysfs/dlist.h +2 -1
@@ -76,13 +76,14 @@void *dlist_insert (Dlist *,void *,int ) ; -void *dlist_insert_sorted (struct dlist *list,void *new,int (*sorter)(void *,void *)); +void *dlist_insert_sorted (struct dlist *list,void *new_elem,int (*sorter)(void *,void *));void dlist_delete (Dlist *,int );void dlist_push (Dlist *,void *);void dlist_unshift (Dlist *,void *); +void dlist_unshift_sorted (Dlist *,void *,int (*sorter)(void *,void *));void *dlist_pop (Dlist *);
libsysfs/sysfs/libsysfs.h renamed from udev-021/libsysfs/sysfs/libsysfs.h +121 -84
337 lines not on this page · raw message
libsysfs/sysfs_bus.c renamed from udev-021/libsysfs/sysfs_bus.c +34 -80
233 lines not on this page · raw message
libsysfs/sysfs_class.c renamed from udev-021/libsysfs/sysfs_class.c +57 -62
307 lines not on this page · raw message
libsysfs/sysfs_device.c renamed from udev-021/libsysfs/sysfs_device.c +115 -59
369 lines not on this page · raw message
libsysfs/sysfs_dir.c renamed from udev-021/libsysfs/sysfs_dir.c +87 -70
479 lines not on this page · raw message
libsysfs/sysfs_driver.c renamed from udev-021/libsysfs/sysfs_driver.c +37 -36
169 lines not on this page · raw message
libsysfs/sysfs_utils.c renamed from udev-021/libsysfs/sysfs_utils.c +71 -59
308 lines not on this page · raw message
Greg KH
AppliedQuoted 11 lines · Ananth N Mavinakayanahalli
Hello Greg,
Please find attached a _BIG_ patch to update udev's libsysfs. Patch applies on udev-021 and contains:
1. Updates to get udev's libsysfs to the latest (to be released) level.
2. Changes for C++ compatibility (use "char" and not "unsigned char" unless absolutely necessary).
3. More importantly, take care of buffer overflows. Libsysfs now uses a scaled down version of Kay's "safe" macros.
Quoted 3 lines
Tested using a usb-storage device.
I will send you a doc update shortly.
Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel