1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
Commit Graph

1244 Commits

Author SHA1 Message Date
Ed Maste
6b9c7f29b0 Remove "All Rights Reserved" from FreeBSD Foundation copyrights
These ones were unambiguous cases where the Foundation was the only
listed copyright holder.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 5c2bc3db20)
(cherry picked from commit f06d322e9d)
2024-09-07 12:30:19 -04:00
Alan Somers
c1a5da044c targ: fix compiling the example
The targ example program doesn't compile with current clang, and
probably hasn't for multiple releases.  Fix the build.  I don't have the
right hardware to test it, though.

Sponsored by:	Axcient

(cherry picked from commit 873881b7db)
2024-07-08 14:26:04 -06:00
Jung-uk Kim
562855795e Catch up with Clang 12.
Add "znver3" for AMD and "alderlake" and "sapphirerapids" for Intel.

(cherry picked from commit 09e7341c5e)
2024-04-21 21:02:07 +02:00
Christos Margiolis
a00a507e2d vmrun.sh: allow device name arguments in pci-passthru option
This is more intuitive than having to run `pciconf -l` and figure out
the bus/slot/func entry manually.

Reviewed by:	markj
Sponsored by;	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43270

(cherry picked from commit 2ee77056d2)
2024-01-09 18:47:36 +02:00
Christos Margiolis
4566bff5c9 vmrun.sh: add missing options in usage message
Reviewed by:	markj
Sponsored by;	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43269

(cherry picked from commit 029b10b16a)
2024-01-09 18:47:28 +02:00
Dimitry Andric
0907c0ddba Silence snprintf truncation warnings in printf_test examples
Building share/examples/tests with clang 18 results in a few warnings
like:

  share/examples/tests/tests/plain/printf_test.c:67:6: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 17 [-Werror,-Wformat-truncation]
     67 |         if (snprintf(buffer, sizeof(buffer), "0123456789abcdef") != 16)
        |             ^

Since these tests are meant as an example of testing snprintf overflow,
suppress the warnings.

MFC after:	3 days

(cherry picked from commit 69c8025a49)
2023-12-24 15:01:19 +01:00
John Baldwin
70b875694e make_*_driver.sh: Don't include $FreeBSD$ in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41950

(cherry picked from commit 97232e04ca)
2023-10-24 11:13:18 -07:00
Ed Maste
50510a7a63 share/examples/tests: fix comments after $FreeBSD$ removal
Fixes: 2a63c3be15 ("Remove $FreeBSD$: one-line .c comment pattern")
(cherry picked from commit d1d7a27370)
2023-08-23 11:43:35 -06:00
Warner Losh
0f015abc46 Remove $FreeBSD$: one-line forth tag
Remove /^\\[\s*]*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 26a58599a0)
2023-08-23 11:43:34 -06:00
Warner Losh
238e32b606 Remove $FreeBSD$: one-line lua tag
Remove /^--\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 6ef644f588)
2023-08-23 11:43:34 -06:00
Warner Losh
350f9ac5b3 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit 05248206f7)
2023-08-23 11:43:33 -06:00
Warner Losh
24115b70d6 Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b2c76c41be)
2023-08-23 11:43:32 -06:00
Warner Losh
b144e70a33 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit fa9896e082)
2023-08-23 11:43:31 -06:00
Warner Losh
023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Warner Losh
3d497e17eb Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a5)
2023-08-23 11:43:26 -06:00
Warner Losh
8ad303d68c Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in main:
(cherry picked from commit 2a63c3be15)
2023-08-23 11:43:23 -06:00
Warner Losh
17da660ad5 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832)
2023-08-23 11:43:21 -06:00
Warner Losh
f73b4bf27c spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit b61a573019)
2023-07-25 09:15:32 -06:00
Warner Losh
caa41f6417 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e)
2023-07-25 09:13:49 -06:00
Christos Margiolis
352a06f049 vmrun.sh: mention new edk2 package
uefi-edk2-bhyve no longer exists.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39937

(cherry picked from commit 0ebc92bf3d)
2023-05-09 10:01:23 -04:00
Mateusz Piotrowski
eb2e52fb20 vmrun.sh: Fix a typo in usage()
MFC after:	3 days
Sponsored by:	Klara Inc.

(cherry picked from commit 607bc91d90)
2023-04-24 11:59:58 +02:00
Mark Johnston
743f4ba7e3 vmrun: Expose bhyve's -G option
MFC after:	1 week

(cherry picked from commit b59f9d03cd)
2023-03-27 08:49:39 -04:00
Goran Mekic
15ae481e05 snd_uaudio(4): Add some examples accessing USB MIDI devices.
Differential Revision:	https://reviews.freebsd.org/D36195
Sponsored by:	NVIDIA Networking

(cherry picked from commit f092c21bf6)
2022-10-04 16:40:50 +02:00
Gordon Bergling
c75a013795 ipf-howto: Remove a double word
- s/to to/to/

