mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH 1/8] tools/vm/slabinfo: use getopt no_argument/optional_argument
Date: Thu, 15 Oct 2015 20:14:26 +0900	[thread overview]
Message-ID: <1444907673-8863-2-git-send-email-sergey.senozhatsky@gmail.com> (raw)
In-Reply-To: <1444907673-8863-1-git-send-email-sergey.senozhatsky@gmail.com>

Use getopt constants in `struct option' ->has_arg instead
of numerical representations.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
 tools/vm/slabinfo.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index 808d5a9..258ed01 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -1268,23 +1268,23 @@ static void output_slabs(void)
 }
 
 struct option opts[] = {
-	{ "aliases", 0, NULL, 'a' },
-	{ "activity", 0, NULL, 'A' },
-	{ "debug", 2, NULL, 'd' },
-	{ "display-activity", 0, NULL, 'D' },
-	{ "empty", 0, NULL, 'e' },
-	{ "first-alias", 0, NULL, 'f' },
-	{ "help", 0, NULL, 'h' },
-	{ "inverted", 0, NULL, 'i'},
-	{ "numa", 0, NULL, 'n' },
-	{ "ops", 0, NULL, 'o' },
-	{ "report", 0, NULL, 'r' },
-	{ "shrink", 0, NULL, 's' },
-	{ "slabs", 0, NULL, 'l' },
-	{ "track", 0, NULL, 't'},
-	{ "validate", 0, NULL, 'v' },
-	{ "zero", 0, NULL, 'z' },
-	{ "1ref", 0, NULL, '1'},
+	{ "aliases", no_argument, NULL, 'a' },
+	{ "activity", no_argument, NULL, 'A' },
+	{ "debug", optional_argument, NULL, 'd' },
+	{ "display-activity", no_argument, NULL, 'D' },
+	{ "empty", no_argument, NULL, 'e' },
+	{ "first-alias", no_argument, NULL, 'f' },
+	{ "help", no_argument, NULL, 'h' },
+	{ "inverted", no_argument, NULL, 'i'},
+	{ "numa", no_argument, NULL, 'n' },
+	{ "ops", no_argument, NULL, 'o' },
+	{ "report", no_argument, NULL, 'r' },
+	{ "shrink", no_argument, NULL, 's' },
+	{ "slabs", no_argument, NULL, 'l' },
+	{ "track", no_argument, NULL, 't'},
+	{ "validate", no_argument, NULL, 'v' },
+	{ "zero", no_argument, NULL, 'z' },
+	{ "1ref", no_argument, NULL, '1'},
 	{ NULL, 0, NULL, 0 }
 };
 
-- 
2.6.1.134.g4b1fd35


  reply	other threads:[~2015-10-15 11:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 11:14 [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky
2015-10-15 11:14 ` Sergey Senozhatsky [this message]
2015-10-15 11:14 ` [PATCH 2/8] tools/vm/slabinfo: limit the number of reported slabs Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 3/8] tools/vm/slabinfo: sort slabs by loss Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 4/8] tools/vm/slabinfo: fix alternate opts names Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 5/8] tools/vm/slabinfo: introduce extended totals mode Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 6/8] tools/vm/slabinfo: output sizes in bytes Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 8/8] tools/vm/slabinfo: gnuplot slabifo extended stat Sergey Senozhatsky
2015-10-15 11:33 ` [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky
2015-10-16 22:35 ` Andrew Morton
2015-10-17  2:22   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444907673-8863-2-git-send-email-sergey.senozhatsky@gmail.com \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®