Commit Graph

15 Commits

Author SHA1 Message Date
Eitan Adler
1d9bf149ef devd: Remove unnecessary empty default constructors.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:24 +00:00
Eitan Adler
012148abc2 devd: Remove empty virtual destructor from class, which has noch subclasses.
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:22 +00:00
Eitan Adler
6d58c721c6 devd: Use the standard constructor of std::string instead of string("").
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
Approved by:	cperciva (mentor)
2013-03-04 02:21:17 +00:00
Eitan Adler
11fd1366bc Constify where possible.
Approved by:	cperciva (mentor)
2013-03-04 02:19:55 +00:00
Ian Lepore
5dfc0f6c53 Improve devd startup time, by tweaking some string handling routines that are
heavily used when parsing config files.  Mostly these changes avoid making
temporary copies of the strings, and avoid doing byte at a time append
operations, on the most-used code path.

On a 1.2 GHz ARM processor this reduces the time to parse the config files
from 13 to 6 seconds.

Reviewed by:	imp
Approved by:	cognet (mentor)
2013-01-30 23:37:35 +00:00
Eitan Adler
c3fa0037ba Prefer the use of initalizer lists to ctor assignment.
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:25:21 +00:00
Eitan Adler
ef370346d6 Constify where possible
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:25:14 +00:00
Dimitry Andric
b884d5e84a 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
Hiroki Sato
0321b694c7 - 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
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
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
Pawel Jakub Dawidek
1a0cc6b19e Use pidfile(3).
OK'ed by:	imp
2006-01-30 22:50:13 +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
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
Warner Losh
6aeeca8edf Create a new C++ header file called devd.hh which has all the class
definitions in it.  Begin to document the classes that we use, and how
they interrelate (using comments that I can use with doxygen to
automatically generate docs with).
2003-04-26 20:59:04 +00:00