freebsd-dev/sbin/devd
Dimitry Andric 0c04d1850f Fix an old bug in devd, where it uses std::sort() to sort the various
lists it reads from its configuration files on the priority field.

Because some items in the lists have the same priority, and std::sort()
is not stable, the exact order in which the items are enumerated does
not have to correspond to the order they appear in the configuration
files.

Apparently this was never noticed with libstdc++, but with libc++ it
could cause the "uhid" entry from /etc/devd/usb.conf to be used instead
of the "ums" entry (which is earlier in the file).  This caused the
problem described in the PR: the USB mouse module was never loaded, and
the other actions (such as starting moused) were not executed.

To fix the problem, make devd use std:stable_sort() instead.

Reported by:	Jan Beich <jbeich@tormail.org>
PR:		bin/172958
MFC after:	2 weeks
2012-12-05 20:50:40 +00:00
..
devd.8 Xref re_format(7) in devd.conf(5), not in devd(8). 2011-12-16 10:21:01 +00:00
devd.cc Fix an old bug in devd, where it uses std::sort() to sort the various 2012-12-05 20:50:40 +00:00
devd.conf.5 document acpi_cpu devd notification about _CST change 2012-10-20 09:40:34 +00:00
devd.h Add the ability to match the on a media type of the device in question. 2005-07-10 03:37:15 +00:00
devd.hh In sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs. In 2011-12-17 01:54:51 +00:00
Makefile Bump WARNS where possible. 2010-02-15 14:07:40 +00:00
parse.y Fix world after byacc import: 2012-05-22 16:33:10 +00:00
token.l Don't generate input() since it's not used. 2010-11-22 12:33:48 +00:00