aboutsummaryrefslogtreecommitdiff
path: root/sbin/devd/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* rc+devd: Add growfs_postbootColin Percival2026-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | In VM and cloud environments it is often possible to enlarge virtual disks; this can be useful, for example, if a system is launched with a small root disk and it later becomes clear that more space is needed. On kernels which support run-time resizing of disks (for NVMe, this was added in November 2025; some other disk types have supported this for longer) a SIZECHANGE notification is sent to userland via devd. Add a "nostart" rc.d script (runnable manually but not automatically at boot time) and a devd script which invokes it when a notification arrives. The rc.d script enlarges the "final partition" on partitioned geoms, or the UFS filesystem or zpool device when triggered on a disk containing either of those. Reviewed by: imp, ziaee MFC after: 2 weeks Relnotes: Disk partitions and filesystems can be enlarged automatically when disks grow by setting growfs_postboot_enable=YES in /etc/rc.conf. Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D58582
* acpi: Remove userland bits on non-ACPI platformsLexi Winter2026-04-281-0/+3
| | | | | | | | | | | | ACPI is only supported on amd64, arm64 and i386. Don't install the power_profile rc script or devd configuration on other platforms. This avoids creating a useless FreeBSD-acpi package on those platforms. MFC after: 2 weeks Reviewed by: imp Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56650
* src.opts: Introduce MK_SOUNDChristos Margiolis2026-01-121-5/+7
| | | | | | | | PR: 291853 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: zarychtam_plan-b.pwste.edu.pl, markj Differential Revision: https://reviews.freebsd.org/D54456
* packages: Add a sound packageLexi Winter2025-10-021-1/+6
| | | | | | | | | | | | | | | Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools into a new "sound" package. Don't create a separate -lib package, since it's unlikely someone will want mixer(3) without mixer(8). Put the sound package in the optional set rather than minimal, since it's not actually required for audio hardware support, and many systems (including nearly all servers) won't want it installed. MFC after: 3 seconds Reviewed by: christos Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52823
* devd: Remove SND packageChristos Margiolis2025-10-011-6/+1
| | | | | | | | | This was done by accident, build snd.conf always. Reported by: ivy Fixes: 2ffaca551eaf ("snd_hda: Implement automatic redirection between associations") Sponsored by: The FreeBSD Foundation MFC after: 1 day
* snd_hda: Implement automatic redirection between associationsChristos Margiolis2025-09-301-0/+5
| | | | | | | | | | | | | | | | | | | | For audio to be redirected to the headphones/headset after plugging the jack, or back to the speaker/internal mic when unplugging it, the speaker and headphone pins need to be part of the same association (i.e., the same PCM device). This patch makes it possible to redirect audio even between different associations, which can reduce the need for manual pin patching. The idea is that we issue a devctl_notify() from within the jack detection callback whenever a jack is (un-)plugged to redirect audio to the appropriate device. Then the snd.conf devd script is responsible for using virtual_oss to change the playback/recording device to whatever snd_hda(4) selected. The reason for requiring virtual_oss is that it has hot-swapping support, which is necessary for jack redirection. Sponsored by: The FreeBSD Foundation MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D50070
* nvmf: Auto-reconnect periodically after a disconnectJohn Baldwin2025-07-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a timer in the nvmf(4) driver to periodically trigger a devctl "RECONNECT" notification. A trigger in the /etc/devd/nvmf.conf file invokes "nvmecontrol reconnect nvmeX" upon each notification. This differs from iSCSI which uses a dedicated daemon (iscsid(8)) to wait inside a custom ioctl for an iSCSI initiator event to occur, but I think this design might be simpler. Similar to nvme-cli, the interval between reconnection attempts is specified in seconds by the --reconnect-delay argument to the connect and reconnect commands. Note that nvme-cli uses -c for short letter of this command, but that was already taken so nvmecontrol uses -r. The default is 10 seconds to match Linux. In addition, a second timeout can be used to force a full detach of a disconnected the nvmeX device after the controller loss timeout expires. The timeout for this is specified in seconds by the --ctrl-loss-tmo/-l options (identical to nvme-cli). The default is 600 seconds. Either of these timers can be disabled by setting the timer to 0. In that case, the associated action (devctl notifications or full detach) will not occur after a disconnect. Note that this adds a dedicated taskqueue for nvmf tasks instead of using taskqueue_thread as the controller loss task could deadlock waiting for the completion of other tasks queued to taskqueue_thread. (Specifically, tearing down the CAM SIM can trigger destroy_dev_sched_cb() and waits for the callback to run, but the callback is scheduled to run in a task on taskqueue_thread. Possibly, destroy_dev_sched should be using a dedicated taskqueue.) Reviewed by: imp (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D50222
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* devd: Don't install autofs.conf with WITHOUT_AUTOFSTijl Coosemans2023-12-221-0/+2
|
* devd: autofs: Move autofs related events to a separate fileEmmanuel Vadot2023-11-241-0/+5
| | | | | | | | | | If a user don't have FreeBSD-autofs installed there is no need to try calling automount on every GEOM event. It's also easier to add/delete autofs related event in a separate file. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D42495 Reviewed by: imp
* devd: Restore WARNS=6Warner Losh2023-10-261-1/+1
| | | | | | | | We compile correctly on all platforms with clang and WARNS=6. We build on amd64 with gcc12 and WARNS.6. Restore WARNS=6. This reverts 3741a56c310d, since that's no longer relevant. Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* pkgbase: Create a FreeBSD-console-tools packageEmmanuel Vadot2023-02-081-0/+5
| | | | | | | | | | | | | | | And put in it: - kbdcontrol - vidcontrol - moused - kbdmap Those aren't useful in a jail or for a modern desktop. While here, split the devd.conf part into some new files. Reviewed by: bapt Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38321
* devd: Move power_profile part in devd/power_profile.confEmmanuel Vadot2023-02-081-0/+5
| | | | | | | | | And make it part of the FreeBSD-acpi package. This avoid calling service power_profile on an installation without it installed. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38324
* devd: Move bluetooth part in devd/bluetooth.confEmmanuel Vadot2023-02-081-0/+7
| | | | | | | | | And make it part of the FreeBSD-bluetooth package. This avoid calling service bluetooth on an installation without it installed. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38323
* devd: Move dhclient part in devd/dhclient.confEmmanuel Vadot2023-02-081-0/+5
| | | | | | | | | And make it part of the FreeBSD-dhclient package. This avoid calling dhclient on an installation without dhclient installed. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38322
* Make devd shared now that libc++ is in /libEd Maste2022-11-201-2/+0
| | | | | | | | | | Commit 5e6a2d6eb220 moved libc++ from /usr/lib to /lib, so we no longer have an interval during boot when it is not available (before /usr is mounted). We no longer need to force devd to be statically linked. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37409
* pkgbase: Put devd in its own packageEmmanuel Vadot2022-10-261-1/+1
| | | | | | It's not that useful in a jail or in a mdroot. Differential Revision: https://reviews.freebsd.org/D36228
* pkgbase: move devd's hyperv.conf to hyperv-tools packageMina Galić2022-05-031-1/+4
| | | | | | | | This devd config file is useless without hyperv-tools, so we're moving it into the hyperv-tools package. pr#263691 PR: 263691 MFC after: 3 days
* pkgbase: Put more binaries/lib in runtimeEmmanuel Vadot2021-12-211-1/+1
| | | | | | | | | Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime. This is everything needed to boot to multiuser with FreeBSD-rc installed. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33435
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-101-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352130
* pkgbase: Create a FreeBSD-utilities package and make it the default oneEmmanuel Vadot2019-09-051-1/+1
| | | | | | | | | | | | | The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21506 Notes: svn path=/head/; revision=351858
* Move all devd related configs to sbin/devd/Brad Davis2018-08-211-0/+24
| | | | | | | | | | | This helps with pkgbase as it switches these to using CONFS so they are properly tagged as config files. Approved by: will (mentor), imp Differential Revision: https://reviews.freebsd.org/D16781 Notes: svn path=/head/; revision=338144
* devd: drop WARNS back down to 3 until 6 actually works with GCCMatt Macy2018-05-241-0/+1
| | | | Notes: svn path=/head/; revision=334126
* devd: Unbreak buildEitan Adler2018-05-231-2/+1
| | | | | | | | | | | | I'm not quite sure why this wasn't caught before. Most likely due to some generated file not being properly cleaned. Fix build by just hiding the warnings that `-i` was supposed to fix. Tested with clang, gcc9, gcc7 Notes: svn path=/head/; revision=334086
* devd: allow build to complete using g++Eitan Adler2018-05-231-0/+2
| | | | Notes: svn path=/head/; revision=334079
* devd: compile at WARNS=6Eitan Adler2018-05-231-2/+2
| | | | | | | Verified with "make universe TARGETS='amd64 arm arm64 i386 sparc64'" Notes: svn path=/head/; revision=334078
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* Add devd and routed back to the runtime package insteadGlen Barber2016-02-101-1/+1
| | | | | | | | | | | | | | of their individual packages based on MK_foo evaluation. There is no intent to split inet/inet6 or other similar combinations for package creation, since they are created during build time. Noticed/prodded by: lidl Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295456
* Create packages for atm, ccdconfig, devd, ipf, ipfw,Glen Barber2016-02-091-0/+1
| | | | | | | | | | | iscsi, natd, nandfs, pf, quotacheck, and routed. Add ping6 and rtsol to the runtime package. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295448
* Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* Convert devd's client socket to type SOCK_SEQPACKET.Alan Somers2014-08-141-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality. sbin/devd/tests/Makefile sbin/devd/tests/client_test.c Add ATF test cases for reading events from both devd socket types. r266519: sbin/devd/devd.8 sbin/devd/devd.cc Create a new socket, of type SOCK_SEQPACKET, for communicating with clients. SOCK_SEQPACKET sockets preserve record boundaries, simplying code in the client. The old SOCK_STREAM socket is retained for backwards-compatibility with existing clients. r269993: sbin/devd/devd.8 Fix grammar bug. CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic Notes: svn path=/head/; revision=270004
* | Revert r263694, and apply a better fix to squelch unnecessary warningsDimitry Andric2014-03-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | from clang about possible keywords being treated as identifiers for the remainder of the translation unit (a.k.a. -Wkeyword-compat), when using libstdc++ in combination with -Wsystem-headers. This will not only fix devd, but any C++ program using libstdc++. MFC after: 3 days X-MFC-With: r263694 Notes: svn path=/head/; revision=263774
* | Apply a temporary band-aid for building devd with clang 3.4, libstdc++Dimitry Andric2014-03-241-0/+1
|/ | | | | | | | | | | and -Wsystem-headers enabled (which is the default for any non-zero WARNS level, crazily enough!). This is primarily meant to be MFC'd as soon as possible. MFC after: 3 days Notes: svn path=/head/; revision=263694
* Bump WARNS where possible.Ulrich Spörlein2010-02-151-2/+1
| | | | | | | | Checked by: make universe Approved by: ed (co-mentor) Notes: svn path=/head/; revision=203916
* Reduce the WARNS level across the board due to a warning that occursJohn Birrell2007-11-191-1/+3
| | | | | | | on at least arm and sparc64. i386/pc98, ia64 and amd64 are all OK. Notes: svn path=/head/; revision=173739
* Use pidfile(3).Pawel Jakub Dawidek2006-01-301-2/+2
| | | | | | | OK'ed by: imp Notes: svn path=/head/; revision=155073
* Make devd WARNS=4 clean and bump WARNS accordingly. This will insureBrooks Davis2005-10-191-1/+1
| | | | | | | | | | that future variable shadowing bugs don't compile. Reviewed by: imp Compiled on: alpha i386 sparc64 Notes: svn path=/head/; revision=151486
* NOSHARED -> NO_SHAREDRuslan Ermilov2004-12-211-1/+1
| | | | Notes: svn path=/head/; revision=139112
* At imp's request, force devd to be statically compiled. This avoids theGordon Tetlow2003-08-171-0/+2
| | | | | | | | | | 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. Notes: svn path=/head/; revision=119019
* This can't obviously be cleaner than system headers.Ruslan Ermilov2003-04-011-1/+1
| | | | Notes: svn path=/head/; revision=112935
* MFp4 (imp_freebsd branch): snapshot of devd work:Warner Losh2002-12-071-3/+3
| | | | | | | | | | | | | | | 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
* Install devd.conf(5).Tim J. Robbins2002-11-141-1/+1
| | | | Notes: svn path=/head/; revision=106906
* devd. A daemon that hooks into the kernel's /dev/devctl to produceWarner Losh2002-10-201-0/+16
arbitrary commands when devices come and go in the device tree (which is different than the /dev directory). This is an initial version. Much of the planned power isn't here. Instead of doing the full matching, we always run /etc/devd-generic. /etc/devd.generic will go away at some point, I think. I'm committing it in this early state so I can start getting feedback from early adapters. Approved by: re Notes: svn path=/head/; revision=105573