(cherry picked from commit 11bc6be152)
2022-09-13 07:22:44 +02:00
Gordon Bergling
a929f7319b ipfilter: Grammar fix for the ipfilter howto
- s/that that/that the/

(cherry picked from commit 1e289a1255)
2022-09-07 09:29:20 +02:00
Gordon Bergling
5c2b244c40 make.conf: Fix a typo in the example file
- s/architechture/architecture/

(cherry picked from commit 6300e58ab2)
2022-06-10 14:30:44 +02:00
Cy Schubert
9ff592d868 ipflter: ANSIfy userland function declarations
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)
Differential Revision:	https://reviews.freebsd.org/D33595

(cherry picked from commit efeb8bffe3)
2022-02-07 05:51:15 -08:00
Cy Schubert
95daf09d07 ipfilter: Move userland bits to sbin
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)
Differential Revision:		https://reviews.freebsd.org/D33510

(cherry picked from commit 41edb306f0)
2022-02-07 05:51:14 -08:00
Alan Somers
617c72adf8 ses: Correct spelling of "Temperature Sensor"
According to SES 4 revision 2 table 71, it should be singular.

Sponsored by:	Axcient

(cherry picked from commit 1fb52e4373)
2021-10-07 15:40:56 -06:00
Kyle Evans
44175ec8ce jail(3lua): add a jail.list() method
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.

(cherry picked from commit 6a7647eccd)
2021-10-06 02:13:23 -05:00
Goran Mekić
e899971b81 sound: Add an example of basic sound application
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.

Reviewed by:	hselasky, bcr
Differential revision:	https://reviews.freebsd.org/D30149

(cherry picked from commit 21d8546588)
2021-08-27 16:50:44 +08:00
Ryan Moeller
534e161747 libifconfig: Overhaul ifconfig_media_* interfaces
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
Differential Revision:	https://reviews.freebsd.org/D29029

(cherry picked from commit c4ba4aa547)
2021-03-19 09:00:19 -04:00
Poul-Henning Kamp
9cfd8046a4 Remove a space I missed in previous commit 2021-01-04 14:53:57 +00:00
Poul-Henning Kamp
3d4ce4edd8 Remove -g option support which was removed from bhyve in
c4df8cbfde
2021-01-04 13:15:50 +00:00
Mateusz Piotrowski
63fb0d3bc3 Remove misleading macros from -width arguments
Also, remove $FreeBSD$ tag from manual page examples.

MFC after:	1 week
2020-12-28 16:30:55 +01:00
Mateusz Piotrowski
1fb04df956 Remove macros from the width arguments passed to Bl macros
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.
2020-11-12 17:28:29 +00:00
Ryan Moeller
73577bf01d flua: Add a libjail module
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
2020-10-24 17:08:59 +00:00
Emmanuel Vadot
dd8c2fa31b pkgbase: Remove the last users of the FreeBSD-example package
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D24176
2020-08-04 14:48:45 +00:00
Gregory Neil Shapiro
c5112a4e2d Mirror recommendation from Handbook to avoid linking conflicts when
pulling in SASL libraries.

PR:		247959
Reported by:	Scott Allendorf
MFC after:	3 days
2020-08-01 04:57:30 +00:00
Hiroki Sato
c165f4ab69 -F is GNU diff specific, not implemented in BSD diff.
Reported by:	kouya@ryuhoku.jp
MFC after:	3 days
2020-03-18 08:00:46 +00:00
Jung-uk Kim
e754c10d23 Add "tigerlake" CPUTYPE for x86 to catch up with Clang 10.0. 2020-03-10 23:12:55 +00:00
Jung-uk Kim
c5672d151d - Remove CPUTYPE examples for sparc64. It is not supported since r358345.
- Clean up CPUTYPE examples for x86.  GCC 4.2.1 was removed by r358454.
2020-03-10 22:59:01 +00:00
Jung-uk Kim
4c8095b1d5 Catch up with Clang 9.0. 2020-01-09 20:07:38 +00:00
Andriy Gapon
5fda0d60c1 add ability to set watchdog timeout for a shutdown
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
2019-10-03 11:23:10 +00:00
Warner Losh
05b626019a Add list of valid CPUTYPE flags for arm/arm64 to make.conf example
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
2019-06-22 16:54:23 +00:00
Mark Johnston
007d50155f vmrun: Add a missing close-paren to the usage message.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2019-06-07 17:54:26 +00:00
Emmanuel Vadot
a8b94f3d79 pkgbase: Move login.access to usb.bin/login
Also remove the etc-examples target as we don't have any files
to handle here.

Reviewed by:	bapt
2019-05-22 07:23:03 +00:00
Enji Cooper
da5069e1f7 Update the spelling of my name
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
2019-04-22 17:52:46 +00:00
Jung-uk Kim
0fa5ee1f53 Catch up with Clang 8.0. 2019-03-21 21:45:02 +00:00
Jung-uk Kim
f4590b8c3a Catch up with Clang 7.0.
MFC after:	3 days
2019-03-21 21:43:23 +00:00