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)
Sun, Dec 1, 3:01 AM
Unknown Object (File)
Thu, Nov 21, 11:12 AM
Unknown Object (File)
Nov 6 2024, 11:47 PM
Unknown Object (File)
Oct 2 2024, 10:22 PM
Unknown Object (File)
Oct 1 2024, 1:16 PM
Unknown Object (File)
Sep 30 2024, 10:53 AM
Unknown Object (File)
Sep 24 2024, 3:50 AM
Unknown Object (File)
Sep 23 2024, 9:32 PM
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.