eadler
d63ec4c24b
Prefer the use of initalizer lists to ctor assignment.
...
Approved by: cperciva
MFC after: 2 weeks
2012-12-06 01:25:21 +00:00
eadler
76f827328b
Avoid the creation of a temporary object by using the prefix operator
...
for non-primitive types.
Approved by: cperciva
MFC after: 2 weeks
2012-12-06 01:25:17 +00:00
eadler
be40a13e59
Constify where possible
...
Approved by: cperciva
MFC after: 2 weeks
2012-12-06 01:25:14 +00:00
dim
ab2b1f57e9
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
avg
04a3ee8c86
document acpi_cpu devd notification about _CST change
...
Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>.
MFC after: 5 days
2012-10-20 09:40:34 +00:00
pjd
66da4b41b3
Use O_CLOEXEC for open instead of separate fcntl(2) call.
2012-09-22 12:42:51 +00:00
dim
2c17ed141e
Make devd build with libc++.
...
MFC after: 3 days
2012-06-01 06:56:35 +00:00
bapt
310ab6d7ff
Fix world after byacc import:
...
- old yacc(1) use to magicially append stdlib.h, while new one don't
- new yacc(1) do declare yyparse by itself, fix redundant declaration of
'yyparse'
Approved by: des (mentor)
2012-05-22 16:33:10 +00:00
glebius
6700bd7ced
Fix build.
2012-01-06 15:01:05 +00:00
maxim
473a67378d
o Sort .Xrs.
2011-12-19 05:09:08 +00:00
dim
32859c5990
In sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs. In
...
devd.hh, there are redeclared as classes. Fix the inconsistency.
MFC after: 1 week
2011-12-17 01:54:51 +00:00
glebius
8e22f12db2
Xref re_format(7) in devd.conf(5), not in devd(8).
...
Pointy hat to: glebius
2011-12-16 10:21:01 +00:00
glebius
014ced0760
Xref re_format(7).
2011-12-16 10:14:41 +00:00
hrs
fb5f47d254
- Add support for a "!" character in regex matching in devd(8). It inverts
...
the logic (true/false) of the matching.
- Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.
Reviewed by: imp
2011-10-26 02:11:28 +00:00
bms
f92bf45e3f
Typo. For USB devices, 'serial' should be 'sernum'.
...
See sys/dev/usb/usb_device.c for what devctl_notify() gets.
2011-05-10 02:34:11 +00:00
brucec
316b5514e8
Don't generate input() since it's not used.
2010-11-22 12:33:48 +00:00
kevlo
dac2186be3
Fix missing closedir()
...
Reviewed by: imp
2010-11-21 04:02:37 +00:00
imp
6dc6856e33
Allow the kernel to generate more spacy things and still have devd
...
cope. Skip multiple spaces in a few contexts.
PR: 96854
Submitted by: Shin'ya Kumabuchi
MFC after: 1 week
2010-10-09 07:29:13 +00:00
uqs
8ae3afcfad
mdoc: drop redundant .Pp and .LP calls
...
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
joel
dd1fff9bcb
Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
...
translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2010-08-16 15:18:30 +00:00
lulf
87c9a96183
- Avoid calling the copy constructor when it is not necessary.
2010-07-29 16:06:40 +00:00
lulf
1b486040f0
- Remove unused instance of string.
2010-07-29 16:01:10 +00:00
imp
93e0327a90
Expand system into my_system, and add the necessary tidyness that we
...
need. Close the pidfile. Then close all descriptors >= 3 to avoid
information leakage to children.
This solves the problem of not being able to restart devd when you
have, for example, a dhclient forked to configure your network...
MFC after: 3 days
2010-06-29 03:52:12 +00:00
thompsa
6fc09494d1
Document the new USB notification types.
2010-04-22 20:46:39 +00:00
uqs
764da0e641
Bump WARNS where possible.
...
Checked by: make universe
Approved by: ed (co-mentor)
2010-02-15 14:07:40 +00:00
maxim
5dd0791944
o Spell. Sort .Xrs.
2009-03-08 18:02:30 +00:00
kib
ecebbcfa4c
Document several notifications, among them are DEVFS, update to ifneti,
...
coretemp and kern.
The asmc(4) and zfs(5) are still not documented.
Based on the patch by Roland Smith <rsmith xs4all nl>.
MFC after: 1 week
2009-03-08 14:28:40 +00:00
phk
62577aca10
Send all debug to stderr.
2008-12-14 11:48:51 +00:00
phk
329b1107fb
Clarify that configuration files must be named '*.conf'
2008-12-14 11:47:39 +00:00
imp
5541a160b6
No need to be gratuitously style(9) non-compliant here, even though
...
C++ lets me get away with it.
2008-03-21 20:38:28 +00:00
imp
71f57a2fb1
Minor initialization change to not trigger bogus gcc warning about
...
passing literal strings to the constructors of string.
2007-12-21 01:00:04 +00:00
jb
bdea99cbc2
Reduce the WARNS level across the board due to a warning that occurs
...
on at least arm and sparc64. i386/pc98, ia64 and amd64 are all OK.
2007-11-19 00:19:01 +00:00
ru
18498b3d43
Fix the description of "media-type".
2006-10-24 20:20:41 +00:00
ru
c33f5fb2d6
Revise the markup, sort sections, fix some grammar bugs.
...
Not fixed: the description of media-type is completely bogus.
2006-10-21 17:15:11 +00:00
jmg
3043d9a100
flesh out the devd.conf man page... Mostly from the PR, but did a couple
...
gramatical tweaks along w/ sorting the list, and adding that serial is
available for USB....
PR: 85097
Submitted by: Fredrik Lindberg
MFC after: 1 week
2006-10-07 21:15:40 +00:00
ru
46470485d3
Add -f option to program's usage(), fix manpage's SYNOPSIS.
2006-09-17 22:49:26 +00:00
maxim
4c7363828c
o Yacc's lineno variable holds a total number of parsed lines.
...
Reset it to 1 for each devd config file so if the parser finds
a syntax error devd(8) will report a correct line number.
Submitted by: Niki Denev
MFC after: 2 weeks
2006-04-14 07:20:42 +00:00
pjd
f9836a378d
Use pidfile(3).
...
OK'ed by: imp
2006-01-30 22:50:13 +00:00
imp
4f9a9122c6
It was always intended that regular expression matching be case
...
insensitive. Make it so.
2006-01-08 05:18:36 +00:00
jkoshy
4f006a501c
Rev 1.15 should have incremented the date on this manual page.
2005-12-19 02:55:44 +00:00
jkoshy
ee7f1faad2
Add a -f configfile option to devd(8), based on a patch submitted by
...
Wojciech A. Koszek.
Submitted by: Wojciech A. Koszek <dunstan@freebsd.czest.pl>
2005-11-24 14:39:41 +00:00
bland
b093df020c
Reuse delete_and_clear() template helper.
...
Approved by: imp
2005-11-14 02:01:10 +00:00
brooks
046511ce88
Make devd WARNS=4 clean and bump WARNS accordingly. This will insure
...
that future variable shadowing bugs don't compile.
Reviewed by: imp
Compiled on: alpha i386 sparc64
2005-10-19 21:21:22 +00:00
imp
32a93330de
As pointed out on current@, we don't want to declare a variable in a scope
...
that just uses the variable and throws it away.
This should fix the subsystem keyword wrt media-type.
MFC After: 2 days
2005-10-19 18:10:34 +00:00
imp
1edcefa858
media-type predicate is used in contexts where device-name is undefined.
...
In those contexted, use subsystem instead.
# This causes dhclient to run again when I plug in my ethernet cable to
# my fxp card in my laptop.
2005-10-04 22:22:51 +00:00
marcus
5b352640f8
* Open permissions on /var/run/devd.pipe so that any user can read devd events
...
from this socket
* Enable non-blocking I/O on devd.pipe to keep clients from wedging devd.
If a write(2) on devd.pipe would block, the client in question will be
removed [1]
Requested by: rwatson [1]
Approved by: imp
2005-07-13 17:28:11 +00:00
marcus
087a48f885
Replace fch{mod,own} with straight ch{mod,own} as the former cannot be used
...
on socket file descriptors.
Reviewed by: secteam (cperciva)
Approved by: imp
2005-07-13 17:10:47 +00:00
imp
68644ee7c2
Add the ability to match the on a media type of the device in question.
...
Submitted by: sam
Approved by: re (scottl)
2005-07-10 03:37:15 +00:00
imp
1cec98375c
Ignore sigpipe so we can properly detach clients to the pipe.
...
Submitted by: Fredrik Lindberg
2005-05-16 20:51:46 +00:00
imp
6bc67c1366
Fix parsing of nomatch events.
...
minor debug fix.
2005-04-18 02:54:07 +00:00