Commit Graph

78 Commits

Author SHA1 Message Date
Bruce M Simpson
e1e3c30189 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
Rebecca Cran
09c7c81c16 Don't generate input() since it's not used. 2010-11-22 12:33:48 +00:00
Kevin Lo
5983e89162 Fix missing closedir()
Reviewed by:	imp
2010-11-21 04:02:37 +00:00
Warner Losh
9b6cb52091 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
Ulrich Spörlein
0d9deed52c 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 Dahl
c2025a7660 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
Ulf Lilleengen
5bf0842244 - Avoid calling the copy constructor when it is not necessary. 2010-07-29 16:06:40 +00:00
Ulf Lilleengen
a75716fc2d - Remove unused instance of string. 2010-07-29 16:01:10 +00:00
Warner Losh
b8f92ce4de 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
Andrew Thompson
139e9ad4d6 Document the new USB notification types. 2010-04-22 20:46:39 +00:00
Ulrich Spörlein
2b6974bf61 Bump WARNS where possible.
Checked by:	make universe
Approved by:	ed (co-mentor)
2010-02-15 14:07:40 +00:00
Maxim Konovalov
01cd0a978f o Spell. Sort .Xrs. 2009-03-08 18:02:30 +00:00
Konstantin Belousov
2e1705590c 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
Poul-Henning Kamp
0f3311c56f Send all debug to stderr. 2008-12-14 11:48:51 +00:00
Poul-Henning Kamp
877ed37a0d Clarify that configuration files must be named '*.conf' 2008-12-14 11:47:39 +00:00
Warner Losh
d6aed19dfb 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
Warner Losh
ec4a9b7ce1 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
John Birrell
9538bab38b 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
Ruslan Ermilov
f8553712c4 Fix the description of "media-type". 2006-10-24 20:20:41 +00:00
Ruslan Ermilov
ebd1e4e6b8 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
John-Mark Gurney
e0c10c6e08 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
Ruslan Ermilov
5ef35a9854 Add -f option to program's usage(), fix manpage's SYNOPSIS. 2006-09-17 22:49:26 +00:00
Maxim Konovalov
4a3050fc46 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
Pawel Jakub Dawidek
1a0cc6b19e Use pidfile(3).
OK'ed by:	imp
2006-01-30 22:50:13 +00:00
Warner Losh
9cb4a7bd64 It was always intended that regular expression matching be case
insensitive.  Make it so.
2006-01-08 05:18:36 +00:00
Joseph Koshy
80615950df Rev 1.15 should have incremented the date on this manual page. 2005-12-19 02:55:44 +00:00
Joseph Koshy
8334958a7f 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
Alexander Nedotsukov
13f8bb7143 Reuse delete_and_clear() template helper.
Approved by:	imp
2005-11-14 02:01:10 +00:00
Brooks Davis
94d2d4eb04 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
Warner Losh
de02eec866 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
Warner Losh
09c47e76fb 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
Joe Marcus Clarke
e60fa01486 * 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
Joe Marcus Clarke
8381892977 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
Warner Losh
cd70782b39 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
Warner Losh
f32a7686ec Ignore sigpipe so we can properly detach clients to the pipe.
Submitted by: Fredrik Lindberg
2005-05-16 20:51:46 +00:00
Warner Losh
528d3f7955 Fix parsing of nomatch events.
minor debug fix.
2005-04-18 02:54:07 +00:00
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Ruslan Ermilov
214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ceri Davies
e33bdcedbc Clarify that devd will only parse files whose names end in .conf.
Prompted by

PR:		docs/73668
Submitted by:	Dan Pelleg
MFC After:	3 days
2004-11-28 17:44:22 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Warner Losh
251bedd15b Create a unix domain socket and write to it all the events that come
in over the socket.
2004-07-01 07:24:18 +00:00
Warner Losh
842ccec57e Parse the ! lines that will soon be coming from the kernel. These are
a generalized notification mechanism for subsystems wishing to report
events.

Revieded by: njl

# The kernel side seems like it might be causing panics for me, but should
# be forthcoming shortly.
2003-10-24 22:02:29 +00:00
Ralf S. Engelschall
ffd1bc0626 fix typo: s/Instaed/Instead/ 2003-09-26 12:24:16 +00:00
Gordon Tetlow
9a4e73fe5e At imp's request, force devd to be statically compiled. This avoids the
need for libstdc++ in /lib, and the generated binary is actually smaller
statically linked than dynamically + sizeof(libstdc++). Additionally,
devd doesn't use get*by*() which is one of the main motivations for
dynamically linking your root partition anyway.
2003-08-17 08:40:49 +00:00
Warner Losh
fc3a3ee720 Simplistic C comment re is wrong, use more correct one 2003-07-23 23:50:25 +00:00
Warner Losh
f30595058e Remove old workaround 2003-07-23 23:50:00 +00:00
Warner Losh
fd6a8f23ef Drop the pid file after we call the final daemon call. w/o -n would
give the wrong pid.

Submitted by: ru and Lukas Ertl
PR: 54113
2003-07-05 00:43:50 +00:00
Ruslan Ermilov
d5986fac3a mdoc(7) fixes: Expand contraction. 2003-05-17 22:21:27 +00:00
Warner Losh
18e8d6d786 Allow zero or more actions in an action list, rather than requiring
one or more actions in the list.  This makes constructs like:

attach 10 {
//	echo "Driver $device_name attached"
};

to be accepted by the parser.  It will be treated as if the user had
entered:

// attach 10 {
//	echo "Driver $device_name attached"
// };

(eg totally ignored).

Approved by: re@ (rwatson)
2003-05-15 02:23:32 +00:00