summaryrefslogtreecommitdiff
path: root/namedev.c
AgeCommit message (Collapse)Author
2005-04-26[PATCH] more robust config file parsing in namedev.carnd@arndb.de
After getting a number of different crashes for udev reading broken udev.config files, I decided to try to make the parser a little more robust. The behaviour is changed to stop reading the configuration file and logging the broken entry instead of silently ignoring it (is that good? It's easy to just print and continue). All strcpy()'s to a fixed length string are now implicitly limited to the bounds of the target string. I kept the -ENODEV return code for now, not sure if there should be different ones.
2005-04-26[PATCH] add bus id modifierarnd@arndb.de
On Tuesday 18 November 2003 02:14, Greg KH wrote: > On Mon, Nov 17, 2003 at 06:33:32PM +0100, Arnd Bergmann wrote: > > That would at least be part of the solution I'm looking for. How about > > extra format characters for bus_id and for the result of a callout > > program? > > Sure, I can see the use for that. Want to send a patch? :) > Take a look at the current bk tree (which has moved to > bk://linuxusb.bkbits.net/udev/ ) I've made finding that device a lot > easier now, and it works for all rule types. Great, just what I was missing. I didn't see the any link to the bk repository. Here's the patch for the bus_id. I'll need to think about the handling of callout results a bit more.
2005-04-26[PATCH] change debug level on printf values for now.greg@kroah.com
2005-04-26[PATCH] fix up printf-like functionality due to previous changes.greg@kroah.com
2005-04-26[PATCH] implement printf-like placeholder support for NAMEkay.sievers@vrfy.org
> Problem is, if you use the LABEL rule to match a device, like a SCSI > vendor, then all of the partitions, as well as the main block device, > will end up with the same name. That's why I added the "add the number" > hack to the LABEL rule. > > So yes, your patch is correct in that we shouldn't always be adding the > number to any match for LABEL (like for char devices), but if we do > that, then we break partitions. Your '%' patch fixes this, but I'd just > like to extend it a bit. Let me see what I can come up with... Oh, I see. Do you mean something like this: LABEL, BUS="usb", model="Creative Labs WebCam 3", NAME="webcam%n-%M:%m-test" results in: "webcam0-81:0-test" Nov 15 16:51:53 pim udev[16193]: get_class_dev: looking at /sys/class/video4linux/video0 Nov 15 16:51:53 pim udev[16193]: get_class_dev: class_dev->name = video0 Nov 15 16:51:53 pim udev[16193]: get_major_minor: dev = 81:0 Nov 15 16:51:53 pim udev[16193]: get_major_minor: found major = 81, minor = 0 Nov 15 16:51:53 pim udev[16193]: udev_add_device: name = webcam0-81:0-test Nov 15 16:51:53 pim udev[16193]: create_node: mknod(/udev/webcam0-81:0-test, 020666, 81, 0) implement printf-like placeholder support for NAME %n-kernel number, %M-major number, %m-minor number
2005-04-26[PATCH] trailing whitespace cleanups.greg@kroah.com
2005-04-26[PATCH] splig LABEL and NUMBER into separate functions.greg@kroah.com
Now items are processed in priority order, fixing that bug.
2005-04-26[PATCH] move TOPOLOGY rule to it's own function.greg@kroah.com
2005-04-26[PATCH] fix bug where NUMBER and TOPOLOGY would not work for partitions.greg@kroah.com
2005-04-26[PATCH] clean up the way we find the sysdevice for a block device for namedev.greg@kroah.com
2005-04-26[PATCH] split REPLACE and CALLOUT into separate functionsgreg@kroah.com
Finally starting to process this in priority order, not config file order.
2005-04-26[PATCH] add debug line for REPLACE call.greg@kroah.com
2005-04-26[PATCH] turn off debugging in namedevgreg@kroah.com
2005-04-26[PATCH] klibc specific tweaksgreg@kroah.com
2005-04-26[PATCH] fix LABEL bug for device files (not class files.)greg@kroah.com
2005-04-26[PATCH] got rid of struct device_attrgreg@kroah.com
namedev.c is still a mess, that's up next after testing...
2005-04-26[PATCH] namedev.c comments + debug patchkay@vrfy.org
and a patch for namdev.c comments + debug o correct 'device device' o correct permission file to config file
2005-04-26[PATCH] fix dbg line in namedev.cgreg@kroah.com
Thanks to Kay Sievers <kay@vrfy.org> for pointing this out.
2005-04-26[PATCH] make config files, sysfs root, and udev root configurable from ↵greg@kroah.com
config variables This will make running tests a lot simpler.
2005-04-26[PATCH] new version of libsysfs patchdsteklof@us.ibm.com
Here's the patch applying the latest libsysfs. - adds the latest libsysfs code to udev * new code includes dlist implementation, a generic linked list implementation. Needed our own because LGPL * rearranged structures * provided more functions for accessing directory and attributes - gets rid of ->directory->path references in namedev.c - replaces sysfs_get_value_from_attributes with sysfs_get_classdev_attr
2005-04-26[PATCH] udev: mode should be mode_trml@tech9.net
Unix file modes should be stored in a mode_t, not a standard type. At the moment it is actually unsigned, in fact, not a signed integer. Attached patch does an s/int mode/mode_t mode/ and cleans up the results.
2005-04-26[PATCH] add dbg_parse() to cut down on parse file debugging statementsgreg@kroah.com
Can be turned on by hand in the namedev.c file.
2005-04-26[PATCH] add callout config type to udevpatmans@us.ibm.com
This patch adds a callout config type to udev, so external programs can be called to get serial numbers or id's that are not available as a sysfs attribute.
2005-04-26[PATCH] clean up some debugging stuff in namedev.cgreg@kroah.com
2005-04-26[PATCH] oops, everything was getting created as 000 mode, try to fix this up,greg@kroah.com
2005-04-26[PATCH] start working on label support, and fix some segfaults for block ↵greg@kroah.com
devices.
2005-04-26[PATCH] add NUMBER support (basically same logic as TOPOLOGY, perhaps we ↵greg@kroah.com
should merge this...)
2005-04-26[PATCH] added topology support.greg@kroah.com
2005-04-26[PATCH] got REPLACE to work properly.greg@kroah.com
2005-04-26[PATCH] make struct config_device contain a struct device_attr instead of ↵greg@kroah.com
duplicating the mess.
2005-04-26[PATCH] Clean up the namedev interface a bit, making the code smaller...greg@kroah.com
2005-04-26[PATCH] add initial libsysfs support...greg@kroah.com
needs lots more cleanup, but is much nicer than doing this by hand...
2005-04-26[PATCH] namedev config files are fully parsed.greg@kroah.com
now to do something with the data...
2005-04-26[PATCH] Initial namedev parsing of config filesgreg@kroah.com
.permission parsing works, .config needs more work.