Page MenuHomeFreeBSD

contrib/blacklist: Fix usage for blacklistd/blacklistctl
ClosedPublic

Authored by jlduran_gmail.com on Aug 8 2022, 11:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 31, 2:40 AM
Unknown Object (File)
Fri, May 31, 2:40 AM
Unknown Object (File)
May 12 2024, 10:29 AM
Unknown Object (File)
Jan 12 2024, 6:46 AM
Unknown Object (File)
Dec 22 2023, 10:08 PM
Unknown Object (File)
Aug 21 2023, 2:57 PM
Unknown Object (File)
Jul 10 2023, 8:56 AM
Unknown Object (File)
Jul 10 2023, 8:54 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

contrib/blacklist/bin/blacklistd.c
477

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

jlduran_gmail.com 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.