Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XS1h9-0003PL-K7 for mharc-grub-devel@gnu.org; Thu, 11 Sep 2014 06:33:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS1gz-0003G9-7W for grub-devel@gnu.org; Thu, 11 Sep 2014 06:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XS1gq-0005Ri-6w for grub-devel@gnu.org; Thu, 11 Sep 2014 06:33:33 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:54726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS1gp-0005R5-T5 for grub-devel@gnu.org; Thu, 11 Sep 2014 06:33:24 -0400 Received: by mail-wg0-f52.google.com with SMTP id x13so6131034wgg.23 for ; Thu, 11 Sep 2014 03:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id; bh=uM1IfJKwAEu6LDNTvUoR5++Cw3P8XjEoUqXXopG6ZFg=; b=x+KH15PzZP37H87djqfyvNCXAZeHGixZz6NdRZ3VW4fuRqSFAZ+39+sWZ0Q7uOb425 eJwMcLXrqTmHrB8rvIjIy4gIcSQXJHTnU7k6LXTLSgqgYTGOcawK8BnJnQOeKPT7Rzb1 KZdEjBKQNxJSpHtPzFM2ENI6UY5xoiMb19CMGVdwKS5rRetM1AFmr+Z3Wowaaj3X/qiW Jed6sj/dDgqEWn/Sl5Cwj8Qk9zm93CbxQkRWKRj3p9PPBDcY/0cNO5X9G75ne5KEAfvY jCslT/fdOPj9V4KtAVSNtwd4AaLpxWm526ukoz3Hnc3gtxHsfAN+T/Wo0k5Vt6fxa+fC nIrw== X-Received: by 10.194.95.8 with SMTP id dg8mr22040wjb.1.1410431601229; Thu, 11 Sep 2014 03:33:21 -0700 (PDT) Received: from localhost.localdomain ([130.57.30.250]) by mx.google.com with ESMTPSA id em1sm1058639wib.17.2014.09.11.03.33.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Sep 2014 03:33:20 -0700 (PDT) Sender: =?UTF-8?B?5by15paH6I+v?= From: Michael Chang To: grub-devel@gnu.org Subject: [PATCH] Fix extraous comma in printf Date: Thu, 11 Sep 2014 18:27:14 +0800 Message-Id: <1410431234-26472-1-git-send-email-mchang@suse.com> X-Mailer: git-send-email 1.7.3.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::234 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 10:33:42 -0000 This patch is to get intended output from printf shell command, as the comma is not used as separator for it's arguments, they will eventually be outputted together with the variables. Though it does not affect or break any function currently, I'd like to address this hidden problem and hope to get some attention of it. Thanks. --- grub-core/osdep/unix/config.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c index f4b0bb4..65effa9 100644 --- a/grub-core/osdep/unix/config.c +++ b/grub-core/osdep/unix/config.c @@ -105,8 +105,8 @@ grub_util_load_config (struct grub_util_config *cfg) *ptr++ = *iptr; } - strcpy (ptr, "'; printf \"GRUB_ENABLE_CRYPTODISK=%s\\nGRUB_DISTRIBUTOR=%s\\n\", " - "\"$GRUB_ENABLE_CRYPTODISK\", \"$GRUB_DISTRIBUTOR\""); + strcpy (ptr, "'; printf \"GRUB_ENABLE_CRYPTODISK=%s\\nGRUB_DISTRIBUTOR=%s\\n\" " + "\"$GRUB_ENABLE_CRYPTODISK\" \"$GRUB_DISTRIBUTOR\""); argv[2] = script; argv[3] = '\0'; -- 1.7.3.4