summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-08-05udev-acl: add joystick devicesAnssi Hannula
User needs read-write access to joystick devices in order to use force feedback features.
2009-08-05rules: exclude digitizers from joystick classAnssi Hannula
Exclude digitizers and similar devices from ID_CLASS joystick by checking modalias for BTN_DIGI. This was also done for linux kernel joydev interface in linux commit d07a9cba6be5c0e947afc1014b5a62182a86f1f1.
2009-08-01update a few years of copyrightKay Sievers
2009-08-01fix util_lookup_group to handle large groupsEric W. Biederman
I have recently been getting the above message on fc11 and I have traced it down to a bug in util_lookup_group. As of 145 util_lookup_group reads: gid_t util_lookup_group(struct udev *udev, const char *group) { char *endptr; int buflen = sysconf(_SC_GETGR_R_SIZE_MAX); char buf[buflen]; struct group grbuf; struct group *gr; gid_t gid = 0; if (strcmp(group, "root") == 0) return 0; gid = strtoul(group, &endptr, 10); if (endptr[0] == '\0') return gid; errno = 0; getgrnam_r(group, &grbuf, buf, buflen, &gr); if (gr != NULL) return gr->gr_gid; if (errno == 0 || errno == ENOENT || errno == ESRCH) err(udev, "specified group '%s' unknown\n", group); else err(udev, "error resolving group '%s': %m\n", group); return 0; } The errno value from getgrnam_r here is ERANGE which is documented as "Insufficient buffer space supplied". When I call get getgrnam_r with a large enough buffer everything works. Indicating that the problem is that sysconf is returning a value too small. A quick google search tells me that sysconf(_S_GETGR_R_SIZE_MAX) is documented as: > sysconf(_S_GETGR_R_SIZE_MAX) returns either -1 or a good > suggested starting value for buflen. It does not return the > worst case possible for buflen. In my case I have a group with about 50 users in /etc/group and that is what triggered the problem in udev and caused all of the udevs group lookups to fail. The following patch which dynamically allocates the group member buffer should fix this problem. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2009-07-28enumeration: move ALSA control devices to the end of the enumerated devices ↵Lennart Poettering
of each card Generally ALSA control devices should be the last ones to be processed for ACL changes and similar operations because they can then be used as indicators that ACL management finished for all device nodes of a specific card. This patch simple moves each controlC device behind all the pcmC devices (and similar).
2009-07-25make: build internal tools against libudev-private.laKay Sievers
2009-07-24hid2hci: rewrite (and break) rules and device handlingKay Sievers
We must never access random devices in /dev which do not belong to the event we are handling. Hard-coding /dev/hidrawX, and looping over all devices is absolutely not acceptable --> hook into hidraw events. We can not relay on (rather random) properties merged into the parent device by earlier rules --> use libudev to find the sibling device with a matching interface. Libusb does not fit into udev's use case. We never want want to scan and open() all usb devices in the system, just to find the device we are already handling the event for --> put all the stupid scanning into a single function and prepare for a fixed libusb or drop it later.
2009-07-23format names are not case insensitiveKay Sievers
2009-07-23path_id: fix typo in commentKay Sievers
2009-07-23rules: serial - fix path_id callKay Sievers
2009-07-23extras/keymap: Fix crash for unknown keysMartin Pitt
The keymap table has some holes in it, which caused the interactive mode to crash for unknown keys. In these cases, print the numeric key code instead.
2009-07-23extras/modem-modeswitch: Add Huawei E1550 GSM modemErik Forsberg
What's odd is that this is a huawei modem, not an option modem, so one would expect it to work better with usb_modeswitch and it's -H (huawei) mode - but that's not the case, I've tested that as well. https://launchpad.net/bugs/401655
2009-07-23udevadm: trigger - add --sysname-match=Kay Sievers
$ udevadm trigger -n -v --subsystem-match=usb --sysname-match=2-1.1* /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1.1 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1.1/2-1.1.1:1.0 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1.2 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1.2/2-1.1.2:1.0 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1.2/2-1.1.2:1.1 /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.1/2-1.1:1.0
2009-07-22path_id: make global variable staticKay Sievers
2009-07-22hid2hci: remove hid structures and include kernel headerKay Sievers
2009-07-22hid2hci: support to hid2hci for recovering Dell BT devices after S3Mario Limonciello
2009-07-21configure.ac: version bumpKay Sievers
2009-07-21v4l_id: exit with 0 when --help is givenKay Sievers
2009-07-20extras/keymap: Add Samsung SX22SMartin Pitt
Reported on hal ML by Sergey Astanin <s.astanin@gmail.com>.
2009-07-18extras/keymap: teach findkeyboards about USB keyboardsMartin Pitt
2009-07-18extras/keymap: Add Fujitsu Amilo MMartin Pitt
https://launchpad.net/bugs/48547
2009-07-18extras/keymap: cover more Compaq Evo modelsMartin Pitt
https://launchpad.net/bugs/35382 shows that may Evo N* models share the same keymap, so generalize the existing rule.
2009-07-18extras/keymap: Add HP Presario 2100Martin Pitt
https://launchpad.net/bugs/20223
2009-07-18extras/keymap: add recently added keymap files to Makefile.amMartin Pitt
2009-07-18extras/keymap: fix check-keymaps.sh for inline mappingsMartin Pitt
Do not complain about missing keymap files when giving scancode/keyname pairs on the keymap command line in the rules.
2009-07-18keymap: inline one-line key mapsMartin Pitt
Remove key map files which have only one override. Instead, use keymap tools' new feature of specifying scancode/keyname pairs directly at the command line. Also add a comment to 95-keymap.rules about how to specify key mappings in the rules.
2009-07-18keymap tool: support scancode/keycode pair argumentsMartin Pitt
This avoids having to create and parse an entire keymap file for cases where just one or two keys have to be remapped.
2009-07-18keymap tool: improve helpMartin Pitt
Do not duplicate help strings, and add missing calling variant for interactivity.
2009-07-18extras/keymap: add Compal Hel80iMartin Pitt
https://launchpad.net/bugs/198530
2009-07-18extras/keymap: add Everex Stepnote XT5000TMartin Pitt
Reported in https://launchpad.net/bugs/400921
2009-07-17udevd: add timestamp to --debug outputKay Sievers
2009-07-16extras/keymap: add Zepto ZNoteMartin Pitt
Reported on https://launchpad.net/bugs/400252
2009-07-16add keymap for Clevo D410J laptopMartin Pitt
Reported as hal-info patch by Németh Márton <nm127@freemail.hu> on hal ML.
2009-07-13release 145Kay Sievers
2009-07-13udevd: use boolKay Sievers
2009-07-13udevd: handle SIGCHLD before the worker event messageKay Sievers
We may need to handle SIGCHLD before the queued worker message. The last reference, from the SIGCHLD or the worker message will clean up the worker context. In case we receive an unexpected SIGCHLD with an error, we let the event fail and clean up the worker context.
2009-07-11udevd: make sure a worker finishes event handling before exitingKay Sievers
Persistent network rules write out new rules files. When rules change, we need to kill all workers to update the in-memory copy of the rules. We need to make sure, that a worker finshes its work for all device messages it has accepted, before it exits after a SIGTERM from the main process.
2009-07-08udevadm: info - add space after R:, A:, W: on database exportKay Sievers
<zzam> kay: udevadmin info -e prints all lines with a space after the :, but the W: line <kay> zzam: yeah, seems so, and the R: and the A: <zzam> yeah
2009-07-08udevd: detach event from worker if we kill a workerKay Sievers
Jul 8 09:36:41 udevd[663]: worker [5491] did not accept message, kill it Jul 8 09:36:41 udevd[663]: worker [5491] unexpectedly returned with 0 Jul 8 09:36:41 udevd[663]: worker [5551] unexpectedly returned with 0 Jul 8 09:36:41 kernel: [ 156.832086] <6>udevd[663]: segfault at 4 ip 00959fbc sp bfbe7b78 error 6 in udevd[94f000+1c000] https://bugs.launchpad.net/ubuntu/+source/udev/+bug/396957
2009-07-08libudev: enumerate - sort with qsort()Kay Sievers
On machines with many thousands of devices: $ time find /sys -name uevent | wc -l 74876 real 0m33.171s user 0m3.329s sys 0m29.719s the current udevtrigger spends minutes sorting the device list: $ time /sbin/udevadm trigger --dry-run real 4m56.739s user 4m45.743s sys 0m7.862s with qsort() it looks better: $ time udev/udevadm trigger --dry-run real 0m6.495s user 0m0.473s sys 0m5.923s
2009-07-08libudev: device - free values before updating themKay Sievers
2009-07-08configure.ac: version bumpKay Sievers
2009-07-07use MIN() MAX() from param.hKay Sievers
2009-07-07README: add CONFIG_BLK_DEV_BSGKay Sievers
2009-07-06scsi_id: correct error handling in prepend_vendor_modelIan Campbell
The callers of prepend_vendor_model both expect < 0 to be returned on error and the index to be returned otherwise. However prepend_vendor_model actually returns 1 on error. Fix this by correctly returning -1. Older kernels (before e5b3cd42: "SCSI: sanitize INQUIRY strings") truncated the model field in sysfs (or propagated bad results from the target) to less than the expected/required 16 characters which meant that the SCSI id was mangled into: # /sbin/scsi_id -g -s /block/sdg S146cee20VIRTUAL-DISK when it should have been: # /sbin/scsi_id -g -s /block/sdg SIET VIRTUAL-DISK 146cee20 Notice how the serial number has been pasted over the vendor+model at index 1 instead of being added at the end. In the former case: # cat /sys/devices/platform/host5/session1/target5:0:0/5:0:0:1/model | od -t c -t x1 0000000 V I R T U A L - D I S K \n 56 49 52 54 55 41 4c 2d 44 49 53 4b 0a But it should have been: # cat /sys/devices/platform/host5/session1/target5:0:0/5:0:0:1/model | od -t c -t x1 0000000 V I R T U A L - D I S K 56 49 52 54 55 41 4c 2d 44 49 53 4b 20 20 20 20 0000020 \n 0a Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
2009-07-06release 144Kay Sievers
2009-07-05build: add *exec* to the internal rootlibdir nameKay Sievers
Automake like variables with *exec* in the directory names, to decide, that it isn't *data*: http://www.gnu.org/software/hello/manual/automake/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install
2009-07-04update NEWSKay Sievers
2009-07-04libudev: monitor - handle kernel supplied DEVNAME properlyKay Sievers
2009-07-04build: do not delete .la filesKay Sievers