Commit graph

3254 commits

Author SHA1 Message Date
Alan Jenkins 214a6c791c fix spelling
Fix spelling in docbook comments, code comments, and a local variable
name.  Thanks to "ispell -h" for docbook HTML and "scspell" for source
code.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-08 15:42:05 +02:00
Diego Elio 'Flameeyes' Pettenò bd2dab9ce5 Fix building of documentation when doing out-of-source builds.
Since gtk-mkhtml is executed in a sub-directory of the build directory, and
make does not know of that, the $(buildir) variable will still be "." and
the $(srcdir) will not properly be found. For this reason, use the absolute
variants for the two functions, which won't be changing.
2009-08-07 21:54:35 +02:00
Diego Elio 'Flameeyes' Pettenò eab32c2529 Use the keymap check during “make distcheck” rather than “check”.
Since the check-keymaps.sh script checks for validity the source directory
and the Makefile.am file, instead of running it during user-oriented “make
check”, run it during developed-oriented “make distcheck”.

An invalid keymap will abort the execution which will prevent shipping
an incomplete Makefile.am.

To properly support out-of-source builds, pass as single parameter to the
test the path to the source directory.
2009-08-07 20:05:55 +02:00
Diego Elio 'Flameeyes' Pettenò 51668e2c8b Merge in Makefile.am.inc into Makefile.am
This removes another file from the distribution, since we're not using it
anywhere else but the top-level Makefile.am file.
2009-08-07 19:44:30 +02:00
Diego Elio 'Flameeyes' Pettenò f5fcc00997 Ask gperf to use ANSI-C for generation.
This avoids an '80s C prototype which caused a warning during our build.
2009-08-07 19:41:17 +02:00
Diego Elio 'Flameeyes' Pettenò 1199a948e4 Add tests to the distribution; this fixes "make distcheck". 2009-08-07 19:15:31 +02:00
Diego Elio 'Flameeyes' Pettenò 40e32b7160 Include the correct directory for out-of-source builds.
When building in-source, the source and header files are in the same
directory, but they are not in out-of-source.
2009-08-07 19:15:31 +02:00
Diego Elio 'Flameeyes' Pettenò 102831867c Fix another relative path for the new working directory. 2009-08-07 19:15:31 +02:00
Diego Elio 'Flameeyes' Pettenò 3524b26220 Fix building of introspection library on top-level Makefile.am.
Since the library is in a subdirectory, it has to know where to look for
it.
2009-08-07 19:15:31 +02:00
Diego Elio 'Flameeyes' Pettenò c860480dbb Add silent-rule support for the gudev rules. 2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò 8d28c2adbd Make sure to use dependency/target variables. 2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò ca7ad57020 Make sure to clean up all the built sources. 2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò 33eb18305d Finally, also merge gudev into the top-level Makefile.am.
The Introspection rules are not tested yet; more touch-ups have been made
for them.
2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò 5b528d8479 Move pkg-config docs and man pages before conditionals.
Since gudev conditionally installs further pkg-config data, we have to set
it before the condition might be expanded.
2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò c831e09b87 Make keymap generation rules be silent (backward-compatible). 2009-08-07 19:15:30 +02:00
Diego Elio 'Flameeyes' Pettenò 7d701b0e26 Merge keymap building in the top-level Makefile.am.
Slight adjustment around the tests and the rules for the new working
directory.
2009-08-07 19:15:29 +02:00
Diego Elio 'Flameeyes' Pettenò 402520cc08 Change hook handling to be more portable. 2009-08-07 19:15:29 +02:00
Diego Elio 'Flameeyes' Pettenò b02140b6bc Also merge into the top-level Makefile.am the simpler extras. 2009-08-07 19:15:29 +02:00
Diego Elio 'Flameeyes' Pettenò 405e606f86 Replace the custom test-run target with the standard make check.
A little fix is needed for the udev-test.pl script (to be called with the
proper path), but this allows for the test binaries to be only built when
running the tests themselves.
2009-08-07 19:15:28 +02:00
Diego Elio 'Flameeyes' Pettenò 59d93adb29 Merge libudev, udev, and the unconditional extras in a single Makefile.am.
Instead of using multiple recursive Makefile.am files, use a single
Makefile.am that sets and builds all the basic suite of libraries and
binaries for udev. This reduces the number of files in the source tree, and
also reduces drastically the build time when using parallel-make.

With this setup, all the compile steps will be executed in parallel, and
just the linking stage will be (partially) serialised on the libraries
creation.
2009-08-07 19:15:28 +02:00
Martin Pitt 4de08374d0 extras/keymap: Fix Bluetooth key on Acer Aspire 6920
See https://launchpad.net/bugs/407940
2009-08-07 15:41:54 +01:00
Alan Jenkins 5bdba42ddb man: SYMLINK can be matched as well as assigned
If by-path / by-id links don't quite do what you want, this is a nice
clean way to extend the behaviour.  Real example:

