opnsense-src/usr.sbin/sysrc
Michal Scigocki c97460c4d9 sysrc: Fix check flag logic for append and subtract
When using sysrc with the check flag (-c), the append (+=) and subtract
(-=) operations result in incorrect return values because on the check
path the necessary union/difference calculation logic is not performed.

However, the correct union/difference calculation is already performed
when running without the check flag. We fix the issue on the check path
by using the results from the existing union/difference calculation in
the check logic to get the correct return values.

PR:		279200
Reviewed by:	markj
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1664
2025-04-28 18:18:08 +00:00
..
tests sysrc: Add some regressions tests 2025-04-28 18:18:08 +00:00
Makefile sysrc: Add some regressions tests 2025-04-28 18:18:08 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
sysrc sysrc: Fix check flag logic for append and subtract 2025-04-28 18:18:08 +00:00
sysrc.8 Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00