From patchwork Thu Sep 22 08:46:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 9344775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 84948601C2 for ; Thu, 22 Sep 2016 08:48:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7749C2A8DB for ; Thu, 22 Sep 2016 08:48:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B6E62A8DD; Thu, 22 Sep 2016 08:48:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB83A2A8DB for ; Thu, 22 Sep 2016 08:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754916AbcIVIrq (ORCPT ); Thu, 22 Sep 2016 04:47:46 -0400 Received: from atlantic540.startdedicated.de ([188.138.9.77]:43337 "EHLO atlantic540.startdedicated.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933359AbcIVIqx (ORCPT ); Thu, 22 Sep 2016 04:46:53 -0400 Received: from atlantic540.startdedicated.de (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id 0378F5001DF; Thu, 22 Sep 2016 10:46:51 +0200 (CEST) Received: from localhost (unknown [212.118.206.70]) by atlantic540.startdedicated.de (Postfix) with ESMTPSA id 7BDA05001DE; Thu, 22 Sep 2016 10:46:50 +0200 (CEST) From: Daniel Wagner To: Jeff Layton Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Wagner 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 Message-Id: <1474533967-4404-3-git-send-email-wagi@monom.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474533967-4404-1-git-send-email-wagi@monom.org> References: <1474533967-4404-1-git-send-email-wagi@monom.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Wagner 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 --- 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] ", argv0); + errx(1, "Usage: %s [-n nr_procs] [-l nr_loops] ", 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] ", argv0); + errx(1, "Usage: %s [-n nr_procs] [-l nr_loops] [-s] ", 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':