SYMLINK=="serial/by-id/usb-Novatel_Wireless_Inc*CDMA*-if00-port0", \\
 SYMLINK+="cellcard"

Some users ask how to do things like this.

 - create an additional link with a shorter name
 - create a link which matches more loosely
    (omit certain path segments e.g. serial numbers)
 - change permissions on certain USB device nodes

Allow them to realize this without reading the friendly *.c files.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-07 14:46:42 +02:00
Alan Jenkins 8e534e2a47 man: fix unused, inaccurate metadata
Dates aren't shown in the manpages.  So they are not really useful,
and no-one is going to remember to update them.

"<refmiscinfo class="version"></refmiscinfo>" sounds even less useful.

I leave the unused "title" and "productname" tags.  They could
theoretically be useful, and aren't hard to maintain.  We just need to
fix the "title" for udevadm.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-07 14:46:42 +02:00
Martin Pitt 5e22aab2e9 extras/keymap: Add Samsung NC20
Reported by Dirk Thierbach <dthierbach@gmx.de> on hal ML.
2009-08-07 11:11:48 +01:00
Mario Limonciello 8aba9a4bca hid2hci: install re-trigger for hid device when recovering from S3 2009-08-07 02:23:44 +02:00
Kay Sievers 16dd0aa922 "record_failed" -> "fail_event_on_error" 2009-08-06 19:23:06 +02:00
Kay Sievers f7c5b04f69 re-enable failed event tracking
It did not work for the last couple of releases.

If RUN{record_failed}+="..." is given, a non-zero execution will mark
the event as failed. Recorded failed events can be re-triggered with:
  udevadm trigger --type=failed

The failed tracking _might_ be useful for things which might not be
ready to be executed at early bootup, but a bit later when the needed
dependencies are available. In many cases though, it indicates that
something is used in a way it should not.
2009-08-06 16:16:26 +02:00
Kay Sievers 6e4025dfc8 make: suppress enter/leaving directory messages 2009-08-06 15:51:47 +02:00
Kay Sievers 43c42ca454 libudev: silent gcc warning: may be used uninitialized in this function 2009-08-06 15:37:55 +02:00
Anssi Hannula 2a0c6867cb udev-acl: add joystick devices
User needs read-write access to joystick devices in order to use force
feedback features.
2009-08-05 05:08:45 +02:00
Anssi Hannula d256454415 rules: exclude digitizers from joystick class
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-05 05:07:15 +02:00
Kay Sievers fc206fbe3e update a few years of copyright 2009-08-01 09:39:18 -04:00
Eric W. Biederman 504a553e78 fix util_lookup_group to handle large groups
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-08-01 09:23:50 -04:00
Lennart Poettering 3bf768245b enumeration: move ALSA control devices to the end of the enumerated devices 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-28 03:10:05 +02:00
Kay Sievers 2a827c959a make: build internal tools against libudev-private.la 2009-07-25 20:37:45 +02:00
Kay Sievers 4b6769f612 hid2hci: rewrite (and break) rules and device handling
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-24 18:06:22 +02:00
Kay Sievers d5b5a611ae format names are not case insensitive 2009-07-23 20:30:52 +02:00
Kay Sievers 58230a77d3 path_id: fix typo in comment 2009-07-23 20:30:52 +02:00
Kay Sievers 8f2f1b1262 rules: serial - fix path_id call 2009-07-23 20:30:52 +02:00
Martin Pitt 0dcf1ce1f7 extras/keymap: Fix crash for unknown keys
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-23 19:00:38 +02:00
Erik Forsberg 53842b5382 extras/modem-modeswitch: Add Huawei E1550 GSM modem
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-23 16:40:25 +02:00
Kay Sievers cf5bd04073 udevadm: trigger - add --sysname-match=
$ 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-23 00:02:28 +02:00
Kay Sievers 1b691f831b path_id: make global variable static 2009-07-22 19:09:48 +02:00
Kay Sievers 9821e70264 hid2hci: remove hid structures and include kernel header 2009-07-22 01:03:33 +02:00
Mario Limonciello 5bacd2aadc hid2hci: support to hid2hci for recovering Dell BT devices after S3 2009-07-22 00:33:27 +02:00
Kay Sievers be7fec4815 configure.ac: version bump 2009-07-21 01:40:47 +02:00
Kay Sievers 7a1566b0ee v4l_id: exit with 0 when --help is given 2009-07-21 01:36:42 +02:00
Martin Pitt 9093c7c132 extras/keymap: Add Samsung SX22S
Reported on hal ML by Sergey Astanin <s.astanin@gmail.com>.
2009-07-20 17:59:11 +02:00
Martin Pitt 0b8d9a7333 extras/keymap: teach findkeyboards about USB keyboards 2009-07-18 16:59:46 +02:00
Martin Pitt 6e40a05718 extras/keymap: Add Fujitsu Amilo M
https://launchpad.net/bugs/48547
2009-07-18 15:30:08 +02:00