From patchwork Sun Oct 9 13:30:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Syromyatnikov X-Patchwork-Id: 9369111 X-Patchwork-Delegate: snitzer@redhat.com 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 F1B1760487 for ; Mon, 10 Oct 2016 08:33:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4AF029325 for ; Mon, 10 Oct 2016 08:33:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D92F42933B; Mon, 10 Oct 2016 08:33:03 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 793CA29325 for ; Mon, 10 Oct 2016 08:33:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9A8Uh5Y036830; Mon, 10 Oct 2016 04:30:43 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u99DUUZx016624 for ; Sun, 9 Oct 2016 09:30:30 -0400 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u99DUUBQ012668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 9 Oct 2016 09:30:30 -0400 Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15C9CC057FA0; Sun, 9 Oct 2016 13:30:29 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id l131so5466293lfl.0; Sun, 09 Oct 2016 06:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YZ05XODMXnfQh53kNK9RoKk7kzIJKwRoJElPFrVuXCE=; b=bQ/M4XJ17YvJ7H2bw37UQo3k7zcf6qzL58X+SEX1z3fxGP0Ao8AxOwmJ7HpbIstpwe iUR84sZEdNocuggjQ59YVeZqZqLEWEVsL5JWMlPGzJhPl49L0LZlyQG0/Ome4qVMIELa OtaRBb93VeVxDOXtEZQ04wxgdClfQMYa3Kizo7xlCgTDZ/o8wkPRwSHq9GVZgvZbW6Vl cqiNJAk1i17Hg2wIndJtVaR87dNftgLTK4YPYLrBJ5QUYTyLcmqZjR85ZxIXRHPI5FmV wUfDlW/NKNmcxS6+mxWjh3FEe8IVYlO4x6tgmcFKZLBK1qUei419FKAOIT2i1hAyf9eR jRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YZ05XODMXnfQh53kNK9RoKk7kzIJKwRoJElPFrVuXCE=; b=cugMdAb33JXiC5OM/QTgWA+L46gOgiCmMcT4gtx4H8BoqLCRz4/YACRl8L94EwhqwR ue9OeFIX2kGsWkC2PRBLBhZoHNojzCX5dg5oCHz1AM3drGRW/VML4vYSvfPLG8wKZ9O7 l3A0VEgd+VIY5b12vvotKeFoDE42JEixSvJJtJQMwXdgte9eEK3PVwYZWgYexMENFZCD UgskV9qjGKLIgOJ77JkcMreDh4HG4xh5IZqd2HzhDOsDmpdoXKaFZqGwx5lanjh8R60U 9Rw0nST4Ag/Jn10R73+dB5Dwh5wnuvWvkxQmvgZQivzFV0aKtddgm9UTEhI4iALDOMFW Rlpg== X-Gm-Message-State: AA6/9Rn5JfLyvsMlhs+njqETqhOTEKFJ3eOl9DCnKeM8prVxMjMZ3ENrIWvudtuwNoctIQ== X-Received: by 10.46.32.4 with SMTP id g4mr10666000ljg.43.1476019827414; Sun, 09 Oct 2016 06:30:27 -0700 (PDT) Received: from obsidian (broadband-46-188-15-144.2com.net. [46.188.15.144]) by smtp.gmail.com with ESMTPSA id z76sm4300834lff.35.2016.10.09.06.30.26 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 09 Oct 2016 06:30:26 -0700 (PDT) Date: Sun, 9 Oct 2016 16:30:24 +0300 From: Eugene Syromyatnikov To: strace-devel@lists.sourceforge.net Message-ID: <20161009133024.GA3397@obsidian> References: <20161005.192828.566127461630656590.yamato@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161005.192828.566127461630656590.yamato@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sun, 09 Oct 2016 13:30:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sun, 09 Oct 2016 13:30:29 +0000 (UTC) for IP:'209.85.215.68' DOMAIN:'mail-lf0-f68.google.com' HELO:'mail-lf0-f68.google.com' FROM:'evgsyr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.68 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.68 mail-lf0-f68.google.com 209.85.215.68 mail-lf0-f68.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 10 Oct 2016 04:29:54 -0400 Cc: dm-devel@redhat.com, mpatocka@redhat.com, yamato@redhat.com Subject: [dm-devel] [PATCH 10/21] dm: use => instead of , for splitting output structure from input X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP --- dm.c | 4 ++-- tests/ioctl_dm.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dm.c b/dm.c index 3ee74c3..f23a65d 100644 --- a/dm.c +++ b/dm.c @@ -288,8 +288,8 @@ dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg) if (umoven(tcp, arg, sizeof(ioc) - sizeof(ioc.data), &ioc) < 0) return 0; - tprintf(", {version=%d.%d.%d", ioc.version[0], ioc.version[1], - ioc.version[2]); + tprintf("%s{version=%d.%d.%d", entering(tcp) ? ", " : " => ", + ioc.version[0], ioc.version[1], ioc.version[2]); /* * if we use a different version of ABI, do not attempt to decode diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c index ba484ee..3c43913 100644 --- a/tests/ioctl_dm.c +++ b/tests/ioctl_dm.c @@ -42,7 +42,7 @@ main(void) ioctl(-1, DM_VERSION, &s); printf("ioctl(-1, DM_VERSION, " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " - "uuid=\"uuu\", flags=0}, " + "uuid=\"uuu\", flags=0} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); @@ -58,7 +58,7 @@ main(void) printf("ioctl(-1, DM_TABLE_LOAD, " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", target_count=1, flags=0, {sector_start=16, " - "length=32, target_type=\"tgt\", string=\"tparams\"}}, " + "length=32, target_type=\"tgt\", string=\"tparams\"}} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); @@ -69,7 +69,7 @@ main(void) ioctl(-1, DM_TARGET_MSG, &s); printf("ioctl(-1, DM_TARGET_MSG, " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " - "uuid=\"uuu\", flags=0, {sector=4660, message=\"tmsg\"}}, " + "uuid=\"uuu\", flags=0, {sector=4660, message=\"tmsg\"}} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); @@ -78,7 +78,7 @@ main(void) ioctl(-1, DM_DEV_SET_GEOMETRY, &s); printf("ioctl(-1, DM_DEV_SET_GEOMETRY, " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " - "uuid=\"uuu\", flags=0, string=\"10 20 30 40\"}, " + "uuid=\"uuu\", flags=0, string=\"10 20 30 40\"} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); @@ -87,7 +87,7 @@ main(void) ioctl(-1, DM_DEV_RENAME, &s); printf("ioctl(-1, DM_DEV_RENAME, " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " - "uuid=\"uuu\", event_nr=0, flags=0, string=\"new-name\"}, " + "uuid=\"uuu\", event_nr=0, flags=0, string=\"new-name\"} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); @@ -98,7 +98,7 @@ main(void) "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", target_count=4294967295, flags=0, " "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " - "/* misplaced struct dm_target_spec */ ...}, " + "/* misplaced struct dm_target_spec */ ...} => " "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n");