aboutsummaryrefslogtreecommitdiff
path: root/sbin/devd/devd.cc
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/6.0.0_cvscvs2svn2005-11-031-1/+1
| | | | | | 'RELENG_6_0_0_RELEASE'. This commit was manufactured to restore the state of the 6.0-RELEASE image.
* MFC: 1.26Warner Losh2005-10-251-1/+1
| | | | | | | Approved by: re@ (scottl) Notes: svn path=/releng/6.0/; revision=151662
* MFC: if no device-name, look at subsystemWarner Losh2005-10-061-1/+9
| | | | | | | Approved by: re@ (scottl) Notes: svn path=/stable/6/; revision=151038
* MFC:Joe Marcus Clarke2005-09-191-1/+1
| | | | | | | | | | | Correct a mis-merge from HEAD, and make sure the socket permissions are set to 0666. Reported by: delphij via rwatson Approved by: re (scottl) Notes: svn path=/stable/6/; revision=150345
* MFC: revs 1.23 and 1.24Joe Marcus Clarke2005-07-181-2/+4
| | | | | | | | | | | | | | | * Replace fch{mod,own} with straight ch{mod,own} as the former cannot be used on socket file descriptors * 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 Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=148110
* Add the ability to match the on a media type of the device in question.Warner Losh2005-07-101-0/+74
| | | | | | | | Submitted by: sam Approved by: re (scottl) Notes: svn path=/head/; revision=147874
* Ignore sigpipe so we can properly detach clients to the pipe.Warner Losh2005-05-161-0/+2
| | | | | | | Submitted by: Fredrik Lindberg Notes: svn path=/head/; revision=146306
* Fix parsing of nomatch events.Warner Losh2005-04-181-3/+6
| | | | | | | minor debug fix. Notes: svn path=/head/; revision=145218
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-101-1/+1
| | | | Notes: svn path=/head/; revision=141611
* Create a unix domain socket and write to it all the events that comeWarner Losh2004-07-011-14/+86
| | | | | | | in over the socket. Notes: svn path=/head/; revision=131397
* Parse the ! lines that will soon be coming from the kernel. These areWarner Losh2003-10-241-9/+36
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=121487
* Remove old workaroundWarner Losh2003-07-231-3/+1
| | | | Notes: svn path=/head/; revision=117944
* Drop the pid file after we call the final daemon call. w/o -n wouldWarner Losh2003-07-051-2/+4
| | | | | | | | | | give the wrong pid. Submitted by: ru and Lukas Ertl PR: 54113 Notes: svn path=/head/; revision=117246
* sysctlbyname takes a size_t as its 5th argument, not a pointer.Warner Losh2003-05-021-1/+1
| | | | | | | | | | However, since NULL was used, and this is C++, this error went undetected until g++ 3.3 somehow managed to whine about it. Reported by: obrien Notes: svn path=/head/; revision=114541
* Create a new C++ header file called devd.hh which has all the classWarner Losh2003-04-261-101/+2
| | | | | | | | | 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). Notes: svn path=/head/; revision=114086
* Update to use is_id_char() in the last patch. I should have done thisWarner Losh2003-04-261-2/+1
| | | | | | | before the last commit. Notes: svn path=/head/; revision=114084
* Make better use of the string type when parsing things. This switchesWarner Losh2003-04-261-28/+22
| | | | | | | | | | | expand one from using a fixed buffer to using a string which dynamically allocates these things. Submitted by: green@ (against an earlier version of devd) Ignored for too long by: imp Notes: svn path=/head/; revision=114081
* Change default to be 'process all events before calling daemon.'Warner Losh2003-04-251-2/+4
| | | | | | | | | | | Also, put a small work around into devd to prevent a hang on boot this would cause because select used to return 2 rather than 0 for no evetnts due to a bug I fixed a few days ago in subr_bus.c. I'll remove this workaround May 7th. You have until then to upgrade your kernel if you want to run a new devd with an older kernel. Notes: svn path=/head/; revision=114000
* Kill debug printf that crept in my last commitWarner Losh2003-04-211-1/+0
| | | | Notes: svn path=/head/; revision=113805
* Implement a two new flags, and change the meaning of another one.Warner Losh2003-04-211-11/+38
| | | | | | | | | | | | | | | | | | 'd': now means don't do daemon(). 'D': Debug 'n': Don't wait to process all pending events before calling daemon. In the past, devd would call daemon immediately. However, this causes a race. If anything in the boot process depends on configuring the devices configured by devd, maybe they would be configured in time, maybe not. Now we don't call daemon until all pending events are processed, unless -n is specified. # -n is actually the default for a while due to the select(2) bug in devctl # that I just fixed to give people a chance to upgrade. Notes: svn path=/head/; revision=113790
* Put an anti-foot-shooting measure in place. Set hw.bus.devctl_disableWarner Losh2003-04-211-0/+19
| | | | | | | | | | | | to 0 when we startup. Print a warning in this case. This allows people that are playing with devd by hand to have something happen. Otherwise, it appears that devd isn't working because /dev/devctl is disabled and producing no events. Suggested by: peter on irc a long time ago. Notes: svn path=/head/; revision=113787
* o Skip white space between variables better. This makesWarner Losh2003-04-211-6/+17
| | | | | | | | | | | | | | 'a="b" c="d" at loc=1 on busN' properly set 'c' and process the rest of the stirng. Before it would ignore everything after variable 'a'. o Parse nomatch and other events differently. They are more different than the code allowed for, so we weren't properly parsing nomatch events. It appears this fixes some of the demand loading issues that I was having with devd. Noticed by: Gary Palmer Notes: svn path=/head/; revision=113785
* devd.conf already has the examples in the todo listWarner Losh2003-04-211-1/+0
| | | | Notes: svn path=/head/; revision=113782
* Terminate the usage message with \n.Warner Losh2003-01-061-1/+1
| | | | | | | Submitted by: joe Notes: svn path=/head/; revision=108799
* MFp4: make it workWarner Losh2003-01-061-41/+181
| | | | | | | | | | | | | | | | | o Expand variables correctly. o Set variables for each event. o rewrite event loop to execute the commands in the config file, rather than the hard wired generic command o better(?) debug when running -d o sort vectors of actions so that we just have to search for the first one to match rather than the best one that matches. o better attempts to clear all resources used on 'restart' o Remove now bogus comments MFC After: 1 centiyear Notes: svn path=/head/; revision=108783
* Latest snapshot of devd. This one adds re-matching and stringWarner Losh2002-12-181-16/+88
| | | | | | | expansion. Notes: svn path=/head/; revision=108014
* MFp4 (imp_freebsd branch): snapshot of devd work:Warner Losh2002-12-071-0/+591
o improve parsing and lexing o create data structures based on the parsed file now. o Still need to rewrite main loop and add regex (still uses hard coded devd-generic) o minor man page updates. # There should be one more commit before rc2 Approved by: re (blanket) Notes: svn path=/head/; revision=107665