HomeFreeBSD

Fix unlink(1) for files starting with -

Description

Fix unlink(1) for files starting with -

Restore the original behavior of unlink(1), passing the provided filename
directly to unlink(2), handling the first argument being "--" correctly.

This fixes "unlink -foo", broken in r97533.

PR: 228448
Submitted by: Brennan Vincent <brennan@umanwizard.com> (original version)
Submitted by: Yuri Pankov
Reported by: Brennan Vincent <brennan@umanwizard.com>
Reviewed by: emaste, kevans, vangyzen, 0mp
Approved by: re (delphij)
Differential Revision: https://reviews.freebsd.org/D17132

Details

Provenance
emasteAuthored on
Reviewer
emaste
Differential Revision
D17132: PR228448: `unlink -foo` , the original use of `unlink`, no longer works.
Parents
rS338619: MFC r337329:
Branches
Unknown
Tags
Unknown