Opened 7 years ago

Closed 7 years ago

#7768 closed defect (fixed)

tor-fw-helper option names don't match between docs and code

Reported by: dcf Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: ioerror Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Specifically, the long options corresponding to -T, -v, and -p are not all the same. There are --test-commandline, --test, and --Test. There are --port and --forward-port. The man page doesn't document the --verbose synonym for -v.

tor-fw-helper.c:

{"help", 0, 0, 'h'},
{"test-commandline", 0, 0, 'T'},
{"verbose", 0, 0, 'v'},
{"fetch-public-ip", 0, 0, 'g'},
{"port", 1, 0, 'p'},

tor-fw-helper -h:

 [-h|--help]
 [-T|--Test]
 [-v|--verbose]
 [-g|--fetch-public-ip]
 [-p|--forward-port ([<external port>]:<internal port>)]

tor-fw-helper.1:

-h or --help
-T or --test
-v
-g or --fetch-public-ip
-p or --forward-port

Child Tickets

Attachments (1)

0001-Use-option-name-test-in-tor-fw-helper.patch (1.6 KB) - added by dcf 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by nickm

Keywords: tor-client added
Milestone: Tor: 0.2.4.x-final

comment:2 Changed 7 years ago by nickm

Status: newneeds_review

Possible fix in branch "bug7768" in my public repository; please review and improve

comment:3 Changed 7 years ago by dcf

Summary: for-fw-helper option names don't match between docs and codetor-fw-helper option names don't match between docs and code

Here's an additional patch that resolves the --test/--Test/--test-commandline mismatch. It settles on --test to make the man page. The previous actual option name was --test-commandline, so this is not purely a documentation fix.

comment:4 Changed 7 years ago by nickm

Maybe instead of that patch we should update the manpage to match the code, in case something's depending on the code's current behavior?

comment:5 in reply to:  4 Changed 7 years ago by dcf

Replying to nickm:

Maybe instead of that patch we should update the manpage to match the code, in case something's depending on the code's current behavior?

Sure, whatevs. But note that the code has to change in at least one place anyway: either in the --help output or in the getopt call, because they disagree on -T.

comment:6 Changed 7 years ago by nickm

Status: needs_reviewneeds_revision

comment:7 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_revisionclosed

Okay; cleaned up and merging.

Note: See TracTickets for help on using tickets.