Page MenuHomeFreeBSD

ngctl.8: fix incorrect synopsis
ClosedPublic

Authored by dave_freedave.net on Tue, Feb 24, 1:48 PM.
Tags
None
Referenced Files
F146444985: D55485.diff
Mon, Mar 2, 6:15 PM
Unknown Object (File)
Sat, Feb 28, 2:39 PM
Unknown Object (File)
Wed, Feb 25, 9:25 PM
Unknown Object (File)
Wed, Feb 25, 8:18 PM
Unknown Object (File)
Wed, Feb 25, 7:10 PM
Unknown Object (File)
Wed, Feb 25, 6:25 PM
Unknown Object (File)
Wed, Feb 25, 11:42 AM
Unknown Object (File)
Wed, Feb 25, 9:37 AM
Subscribers

Details

Summary

Tiny manpage bug I caused in D50241
I left a line in the manpage that shouldn't be there.

Test Plan
# man ngctl | head -8
NGCTL(8)                FreeBSD System Manager's Manual               NGCTL(8)

NAME
     ngctl – netgraph control utility

SYNOPSIS
     ngctl [-j jail] [-d] [-f filename] [-n nodename] [command [argument ...]]
           [command ...]

That last [command ...] on its own line should not be there. It should match usage from ngctl.

Diff Detail

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

Event Timeline

The usage is, I believe, correct:

# ngctl -h
ngctl: illegal option -- h
usage: ngctl [-j jail] [-d] [-f filename] [-n nodename] [command [argument ...]]

That is you can issue exactly one command with many arguments. If you want multiple commands you must use a file.

This revision is now accepted and ready to land.Tue, Feb 24, 2:01 PM
usr.sbin/ngctl/main.c
255 ↗(On Diff #172581)

Damn, I thought getline() returned 0 on EOF. So there are two bugs here: the loop condition should use >= instead of >, and this if should just check ferror(fp).

usr.sbin/ngctl/main.c
255 ↗(On Diff #172581)

I will take care of this in D55487.

des requested changes to this revision.Tue, Feb 24, 2:15 PM
This revision now requires changes to proceed.Tue, Feb 24, 2:15 PM

As @des has the correct fix for ngctl, I'm going to just going to update this to have my manpage bug. Thanks!

dave_freedave.net retitled this revision from ngctl: fix exit code when using `-f` and a incorrect man synopsis. to ngctl.8: fix incorrect synopsis.
dave_freedave.net edited the summary of this revision. (Show Details)
dave_freedave.net edited the test plan for this revision. (Show Details)

remove bad fix, its addressed in D55487.

This revision is now accepted and ready to land.Tue, Feb 24, 2:27 PM
This revision was automatically updated to reflect the committed changes.