Skip to content

Commit

Permalink
Tools/sysctl: some changes were omitted from the last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
logwang committed May 26, 2017
1 parent 2d99e60 commit 34a144b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/sysctl/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ static const char rcsid[] =
#include <unistd.h>

#ifdef FSTACK
#include <time.h>

#include "sysctl.h"
#include "ff_ipc.h"

Expand Down Expand Up @@ -147,9 +149,15 @@ static void
usage(void)
{

#ifndef FSTACK
(void)fprintf(stderr, "%s\n%s\n",
"usage: sysctl [-bdehiNnoqTtWx] [ -B <bufsize> ] [-f filename] name[=value] ...",
" sysctl [-bdehNnoqTtWx] [ -B <bufsize> ] -a");
#else
(void)fprintf(stderr, "%s\n%s\n",
"usage: sysctl -p <f-stack proc_id> [-bdehiNnoqTtWx] [ -B <bufsize> ] [-f filename] name[=value] ...",
" sysctl -p <f-stack proc_id> [-bdehNnoqTtWx] [ -B <bufsize> ] -a");
#endif
exit(1);
}

Expand All @@ -163,7 +171,11 @@ main(int argc, char **argv)
setbuf(stdout,0);
setbuf(stderr,0);

#ifndef FSTACK
while ((ch = getopt(argc, argv, "AabB:def:hiNnoqtTwWxX")) != -1) {
#else
while ((ch = getopt(argc, argv, "AabB:def:hiNnoqtTwWxXp:")) != -1) {
#endif
switch (ch) {
case 'A':
/* compatibility */
Expand Down Expand Up @@ -225,6 +237,11 @@ main(int argc, char **argv)
case 'x':
xflag = 1;
break;
#ifdef FSTACK
case 'p':
proc_id = atoi(optarg);
break;
#endif
default:
usage();
}
Expand Down

0 comments on commit 34a144b

Please sign in to comment.