summaryrefslogtreecommitdiffstats
path: root/sbin/devd
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | devd: fix a typo in a commentavg2013-11-071-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Reviewed by: asomers
* | | | | Correct the printf format specifier for total_events.asomers2013-07-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add __printflike argument checking for devdlog(). Reported by: pjd Approved by: gibbs (co-mentor)
* | | | | Explicitly include <cstdarg> to fix compilation with libc++. It is implicitlyasomers2013-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | included by libstdc++. Reported By: Oliver Hartmann Approved by: gibbs (co-mentor, implicit)
* | | | | style(9) fixes, including the removal of page break characters. No functionalasomers2013-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes. Approved by: gibbs (co-mentor)
* | | | | Add a SIGINFO handler to devd. It will send useful statistics to syslog orasomers2013-07-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stderr as appropriate. Currently, the only statistic printed is the number of events received. Reviewed by: eadler Approved by: gibbs (co-mentor)
* | | | | Add syslog(3) support to devd(8).asomers2013-07-012-36/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbin/devd/devd.cc All output will now go to syslog(3) if devd is daemonized, or stderr if it's running in the foreground. sbin/devd/devd.8 Remove the "-D" flag. Filtering messages by priority now happens in the usual syslog way. For performance reasons, a few extra-verbose debugging statements are now conditional on the "-d" (do not daemonize) flag. etc/syslog.conf etc/newsyslog.conf Direct messages from devd(8) to /var/log/devd.log, but leave it disabled by default Reviewed by: eadler Approved by: gibbs (co-mentor) MFC after: never (removed a command-line option from devd)
* | | | | Improve compatibility with recent flex from flex.sourceforge.net.jkim2013-05-031-2/+3
| | | | |
* | | | | Prefer using the C++ version of the standard headers. These place theeadler2013-05-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | names within the std namespace (and possibly within the global namespace). The main advantage is that the C++ versions can provide optimized versions or simplified interfaces.
* | | | | According to devctl(4), clients must read events whole; they may notasomers2013-04-261-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | piece them together from multiple reads(). It's as if /dev/devctl is a datagram device instead of a stream device. However, devd's internal buffer was too small (1025 bytes) to read an entire ereport.fs.zfs.checksum event (variable, up to ~1300 bytes). This commit enlarges the buffer to 8k. Reviewed by: imp Approved by: ken (mentor) MFC after: 2 weeks
* | | | devd: Correct typo in comment.eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use simpler dst += *x instead of str.append(x, 1).eadler2013-03-041-6/+6
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use string::empty() instea of string::length() == 0.eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Remove unnecessary empty default constructors.eadler2013-03-041-2/+0
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Remove empty virtual destructor from class, which has noch subclasses.eadler2013-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Avoid unnecessary temporary objects (and simplify the code) when ↵eadler2013-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handling std::string. Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use the standard constructor of std::string instead of string("").eadler2013-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Simplify while (1) { if (x) break; } to while (!x) {}.eadler2013-03-041-3/+1
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Remove call to _exit() from signal handler, which also sets a stop flag.eadler2013-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | devd: Use volatile sig_atomic_t for the flag set by a signal handler.eadler2013-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> Approved by: cperciva (mentor)
* | | | Constify where possible.eadler2013-03-042-2/+2
| | | | | | | | | | | | | | | | Approved by: cperciva (mentor)
* | | | Reflect CARP media-type departure.pluknet2013-02-211-3/+2
| | | | | | | | | | | | | | | | X-MFC after: never
* | | | Separate items in the list of System values with .Pp to ease readability.pluknet2013-02-211-0/+4
| |_|/ |/| |
* | | Bump .Dd for the change in r246121.zeising2013-02-051-1/+1
| | | | | | | | | | | | Approved by: joel (mentor)
* | | Improve devd startup time, by tweaking some string handling routines that areian2013-01-302-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Fix a descriptor leak in devd. Clients reading /var/run/devd.pipe can closeian2013-01-302-14/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | their socket connection any time, and devd only notices that when it gets an error trying to write an event to the client. On a system with no device change activity, clients could connect and disappear repeatedly without devd noticing, leading to an ever-growing list of open socket descriptors in devd. Now devd uses poll(2) looking for POLLHUP on all existing clients every time a new client connection is established, and also periodically (once a minute) to proactively find zombie clients and reap the socket descriptors. It also now has a connection limit, configurable with a new -l <num> command line arg. When the maximum number of connections is reached it stops accepting new connections until some current clients drop off. Reviewed by: imp Approved by: cognet (mentor)
* | | Prefer the use of initalizer lists to ctor assignment.eadler2012-12-062-3/+2
| | | | | | | | | | | | | | | Approved by: cperciva MFC after: 2 weeks
* | | Avoid the creation of a temporary object by using the prefix operatoreadler2012-12-061-9/+9
| | | | | | | | | | | | | | | | | | | | | for non-primitive types. Approved by: cperciva MFC after: 2 weeks
* | | Constify where possibleeadler2012-12-062-7/+7
| | | | | | | | | | | | | | | Approved by: cperciva MFC after: 2 weeks
* | | Fix an old bug in devd, where it uses std::sort() to sort the variousdim2012-12-051-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | document acpi_cpu devd notification about _CST changeavg2012-10-201-0/+2
| | | | | | | | | | | | Based on prodding and a submission by Lars Engels <lars.engels@0x20.net>. MFC after: 5 days
* | Use O_CLOEXEC for open instead of separate fcntl(2) call.pjd2012-09-221-3/+1
|/
* Make devd build with libc++.dim2012-06-011-1/+1
| | | | MFC after: 3 days
* Fix world after byacc import:bapt2012-05-221-0/+1
| | | | | | | | - 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)
* Fix build.glebius2012-01-061-1/+0
|
* o Sort .Xrs.maxim2011-12-191-2/+2
|
* In sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs. Indim2011-12-171-2/+2
| | | | | | devd.hh, there are redeclared as classes. Fix the inconsistency. MFC after: 1 week
* Xref re_format(7) in devd.conf(5), not in devd(8).glebius2011-12-162-5/+5
| | | | Pointy hat to: glebius
* Xref re_format(7).glebius2011-12-161-2/+3
|
* - Add support for a "!" character in regex matching in devd(8). It invertshrs2011-10-263-4/+19
| | | | | | | | | 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
* Typo. For USB devices, 'serial' should be 'sernum'.bms2011-05-101-1/+1
| | | | See sys/dev/usb/usb_device.c for what devctl_notify() gets.
* Don't generate input() since it's not used.brucec2010-11-221-0/+1
|
* Fix missing closedir()kevlo2010-11-211-0/+1
| | | | Reviewed by: imp
* Allow the kernel to generate more spacy things and still have devdimp2010-10-091-0/+8
| | | | | | | | cope. Skip multiple spaces in a few contexts. PR: 96854 Submitted by: Shin'ya Kumabuchi MFC after: 1 week
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-1/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-1/+1
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* - Avoid calling the copy constructor when it is not necessary.lulf2010-07-291-4/+3
|
* - Remove unused instance of string.lulf2010-07-291-1/+0
|
* Expand system into my_system, and add the necessary tidyness that weimp2010-06-292-2/+95
| | | | | | | | | | 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
* Document the new USB notification types.thompsa2010-04-221-1/+55
|
* Bump WARNS where possible.uqs2010-02-151-2/+1
| | | | | Checked by: make universe Approved by: ed (co-mentor)
OpenPOWER on IntegriCloud