HomeFreeBSD

sysrc: Fix check flag logic for append and subtract

Description

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

Details

Provenance
Michal Scigocki <michal.os@hotmail.com>Authored on Mon, Apr 14, 7:01 AM
markjCommitted on Mon, Apr 28, 6:18 PM
Parents
rGeeb2d4ffe95b: sysrc: Add some regressions tests
Branches
Unknown
Tags
Unknown

Event Timeline