From patchwork Tue Jun 13 16:33:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9784335 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 CC24E602C9 for ; Tue, 13 Jun 2017 16:34:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7FB326861 for ; Tue, 13 Jun 2017 16:34:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC1B628589; Tue, 13 Jun 2017 16:34:14 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 EE37A26861 for ; Tue, 13 Jun 2017 16:34:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA17F7EBBC; Tue, 13 Jun 2017 16:34:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EA17F7EBBC Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=sandisk.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EA17F7EBBC Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="Go5eUJSx" Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3F7B978C9; Tue, 13 Jun 2017 16:34:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 70B3E1841C44; Tue, 13 Jun 2017 16:34:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v5DGYAHY012165 for ; Tue, 13 Jun 2017 12:34:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E8668B7A9; Tue, 13 Jun 2017 16:34:10 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 176338B7A7 for ; Tue, 13 Jun 2017 16:34:08 +0000 (UTC) Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) (using TLSv1.2 with cipher RC4-SHA (112/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30B1EC05FFF7 for ; Tue, 13 Jun 2017 16:33:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 30B1EC05FFF7 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=sandisk.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=Bart.VanAssche@sandisk.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 30B1EC05FFF7 X-IronPort-AV: E=Sophos;i="5.39,338,1493654400"; d="scan'208";a="122275546" Received: from mail-dm3nam03lp0017.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.17]) by ob1.hgst.iphmx.com with ESMTP; 14 Jun 2017 00:46:50 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=U1LqgBK1ikknTsH7Kn+kNOu7yF9kTU4rBN/E+Z3moS8=; b=Go5eUJSxJsUiESqh4QOSsnmO+n6qQaFi/Hrd8+Miy/jThqSKA5R/urIHvcxnwX0AncnXpDkq97AYl2kLqAtk58jhgBxdTur6mROmhLtbz6B9UdgwdfW91DY9ECR4O8QcNvoVEvGQmaOGPsfVq5QoL2LSTAT1hshEW4u0SxfkHSs= Received: from CY1PR04CA0023.namprd04.prod.outlook.com (10.166.187.33) by BLUPR04MB531.namprd04.prod.outlook.com (10.141.29.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Tue, 13 Jun 2017 16:33:47 +0000 Received: from BN3NAM04FT054.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::206) by CY1PR04CA0023.outlook.office365.com (2a01:111:e400:c5a5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Tue, 13 Jun 2017 16:33:47 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; opensvc.com; dkim=none (message not signed) header.d=none;opensvc.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN3NAM04FT054.mail.protection.outlook.com (10.152.93.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1143.11 via Frontend Transport; Tue, 13 Jun 2017 16:33:46 +0000 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 22.DB.02805.8E310495; Tue, 13 Jun 2017 09:33:44 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 13 Jun 2017 09:33:42 -0700 X-AuditID: 0ac94369-9c18398000000af5-35-594013e8e4c4 Received: from exp-402881.sandisk.com.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id EF.82.18148.5E310495; Tue, 13 Jun 2017 09:33:41 -0700 (PDT) From: Bart Van Assche To: Christophe Varoqui Date: Tue, 13 Jun 2017 09:33:37 -0700 Message-ID: <20170613163339.23005-3-bart.vanassche@sandisk.com> In-Reply-To: <20170613163339.23005-1-bart.vanassche@sandisk.com> References: <20170613163339.23005-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsXCddJ5ke4LYYdIg29tYhbrPs5ls9j7bjar A5PHmtunWT3e77vKFsAUxWWTkpqTWZZapG+XwJXxdfkW9oJ2+YqfCyeyNjBuFO9i5OSQEDCR eNr1nq2LkYtDSGApk8T6f+eZIZxtjBKv1k9lham6sW0zVGIlo8TedcsZQRJsAkY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lluKMREMt5qLiRADT6TTqpAEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(2980300002)(438002)(199003)(189002)(81166006)(54906002)(5660300001)(4326008)(8676002)(81156014)(305945005)(356003)(50226002)(8936002)(48376002)(76176999)(50986999)(50466002)(5890100001)(110136004)(107886003)(38730400002)(53936002)(69596002)(1076002)(33646002)(36756003)(5003940100001)(6666003)(77096006)(72206003)(97736004)(2950100002)(6916009)(478600001)(189998001)(47776003)(2906002)(106466001)(86362001)(68736007); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB531; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT054; 1:ru4bxuHCA3A1ENbzO84igd4uUm7nZMBRcIPgEWUipgPark2XVCRKBw2ndXSCvlvJtRXsDSfHEceiSUNtPXbOYmz3oAWGWibT16SrbhYKYmh5zuTJlb9Wuh+D+cFd4d9gNo5I8rZMx+mAJ6fuc8yghsW8c5tTPAoax7gseOwTbr5Aj3qjUY5RycIbwyi07z0iacK8z0yZ92PG3Mf63Ee3ihzV/zgIEqO7cHTcvloOyEWArUXj/BRye6ArkgTTfdG07WsQHWvTdi2cgvnjBZqa+1EZMoTvbljd9KldvcFQzbLIoJYdXbtRDzbpJxzHFwb610X9KZfgqK4hXjmGzTfP8kAqEocs/HrNeWw5xgu+mYvm1Wrtnyzhmy5lnLimyVBH+XqtZPfZ/bEy7jcUyX/p+zebrSPAFZvorqa2fSYyGTkeYpUphmQ7FjgXk0E+oKClAW3GfEyzB/LTgCrcb4kvB7vf/4vkRaOlciXtsm6xMKJOBEyWXQ+TN74KKrFFEtJfiUCGSgwX4NvJ12XE2aBMfDB4Q348AsVYya1XqAoQd6E= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR04MB531: X-MS-Office365-Filtering-Correlation-Id: ed81d788-e3d8-4967-e2f1-08d4b279f701 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB531; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 3:JHon3datMa9ODnmyMmlxVraz3Ff0IWYoGpWU2Vsm53L2HmfbTsjD+LFm/DV1ttJwY8TJO4mNlrMiH2X5IuKSkQyA1OLkJDYbVkKGkUDYM8Kss8DuT1++EYdAtE3gIUlYcWeqPxa8wPfIN/fg9OaOObmtfEempYRfEqxClqQwrz3NPgq7/j+8UEL/S1VmR44fUxCxiiOaDohj7iIORcMgbNvbiA91C7HM3LoG1yD7NJMq7OaT2ykCgjYK1Mg+dNdRzGAl8iHjOUP/HEfnM6tJhRDcytqsq429CoVXn/dgvI7BxFnqyarWutyZOo5SZrDUpqY81FBmYGLFJmvJUWrK0jU+etpJO0QjpytB0HKypGUudeFL/MNlDK3az5uVF0ZIZkFOBYsHfyiApXQ4QxuU0TcF+9B7cBKpCsa1qW4NNtGe7Xb2c30UUj4geaVMtc9aRCEqOfYllyNUMoikimaBN6RqXcHiWZH5Aqr/wIXOv2qSpQQ1T/ynF722U5IMDfBs X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 25:r6g82meimEjL1H6fqTF8gzyUoM/RA+KLcIP8LD2XzlyWVl9D/pC4M5MhcNU+CSYTp23n2fZJpwEjhS+AIZkZzJlcwN0RqRRvPkDDD/uRvE2GGWsDcgSim3fAqq6vhybJ6mB8mFzkdO3AELM7iWzSfINBJ3LQ3CsW1wlTYzmxnzcSb9KiBmbu2MgC4D1PmSMJulgGBMQoyY3qSpC6dunsSKizzv+DYMSgFwKNpz8jFY52cbvmDvoVhi4keaPe1VsPL+Yw19YdRtu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KwR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR04MB531; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR04MB531; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB531; 4:clLDv19yJk/JuuQOnEneIWdmcQsnNQlo+nLrGjrWj9x?= =?us-ascii?Q?Ll/dktQC+SQjGcGRd86wa7hKi4Nn7OeQbmS26fqn8lpu3achtccBkyLsCF7w?= =?us-ascii?Q?tSpFdbxWAPUd/hePjhot/1soNgFZwFCuOz+FQiym7MYM1wiaiK7/ulJwEKts?= =?us-ascii?Q?hHUJOeuXIbsEk4juNEbIgnqSsCoRLM9Ib7bT+uaPwW/4zNX1qN4qqxA/S9c8?= =?us-ascii?Q?hcVrJP3lVPNTVHGWrRXhtrZC860/KRiiYdfstuhVOaO6vNUtQYHh4qMnK29U?= =?us-ascii?Q?Ddm2rDUuIGdGrpZV5D1uPiXA/ftolqW7HofcqmD3lKUhB43+K4HDyAUOMBgg?= =?us-ascii?Q?0EQqn0A/MIlcOLi0Cj36OCEGLmwc9McuuMeJTj+eFgKT7xcoDGVEsKyHCdfN?= =?us-ascii?Q?If3+qpoD9seL177RtQWSpgiLvW4mHHKmAMZs96yhK5zBdOMQNki7Cc6XGQ0u?= =?us-ascii?Q?28K+qT9vtVUBa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ZW3V0HpmeBDemUWRqZU2SNhu/pd8WHKyONi?= =?us-ascii?Q?HqUHYPgeL+1thDCY38WqkjMIER8jDQlfnkmXQtmYtXuSDTpKI/llklnioa1T?= =?us-ascii?Q?gnlGe8T74c22YszrtywjTH/8m9TajxwIZgjTq3uTPDoftWCkyEND/dQQNYkj?= =?us-ascii?Q?vknZ5MIFxFiNNryVvSwZ11exETjWApSXgsFIrmo6BU+X/3TI0K7dKcdSCVVw?= =?us-ascii?Q?FlqjrgUD3YfpFeBeNcDKwaS6yr0Rjk2xd3vtet/mIsJQMZVdL1XdmvS8MM/x?= =?us-ascii?Q?FGr6f5ZVQNTBXqQjnhFRwaXVaCybS3kW3qfms8m4KjIyAJWk2cirFXJyab/N?= =?us-ascii?Q?9di4QA1n25jIaMRYJ6vwy9DeaX5JiAzofY?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 6:eBOFeEp/oqOXNkExhVyRGoZH9ngDJ9TS25qElOPf5Apw9J3Xk37dOqtEOxqqNaCeojks+lylCuBqbk5FgXnKWXGc8DEQOdx4PFpl085RjRaEcWUVuvV6b2LffscxCgYjtjtELIHD8jPkgPqU7NAHMEl6zgjPubYMHkTTRoYQ2hmYw7kXtzFTKKXWVhNjoBQIvapAZ1E/hOlw4GydU3ak2Qp3eiczw1qk3f/yehk99vjD9HG3jCWCJZ7q2QvNOAMY4aGFAkS48IVA7sxGq+WQ7VHYmsnPcQnBUBmvVolx7aBYXQaePvewAmQR274Ga9K5tXbSlNjdVfeo2E63/9+f7kj6ubj6TojVRYdwkJ2+W7YwlCnhQk5q/fSTvzOkHgFmqilzpuj6W2bmodYrymio7Vat7a/bS1tWA/59AoqtjcOmeggBMES6RejiZ5o/NyndQK8Y40RavdMNeqLoymC37UCIKuySiM8tRdKtEGiIDRU52+t1DN6ugvi/YOaxKOOa4FkAFIbzYn+RBEOENDC7MbYhG3Ez/ryyOU6vFJ2uv2Y= X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB531; 5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dA+s84omr0lYSEO70dsymcyScxAgILpNNRdN/5OIdt4eAxBwwkl1ZqJnZ+tEKR2cdV6ddO64H71DGAF97WsOldlpq6zVqvm8ijMheDVzQCaQ6uWLJ+b0GlP6DfTa+ie2M1kY1E= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2017 16:33:46.8152 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB531 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 13 Jun 2017 16:33:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 13 Jun 2017 16:33:59 +0000 (UTC) for IP:'68.232.143.124' DOMAIN:'esa2.hgst.iphmx.com' HELO:'esa2.hgst.iphmx.com' FROM:'Bart.VanAssche@sandisk.com' RCPT:'' X-RedHat-Spam-Score: -0.3 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW) 68.232.143.124 esa2.hgst.iphmx.com 68.232.143.124 esa2.hgst.iphmx.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: Bart Van Assche , dm-devel@redhat.com Subject: [dm-devel] [PATCH 2/4] libmultipath: Simplify assemble_map() 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 13 Jun 2017 16:34:13 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Introduce a macro for appending formatted text to the output buffer. Eliminate the local variables 'shift' and 'freechar'. Move the code for freeing a temporary buffer to the end of the function. Handle snprintf() conversion errors. This patch avoids that gcc 7 reports the following warning: dmparser.c:137:20: warning: '__builtin_snprintf' output truncated before the last format character [-Wformat-truncation=] snprintf(p, 1, "\n"); ^ Signed-off-by: Bart Van Assche Reviewed-by: Martin Wilck --- libmultipath/dmparser.c | 67 +++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c index 469e60d2..ba09dc72 100644 --- a/libmultipath/dmparser.c +++ b/libmultipath/dmparser.c @@ -45,6 +45,22 @@ merge_words (char ** dst, char * word, int space) return 0; } +#define APPEND(p, end, args...) \ +({ \ + int ret; \ + \ + ret = snprintf(p, end - p, ##args); \ + if (ret < 0) { \ + condlog(0, "%s: conversion error", mp->alias); \ + goto err; \ + } \ + p += ret; \ + if (p >= end) { \ + condlog(0, "%s: params too small", mp->alias); \ + goto err; \ + } \ +}) + /* * Transforms the path group vector into a proper device map string */ @@ -52,10 +68,10 @@ int assemble_map (struct multipath * mp, char * params, int len) { int i, j; - int shift, freechar; int minio; int nr_priority_groups, initial_pg_nr; char * p, * f; + const char *const end = params + len; char no_path_retry[] = "queue_if_no_path"; char retain_hwhandler[] = "retain_attached_hw_handler"; struct pathgroup * pgp; @@ -63,7 +79,6 @@ assemble_map (struct multipath * mp, char * params, int len) minio = mp->minio; p = params; - freechar = len; nr_priority_groups = VECTOR_SIZE(mp->pg); initial_pg_nr = (nr_priority_groups ? mp->bestpg : 0); @@ -86,29 +101,13 @@ assemble_map (struct multipath * mp, char * params, int len) if (mp->retain_hwhandler == RETAIN_HWHANDLER_ON) add_feature(&f, retain_hwhandler); - shift = snprintf(p, freechar, "%s %s %i %i", - f, mp->hwhandler, - nr_priority_groups, initial_pg_nr); - - FREE(f); - - if (shift >= freechar) { - condlog(0, "%s: params too small", mp->alias); - return 1; - } - p += shift; - freechar -= shift; + APPEND(p, end, "%s %s %i %i", f, mp->hwhandler, nr_priority_groups, + initial_pg_nr); vector_foreach_slot (mp->pg, pgp, i) { pgp = VECTOR_SLOT(mp->pg, i); - shift = snprintf(p, freechar, " %s %i 1", mp->selector, - VECTOR_SIZE(pgp->paths)); - if (shift >= freechar) { - condlog(0, "%s: params too small", mp->alias); - return 1; - } - p += shift; - freechar -= shift; + APPEND(p, end, " %s %i 1", mp->selector, + VECTOR_SIZE(pgp->paths)); vector_foreach_slot (pgp->paths, pp, j) { int tmp_minio = minio; @@ -118,28 +117,24 @@ assemble_map (struct multipath * mp, char * params, int len) tmp_minio = minio * pp->priority; if (!strlen(pp->dev_t) ) { condlog(0, "dev_t not set for '%s'", pp->dev); - return 1; + goto err; } - shift = snprintf(p, freechar, " %s %d", - pp->dev_t, tmp_minio); - if (shift >= freechar) { - condlog(0, "%s: params too small", mp->alias); - return 1; - } - p += shift; - freechar -= shift; + APPEND(p, end, " %s %d", pp->dev_t, tmp_minio); } } - if (freechar < 1) { - condlog(0, "%s: params too small", mp->alias); - return 1; - } - snprintf(p, 1, "\n"); + APPEND(p, end, "\n"); + FREE(f); condlog(3, "%s: assembled map [%s]", mp->alias, params); return 0; + +err: + FREE(f); + return 1; } +#undef APPEND + int disassemble_map(vector pathvec, char *params, struct multipath *mpp, int is_daemon) {