Page MenuHomeFreeBSD

contrib/blacklist: Fix usage for blacklistd/blacklistctl
ClosedPublic

Authored by jlduran on Aug 8 2022, 11:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 22, 8:28 PM
Unknown Object (File)
Thu, May 22, 6:00 AM
Unknown Object (File)
Sun, May 4, 3:49 AM
Unknown Object (File)
Apr 19 2025, 10:22 PM
Unknown Object (File)
Apr 18 2025, 10:36 PM
Unknown Object (File)
Apr 17 2025, 10:28 PM
Unknown Object (File)
Apr 16 2025, 4:44 AM
Unknown Object (File)
Apr 15 2025, 9:55 AM
Subscribers

Details

Summary

If getopt(3) encounters a character not found in optstring or if it detects a missing option argument, it returns ? (question mark).

It avoids:

$ blacklistd -X
blacklistd: illegal option -- X
blacklistd: Unknown option `?'
Usage: blacklistd ...

Obtained from: https://github.com/zoulasc/blocklist/commit/168ab3042320ff6047fbc2d2cfcce7293ca0974b and https://github.com/zoulasc/blocklist/commit/1b709eaa138eedb3e6e416466f63c722688fc1cb

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Update diff to include context.

contrib/blacklist/bin/blacklistd.c
477

This is still usage(c); upstream it looks like?

Update with the right diff.

jlduran added inline comments.
contrib/blacklist/bin/blacklistd.c
477

Yes, I made a mistake when dissecting from https://github.com/freebsd/freebsd-src/pull/600

This revision was not accepted when it landed; it landed in state Needs Review.Oct 12 2022, 2:30 PM
This revision was automatically updated to reflect the committed changes.