diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -34,9 +34,12 @@ .Sh SYNOPSIS .Nm .Fl m Ar mode -.Op Fl s Ar control -.Op Fl q +.Fl s Ar control .Fl p Ar pid | command +.Nm +.Fl m Ar mode +.Fl q +.Op Fl p Ar pid | command .Sh DESCRIPTION The .Nm diff --git a/usr.bin/proccontrol/proccontrol.c b/usr.bin/proccontrol/proccontrol.c --- a/usr.bin/proccontrol/proccontrol.c +++ b/usr.bin/proccontrol/proccontrol.c @@ -81,10 +81,14 @@ static void __dead2 usage(void) { - - fprintf(stderr, "Usage: proccontrol -m (aslr|protmax|trace|trapcap|" - "stackgap|nonewprivs|wxmap"KPTI_USAGE LA_USAGE") [-q] " - "[-s (enable|disable)] [-p pid | command]\n"); + fprintf(stderr, "Usage:\n"); + fprintf(stderr, " proccontrol -m mode -s (enable|disable) " + "(-p pid | command)\n"); + fprintf(stderr, " proccontrol -m mode -q [-p pid]\n"); + fprintf(stderr, "Modes: " + "aslr|protmax|trace|trapcap|stackgap|nonewprivs|wxmap" + KPTI_USAGE LA_USAGE + "\n"); exit(1); } @@ -157,6 +161,8 @@ usage(); pid = getpid(); } else if (pid == -1) { + if (!query) + usage(); pid = getpid(); }