ng_iface(4): Remove a redundant assignment of if_type
That is unnecessary since change [1], as if_alloc(IFT_PROPVIRTUAL) has
set if_type already.
[1] fc74a9f93a5f Stop embedding struct ifnet at the top of driver softcs
No functional change intended.
MFC after: 1 week
committers-src: add myself
Add myself (vexeduxr@) as a new src committer with imp@ as my mentor.
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D50824
stand: lua: add a more productive comment
The global `shift` is a special little hack for shifting everything when
the logo is gone, and we should explain that.
Fixes: 33d3373faf30d ("stand: lua: convert orb to a new format [...]")
stand: lua: convert orb to a new format that allows per-graphic shift
Previously, we had one shift that had to work for both the ASCII version
and the image that we may draw if we have a framebuffer to play with.
That makes it more difficult to get the positioning just right, so split
them out into their own tables for convenience.
While we're here, stop clipping off the bottom of the orb when the
autoboot sequence is interrupted. There's plenty of space for it to
move up a hair, so let's do that..
Reviewed by: imp, tsoome
Differential Revision: https://reviews.freebsd.org/D50801
bsdinstall: fix ps3 regression
b6644f5 introduces FREEBSD_BOOTLABEL="FreeBSD" as default value
but cc42ef5 removed this line, expecting it to be set by update_uefi_bootentry()
But ps3 don't use this function so its broken completely.
So we add this line back.
Signed-off-by: Chattrapat Sangmanee <aomsin27 at hotmail.co.th>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1594
pf.conf.5: additional quoting for ranges in lists
When defining network address ranges in macros that will later be used
as items in list macro, these ranges must be quoted with additiona
simple quotes.
For instance, the following does not work and is rejected as a syntax
error:
usr = "192.168.1.0/24"
srv = "192.168.2.10 - 192.168.29"
nat_ranges = "{" $usr $srv "}"
Defining ranges as the following instead will work:
usr = "'192.168.1.0/24'"
srv = "'192.168.2.10 - 192.168.29'"
MFC after: 3 days
Reviewed by: imp, ziaee
Pull Request: https://github.com/freebsd/freebsd-src/pull/1516
pf.conf.5: use subsections and reword titles
The current manpage has two PARAMETERS top-level sections, which can be
confusing when searching or browsing documentation quickly.
Since the parameters described in these two sections are actually
applicable within the scope of the sections they follow (ETHERNET
FILTERING and PACKET FILTERING respectively), I propose we move them to
subsections.
I also propose we reword the title of one of those subsections to
facilitate quick searching or browsing.
MFC after: 3 days
Reviewed by: imp, ziaee
Pull Request: https://github.com/freebsd/freebsd-src/pull/1516
Closes: https://github.com/freebsd/freebsd-src/pull/1516
jail: add JID, JNAME and JPATH to environment for exec.* commands
Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.
In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.
These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1609
Closes: https://github.com/freebsd/freebsd-src/pull/1609
Makefile.inc1: allow real-update-packages to be called independently
To perform an incremental update of a pkgbase repo, you would
call 'make update-packages', which will stage, create, and
incrementally choose newer package versions to sign as part
of a pkg repo. However, this forces you to stage the kernel
and source packages along with the world packages. For a
jail-only installation of FreeBSD, these packages are generally
not required.
This patch separates the 'update-packages' target from the
'real-update-packages' target to allow choosing world, kernel,
and/or source individually at the command line like so:
Jail-only installation:
1. make -j`nproc` buildworld
2. make PKG_VERSION='15.snap<date>' \
stage-packages-world create-packages-world \
real-update-packages
[4 lines not shown]
acpi_wmi.4: fall cleaning
+ add descriptions to existing examples
+ github repo url in sysctls => port named in example using it
+ reword MOF description for consistency with external docs
+ restore standard link, move to STANDARDS
+ grammar and markup nits + tag SPDX
MFC after: 3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1477
Closes: https://github.com/freebsd/freebsd-src/pull/1477
atf-c(3): fill in prototypes for functions
This change fills in prototypes for functions exposed by atf-c(3) to aid
the programmer with using the APIs with the library.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D50734
fusefs: Fix a panic when unmounting before init
fusefs would page fault due to the following sequence of events:
* The server did not respond to FUSE_INIT in timely fashion.
* Some other process tried to do unmount.
* That other process got killed by a signal.
* The server finally responded to FUSE_INIT.
PR: 287438
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: arrowd
Differential Revision: https://reviews.freebsd.org/D50799
mandoc: Vendor import of upstream at 2025-04-08
Interesting changes:
+ correct legacy mandoc date typo, reported on our very own bugzilla
+ improve libmandoc manual
+ strengthen recommendations to omit macros from title lines in mdoc(7)
+ improve html5 compliance in html output
+ improve RFC linking in markdown output
+ libmandoc and mdoc manuals have been improved
+ support arithmetic operations in tbl(7) column widths for DocBook
+ define the St -isoC-2023 macro for referencing the C23 spec
Approved by: mhorne (mentor, implicit)
Reviewed by: imp
Discussed with: adrian, bapt, brooks
Closes: https://github.com/freebsd/freebsd-src/pull/1689
manuals: Align our tree with upstream C23 macro
Switch all instances of the -isoC-2024 macro to -isoC-2023 selected by
upstream. Keep -isoC-2024 defined, but deprecated, for backwards compat.
MFC after: 3 days (I will resolve merge conflicts with cdefs)
vm/vm_mmap.c: provide extended errors for most places
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D50792
Makefile.inc1: Cleanup (un)compressed manpages
When switching between compressed and uncompressed manual pages, the
other type is left behind as divots. Compensate by removing the
now-unwanted man pages automatically.
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1295
rtld amd64: extend osrel check to enable tlsbase op on stable/14
This is a direct commit to stable/14.
Reported by: Mark Millard <marklmi at yahoo.com>
Sponsored by: The FreeBSD Foundation
netinet6: Remove ndpr_raf_ra_derived flag
This flag was introduced at 8036234c72c9361711e867cc1a0c6a7fe0babd84
to prevent the SIOCSPFXFLUSH_IN6 ioctl from removing manually-added
entries. However, this flag did actually not work due to an
incomplete implementation making prelist_update() not handle it before
calling nd6_prelist_add().
This patch removes the flag because a prefix is derived from an RA
always has an entry in the ndpr_advrtrs member in the struct
nd_prefix. Having a separate flag is not a good idea because it can
cause a mismatch between the flag and the ndpr_advrtrs entry. Testing
using LIST_EMPTY() is simpler for the origial goal.
This also removes in a prefix check in the ICMPV6CTL_ND6_PRLIST sysctl
to exclude manually-added entries. This ioctl is designed to list all
entries, and there is no relationship to SIOCSPFXFLUSH_IN6.
Differential Revision: https://reviews.freebsd.org/D46441
Implement CLOCK_TAI
Provide a clock through clock_gettime() that returns the current TAI
time (UTC without leap seconds) as a complement to CLOCK_REALTIME. This
provides compatibility with Linux, which also provides a CLOCK_TAI since
kernel 2.6.26, and this seems to be becoming the standard way to acquire
TAI time. Unlike Linux, this code will return EINVAL if the TAI offset
(set by ntpd, ptpd, etc.) is not known since it seems pathological for
CLOCK_TAI to silently give the wrong (UTC) time if the offset is not
known as it does on Linux.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D46268
rc: Disable pathname expansion when calling run_rc_command()
Variables for command-line options like $foo_flags can contain characters
that perform pathname expansions, such as '[', ']', and '*'. They were
passed without escaping, and the matched entries in the working directory
affected the command-line options. This change turns off the expansion
when run_rc_command() is called.
While this changes the current behavior, an invocation of a service
program should not depend on entries in the working directory.
Differential Revision: https://reviews.freebsd.org/D45855
libcasper: Fix inconsistent error codes of cap_get{addr,name}info()
The get{addr,name}info(3) API is designed to return an API-specific error
code that is independent of errno. The cap_get{addr,name}info() functions
returned either an errno or API-specific error code inconsistently.
This change fixes this mismatch.
When the API returns an errno, the return value itself is set to
EAI_SYSTEM and errno is set depending on the actual error. So, usually
this API is called in the following form:
error = getnameinfo(...);
if (error == EAI_SYSTEM)
perror("getnameinfo");
else if (error)
errx(1, "getnameinfo: %s", gai_strerror(error);
If the above getnameinfo() call is replaced with cap_getnameinfo(),
it breaks the error handling. For example, the cap_get{addr,name}info()
[7 lines not shown]
libcasper: Use __VA_ARGS__ for function-like macros
cap_net.h uses "#define cap_f(chan, a) f(a)" to call the conventional
service function with the first argument of cap_f() dropped for
compatibility with the environment where the casper service is
unavailable. However, this function-like macro does not work when the
arguments contains C99 compound literals, such as f(chan, (int[]){1,2,3}).
The following is a typical example:
error = cap_getaddrinfo(capnet, "192.168.0.1", "100",
&(struct addrinfo){
.ai_family = AF_INET,
.ai_flags = AI_NUMERICHOST
}, &res);
Using cap_f(chan, ...) and __VA_ARGS__ in C99 seems a reasonable solution
for this problem. While there is a workaround using parenthesis around
the compound literal like f(chan, ((int[]){1,2,3})), it is not intuitive
and the above example works when the cap_net is available and f() is
[9 lines not shown]