All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Wagner <daniel.wagner@bmw-carit.de>
Subject: [PATCH v0 2/3] posix03, posix04: Use '-l' instead of '-i' as option argument name
Date: Thu, 22 Sep 2016 10:46:06 +0200	[thread overview]
Message-ID: <1474533967-4404-3-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1474533967-4404-1-git-send-email-wagi@monom.org>

From: Daniel Wagner <daniel.wagner@bmw-carit.de>

All other test use '=l' instead of '-i' to as option name for defining how many
loops should be executed. Let's streamline posix03 and posix04.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
 posix03.c | 6 +++---
 posix04.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/posix03.c b/posix03.c
index 864f0f0..a36caa5 100644
--- a/posix03.c
+++ b/posix03.c
@@ -109,7 +109,7 @@ static int do_child(int lockfd, int i, int to_lockers, int from_lockers)
 static int
 usage(char *argv0)
 {
-	errx(1, "Usage: %s [-i iterations] [-n nr_children] <filename>", argv0);
+	errx(1, "Usage: %s  [-n nr_procs] [-l nr_loops] <filename>", argv0);
 }
 
 int main(int argc, char *argv[])
@@ -126,9 +126,9 @@ int main(int argc, char *argv[])
 	total.tv_sec = 0;
 	total.tv_nsec = 0;
 
-	while ((opt = getopt(argc, argv, "i:n:")) != -1) {
+	while ((opt = getopt(argc, argv, "l:n:")) != -1) {
 		switch (opt) {
-		case 'i':
+		case 'l':
 			iter = atoi(optarg);
 			break;
 		case 'n':
diff --git a/posix04.c b/posix04.c
index ed862f2..67eb4af 100644
--- a/posix04.c
+++ b/posix04.c
@@ -158,7 +158,7 @@ static int do_child(int fd, int id, int nproc, int to_lockers, int from_lockers)
 static int
 usage(char *argv0)
 {
-	errx(1, "Usage: %s [-i iterations] [-n nr_children] [-s] <filename>", argv0);
+	errx(1, "Usage: %s [-n nr_procs] [-l nr_loops] [-s] <filename>", argv0);
 }
 
 int main(int argc, char *argv[])
@@ -175,9 +175,9 @@ int main(int argc, char *argv[])
 	total.tv_sec = 0;
 	total.tv_nsec = 0;
 
-	while ((opt = getopt(argc, argv, "i:n:s")) != -1) {
+	while ((opt = getopt(argc, argv, "l:n:s")) != -1) {
 		switch (opt) {
-		case 'i':
+		case 'l':
 			iter = atoi(optarg);
 			break;
 		case 'n':
-- 
2.5.5

  parent reply	other threads:[~2016-09-22  8:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  8:46 [PATCH v0 0/3] [RESEND] lockperf: a few small improvments Daniel Wagner
2016-09-22  8:46 ` [PATCH v0 1/3] Synchronize all clients on start up Daniel Wagner
2016-09-22  8:46 ` Daniel Wagner [this message]
2016-09-22  8:46 ` [PATCH v0 3/3] posix03: Do not kill everything in the process group Daniel Wagner
  -- strict thread matches above, loose matches on Subject: below --
2016-06-02  9:16 [PATCH v0 0/3] lockperf: a few small improvments Daniel Wagner
2016-06-02  9:16 ` [PATCH v0 2/3] posix03, posix04: Use '-l' instead of '-i' as option argument name Daniel Wagner

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=1474533967-4404-3-git-send-email-wagi@monom.org \
    --to=wagi@monom.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.