aboutsummaryrefslogtreecommitdiff
path: root/share/examples
Commit message (Collapse)AuthorAgeFilesLines
* rc.sendmail: remove unused scriptBaptiste Daroussin2022-11-091-1/+0
| | | | | | | | 20 years ago the use of rc.sendmail script was dropped in favor of /etc/rc.d/sendmail, it is time to retire the script entirely now. MFC after: 1 week
* Put OPIE to rest.Dag-Erling Smørgrav2022-10-021-1/+0
| | | | Differential Revision: https://reviews.freebsd.org/D36592
* snd_uaudio(4): Add some examples accessing USB MIDI devices.Goran Mekic2022-09-273-0/+141
| | | | | | Differential Revision: https://reviews.freebsd.org/D36195 MFC after: 1 week Sponsored by: NVIDIA Networking
* ipf-howto: Remove a double wordGordon Bergling2022-09-101-1/+1
| | | | | | - s/to to/to/ MFC after: 3 days
* ipfilter: Grammar fix for the ipfilter howtoGordon Bergling2022-09-041-1/+1
| | | | | | - s/that that/that the/ MFC after: 3 days
* divert: declare PF_DIVERT domain and stop abusing PF_INETGleb Smirnoff2022-08-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The divert(4) is not a protocol of IPv4. It is a socket to intercept packets from ipfw(4) to userland and re-inject them back. It can divert and re-inject IPv4 and IPv6 packets today, but potentially it is not limited to these two protocols. The IPPROTO_DIVERT does not belong to known IP protocols, it doesn't even fit into u_char. I guess, the implementation of divert(4) was done the way it is done basically because it was easier to do it this way, back when protocols for sockets were intertwined with IP protocols and domains were statically compiled in. Moving divert(4) out of inetsw accomplished two important things: 1) IPDIVERT is getting much closer to be not dependent on INET. This will be finalized in following changes. 2) Now divert socket no longer aliases with raw IPv4 socket. Domain/proto selection code won't need a hack for SOCK_RAW and multiple entries in inetsw implementing different flavors of raw socket can merge into one without requirement of raw IPv4 being the last member of dom_protosw. Differential revision: https://reviews.freebsd.org/D36379
* make.conf: Fix a typo in the example fileGordon Bergling2022-06-041-1/+1
| | | | | | - s/architechture/architecture/ MFC after: 3 days
* update external URLWolfram Schneider2022-02-051-2/+2
|
* ipfilter: Adjust example returns to conform to style(9)Cy Schubert2022-01-043-21/+21
| | | | | | Adjust ipfilter's example return statements to conform to style(9). MFC after: 1 month
* ipflter: ANSIfy userland function declarationsCy Schubert2022-01-041-33/+27
| | | | | | | | | | | Convert ipfilter userland function declarations from K&R to ANSI. This syncs our function declarations with NetBSD hg commit 75edcd7552a0 (apply our changes). Though not copied from NetBSD, this change was partially inspired by NetBSD's work and inspired by style(9). Reviewed by: glebius (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33595
* ipfilter: Move userland bits to sbinCy Schubert2021-12-2042-3/+2438
| | | | | | | | | | | | | | | | Through fixes and improvements our ipfilter sources have diverged enough to warrant move from contrib into sbin/ipf. Now that I'm planning on implementing MSS clamping as in iptables it makes more sense to move ipfilter to sbin. This is the second of three commits of the ipfilter move. Suggested by glebius on two occaions. Suggested by and discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* jail(3lua): add a jail.list() methodKyle Evans2021-09-301-4/+51
| | | | | | | | | | | This is implemented as an iterator, reusing parts of the earlier logic to populate jailparams from a passed in table. The user may request any number of parameters to pull in while we're searching, but we'll force jid and name to appear at a minimum. Reviewed by: freqlabs Differential Revision: https://reviews.freebsd.org/D26756
* ses: Correct spelling of "Temperature Sensor"Alan Somers2021-09-021-1/+1
| | | | | | | According to SES 4 revision 2 table 71, it should be singular. MFC after: 2 weeks Sponsored by: Axcient
* sound: Add an example of basic sound applicationGoran Mekić2021-08-044-0/+434
| | | | | | | | | | This is an example demonstrating the usage of the OSS-compatible APIs provided by the sound(4) subsystem. It reads frames from a dsp node and writes them to the same dsp node. MFC after: 2 weeks Reviewed by: hselasky, bcr Differential revision: https://reviews.freebsd.org/D30149
* Catch up with Clang 12.Jung-uk Kim2021-06-141-9/+9
| | | | Add "znver3" for AMD and "alderlake" and "sapphirerapids" for Intel.
* make.conf: DOC_LANG and PRINTERDEVICE clarifications in man and exampleCeri Davies2021-06-141-4/+4
|
* Fix syscall kld exampleFernando Apesteguía2021-06-091-2/+2
| | | | | | | PR: 255936 Reported by: splitface@mailfence.com Approved by: gbe (mentor), imp@, jilles@ Differential Revision: https://reviews.freebsd.org/D30498
* Remove references to the now-removed bktr(4) driver.Mark Murray2021-03-071-1/+1
|
* libifconfig: Overhaul ifconfig_media_* interfacesRyan Moeller2021-03-051-9/+18
| | | | | | | | | | | | | | | | | | Define an ifmedia_t type to use for ifmedia words. Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. Get media options as an array of option names rather than formatting it as a comma-delimited list into a buffer. Sprinkle const on static the static description tables for peace of mind. Don't need to zero memory allocated by calloc. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29029
* Remove a space I missed in previous commitPoul-Henning Kamp2021-01-041-1/+1
|
* Remove -g option support which was removed from bhyve inPoul-Henning Kamp2021-01-041-7/+1
| | | | c4df8cbfde53c376d93f439eac3f45a7b4fc705e
* Remove misleading macros from -width argumentsMateusz Piotrowski2020-12-284-10/+2
| | | | | | Also, remove $FreeBSD$ tag from manual page examples. MFC after: 1 week
* Remove macros from the width arguments passed to Bl macrosMateusz Piotrowski2020-11-124-6/+6
| | | | | | | | | I've not removed the Er macro from one of the lists in example.9, however, because it seems to be doing some special kind of magic. Let's leave it there for now. Notes: svn path=/head/; revision=367621
* flua: Add a libjail moduleRyan Moeller2020-10-242-0/+64
| | | | | | | | | | | | | | | libjail is pretty small, so it makes for a good proof of concept demonstrating how a system library can be wrapped to create a loadable Lua module for flua. * Introduce 3lua section for man pages * Add libjail module Reviewed by: kevans, manpages Relnotes: yes Differential Revision: https://reviews.freebsd.org/D26080 Notes: svn path=/head/; revision=367013
* pkgbase: Remove the last users of the FreeBSD-example packageEmmanuel Vadot2020-08-043-3/+3
| | | | | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D24176 Notes: svn path=/head/; revision=363838
* Mirror recommendation from Handbook to avoid linking conflicts whenGregory Neil Shapiro2020-08-011-4/+2
| | | | | | | | | | | pulling in SASL libraries. PR: 247959 Reported by: Scott Allendorf MFC after: 3 days Notes: svn path=/head/; revision=363750
* -F is GNU diff specific, not implemented in BSD diff.Hiroki Sato2020-03-181-1/+1
| | | | | | | | Reported by: kouya@ryuhoku.jp MFC after: 3 days Notes: svn path=/head/; revision=359067
* Add "tigerlake" CPUTYPE for x86 to catch up with Clang 10.0.Jung-uk Kim2020-03-101-7/+8
| | | | Notes: svn path=/head/; revision=358862
* - Remove CPUTYPE examples for sparc64. It is not supported since r358345.Jung-uk Kim2020-03-101-16/+8
| | | | | | | - Clean up CPUTYPE examples for x86. GCC 4.2.1 was removed by r358454. Notes: svn path=/head/; revision=358861
* Catch up with Clang 9.0.Jung-uk Kim2020-01-091-5/+7
| | | | Notes: svn path=/head/; revision=356567
* add ability to set watchdog timeout for a shutdownAndriy Gapon2019-10-033-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to specify a watchdog(9) timeout for a system shutdown. The timeout is activated when the watchdogd daemon is stopped. The idea is to a prevent any indefinite hang during late stages of the shutdown. The feature is implemented in rc.d/watchdogd, it builds upon watchdogd -x option. Note that the shutdown timeout is not actiavted when the watchdogd service is individually stopped by an operator. It is also not activated for the 'shutdown' to the single-user mode. In those cases it is assumed that the operator knows what they are doing and they have means to recover the system should it hang. Significant subchanges and implementation details: - the argument to rc.shutdown, completely unused before, is assigned to rc_shutdown variable that can be inspected by rc scripts - init(8) passes "single" or "reboot" as the argument, this is not changed - the argument is not mandatory and if it is not set then rc_shutdown is set to "unspecified" - however, the default jail management scripts and jail configuration examples have been updated to pass "jail" to rc.shutdown, just in case - the new timeout can be set via watchdogd_shutdown_timeout rc option - for consistency, the regular timeout can now be set via watchdogd_timeout rc option - watchdogd_shutdown_timeout and watchdogd_timeout override timeout specifications in watchdogd_flags - existing configurations, where the new rc options are not set, should keep working as before I am not particularly wed to any of the implementation specifics. I am open to changing or removing any of them as long as the provided functionality is the same (or very close) to the proposed one. For example, I think it can be implemented without using watchdogd -x, by means of watchdog(1) alone. In that case there would be a small window between stopping watchdogd and running watchdog, but I think that that is acceptable. Reviewed by: bcr (man page changes) MFC after: 5 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21221 Notes: svn path=/head/; revision=353039
* Add list of valid CPUTYPE flags for arm/arm64 to make.conf exampleWarner Losh2019-06-221-0/+6
| | | | | | | | | | | | | Summary: Adds a list of valid CPUTYPE flags for arm and arm64 architectures List taken from share/mk/bsd.cpu.mk Submitted by: Daniel Engberg Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D20315 Notes: svn path=/head/; revision=349291
* vmrun: Add a missing close-paren to the usage message.Mark Johnston2019-06-071-1/+1
| | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=348782
* pkgbase: Move login.access to usb.bin/loginEmmanuel Vadot2019-05-221-5/+1
| | | | | | | | | | Also remove the etc-examples target as we don't have any files to handle here. Reviewed by: bapt Notes: svn path=/head/; revision=348102
* Update the spelling of my nameEnji Cooper2019-04-221-2/+1
| | | | | | | | | | | | Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji instead for clarity. While here, remove "All Rights Reserved" from copyrights I "own". MFC after: 1 week Notes: svn path=/head/; revision=346571
* Catch up with Clang 8.0.Jung-uk Kim2019-03-211-3/+3
| | | | Notes: svn path=/head/; revision=345388
* Catch up with Clang 7.0.Jung-uk Kim2019-03-211-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=345387
* Fix build for KLD dyn_sysctl exampleOleksandr Tymoshenko2019-03-161-4/+2
| | | | | | | | | | | | Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE PR: 236139 Submitted by: Andrew Reiter <arr@watson.org> MFC after: 1 week Notes: svn path=/head/; revision=345220
* Initial googlemock/googletest integration into the build/FreeBSD test suiteEnji Cooper2019-03-152-0/+65
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This initial integration takes googlemock/googletest release 1.8.1, integrates the library, tests, and sample unit tests into the build. googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`. `MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when built with a C++11 capable toolchain. Google tests can be specified via the `GTESTS` variable, which, in comparison with the other test drivers, is more simplified/streamlined, as Googletest only supports C++ tests; not raw C or shell tests (C tests can be written in C++ using the standard embedding methods). No dependent libraries are assumed for the tests. One must specify `gmock`, `gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program. More information about googlemock and googletest can be found on the Googletest [project page](https://github.com/google/googletest), and the [GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md) and [GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs) docs. These tests are originally integrated into the build as plain driver tests, but will be natively integrated into Kyua in a later version. Known issues/Errata: * [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172) Reviewed by: asomers Approved by: emaste (mentor) MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D19551 Notes: svn path=/head/; revision=345203
| * Compile and install most of the googletest examplesEnji Cooper2019-03-112-0/+42
|/ | | | | | | | sample9_unittest is not compiled/installed, because it intentionally fails and would result in red test runs until broken to always pass. Notes: svn path=/projects/import-googletest-1.8.1/; revision=345023
* Remove iBCS2, part1: userspaceMateusz Guzik2018-12-193-686/+0
| | | | | | | | | | | | iBCS2 was disconnected from the build in 2015 (see r291419) bsdconfig parts submitted by dteske. Reviewed by: kib (previous version) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=342242
* Fix jail examples in jib, jng, READMEDevin Teske2018-10-283-2/+12
| | | | | | | | | | | | | | | | | | | | | The provided example jail configs do not work for multiple interfaces. Multiple interfaces need to be specified as a comma separated list or using multiple += lines in jail.conf. In the given example, a space- separated string is used, which doesn't work with multiple interfaces. Also added a note to the README about VIMAGE being built-in by default on amd64 in FreeBSD 12, with appropriate instructions for loading the necessary netgraph ether module (ng_ether) since it is neither built- in nor autoloads. Submitted by: Ryan Moeller <ryan@freqlabs.com> Reported by: Ryan Moeller <ryan@freqlabs.com> MFC after: 3 days Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/D17697 Notes: svn path=/head/; revision=339843
* Add SPDX tags to example manual pages and POSIX copyright.Mateusz Piotrowski2018-07-205-0/+15
| | | | | | | | | Reviewed by: eadler Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D14958 Notes: svn path=/head/; revision=336546
* bhyve/vmrun.sh: make -L functional.Konstantin Belousov2018-06-241-1/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=335604
* MK_EFI - Add uefisign and friends to this knob and ensure that we don'tSean Bruno2018-06-191-1/+3
| | | | | | | | | | | try to build them if MK_OPENSSL is unset. Reviewed by: emaste imp kevans Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15211 Notes: svn path=/head/; revision=335386
* hwpmc: add summary command and further metadata extensionsMatt Macy2018-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | metadata changes: - log pmc sample rate with pmcallocate - log proc flags with thread / process logging to identify user vs kernel threads fixes: - use log cpuid to translate event id to event name Implement rudimentary summary command to track sample counts by thread and process name within a pmc log. % make -j4 buildkernel >& /dev/null & % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 % pmc summary foo cpu_clk_unhalted.thread_p_any: idle: 138108207162 clang-6.0: 105336158004 sh: 72340108510 make: 8642012963 kernel: 7754011631 longest_lat_cache.miss: clang-6.0: 87502625 sh: 40901227 make: 5500165 kernel: 3300099 awk: 2000060 % pmc summary -f ~/foo idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 2000003 idle: 69054 clang-6.0: 52668 sh: 36170 make: 4321 kernel: 3877 hwpmc: proc(7445): 3319 awk: 1289 xargs: 357 rand_harvestq: 181 mtree: 102 intr: 53 zfskern: 31 usb: 7 pagedaemon: 4 ntpd: 3 syslogd: 1 acpi_thermal: 1 logger: 1 syncer: 1 snmptrapd: 1 sleep: 1 idx: 17 name: longest_lat_cache.miss rate: 100003 clang-6.0: 875 sh: 409 make: 55 kernel: 33 awk: 20 hwpmc: proc(7445): 14 xargs: 9 idle: 8 intr: 3 zfskern: 2 Notes: svn path=/head/; revision=334701
* Convert share/examples/Makefile over to using FILES and FILESDIR.Brad Davis2018-05-091-213/+343
| | | | | | | | | | | | | | The goal is to avoid using install directly so we can make changes the affect how the entire system is installed, without having to touch many places. This is part of the packaging base work. Reviewed by: will Approved by: bapt (mentor), allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D1513 Notes: svn path=/head/; revision=333408
* Remove 'All Rights Reserved' from the collection copyright and templates.Warner Losh2018-05-098-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original Berkeley Software Distributions were made in the 1980's and 1990's. At that time, the Buenos Ares Convention of 1910 was in force in most of the countries in the Americas. It required an affirmative statement of rights reservation, typically using 'All Rights Reserved.' The Regents included this phrase in their copyright notices to invoke this treaty to ensure maximal copyright protection. In the 1990's, Latin America coutries ratifeid the Berne Convention on copyrights which prohibited them from requiring an affirmative statement to reserve the rights. When Nicaragua ratified in 2000, the Buenos Ares Convention of 1910 was effectively repealed. This made all the 'All Rights Reserved' phrases obsolete and legal deadweight most of the time, and certainly in the cases removed here. Since it's no longer required, and is in fact meaningless, core has decided to dropped it from the project's collection copyright and sample templates. It encourages other rights holders to do the same after consultation with their legal department. More see https://en.wikipedia.org/wiki/Buenos_Aires_Convention for more information. Approved by: core@ (emaste@, jhb@) Differential Review: https://reviews.freebsd.org/D15264 Notes: svn path=/head/; revision=333391
* Catch up with Clang 6.0.Jung-uk Kim2018-04-031-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=331963
* Install files added in SVN's r295373, r295457, r295542Devin Teske2018-03-131-0/+6
| | | | | | | | | Reported by: woodsb02 MFC after: 3 days X-MFC to: stable/11 Notes: svn path=/head/; revision=330886