Received: by 10.223.176.5 with SMTP id f5csp1245175wra; Wed, 7 Feb 2018 15:36:46 -0800 (PST) X-Google-Smtp-Source: AH8x225pDfumLG6BmoAYu1cm1oMC/jvE/ZA+rbyIy1pX9cDL/wc4XnbIiZmubg3r7Dss7EyFI3SO X-Received: by 2002:a17:902:904b:: with SMTP id w11-v6mr7656961plz.41.1518046606497; Wed, 07 Feb 2018 15:36:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518046606; cv=none; d=google.com; s=arc-20160816; b=0s47rOWIZO0WX0IC1crOYh+4+ewnOPtRYnkd48Bg7F9dx5FXR8slCGVNJKhvoGNjXY TsLaTBBdZygnQ5LJovTjWzCxl3LJcvwkU5xdK/6wWJWq+085Rs29R6fA+wRRiL5NBxDV dKM5ph9ysnmG2xR5lexVXTUJRyp4aIv9R06dAWUp/OHOJcJKk9jPBitQ8f7x7Ac/+yY9 wrgp2U+ls0BOWvghfl+/r3pWW9GsVPnLxMYWJSaVuMCo9hXBxDbLMHouW0BOGlj/u/9/ tpyxFppedgqfnKAJM+6mTzuQSj6R7fc7F6DtO2dMDzcqxr0+h69HJvhs5IqMFk03hfOb rdfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=mbJqIYFPQk2XIGpnFogq+9Qft1Gq5ze56onms37/DOU=; b=khkmPaoQrM16iBD3y1gmwypE8oLtyl5ZUq+ntxv3lH6Wl9iEWYJJTO0HyB/Nq56au2 Cnitpw199ERCV5vgMrRWTm5VmSF7xaqLR3ifCkkZwPPmvX0iMO/kvF/IiThutuYbsIYL ZYr0mfkXmnPEhY/L7NWz71GeZ98SfYbpUrbSoBO0kko6HTGUuyEo1NfLGZAAjr1UVrEY PPOHlneSDTF00e6HZZYhQjaDz3+5aJRs9mGyCo3/U770AMiUIH7eAQJU9rrD+gqSvEn4 E3R9GhT2NUvulHVUIx/rCFUVnZXRRd1ESPKkcmLCcpcVymw8cr3EEx8tvnER961jW+k7 qLFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rJY6YKfh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1564081pgv.124.2018.02.07.15.36.32; Wed, 07 Feb 2018 15:36:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rJY6YKfh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbeBGXel (ORCPT + 99 others); Wed, 7 Feb 2018 18:34:41 -0500 Received: from mail-ua0-f194.google.com ([209.85.217.194]:44423 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbeBGXek (ORCPT ); Wed, 7 Feb 2018 18:34:40 -0500 Received: by mail-ua0-f194.google.com with SMTP id x4so1726868uaj.11; Wed, 07 Feb 2018 15:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mbJqIYFPQk2XIGpnFogq+9Qft1Gq5ze56onms37/DOU=; b=rJY6YKfherho8sj3E8HZw0Kvl5u7T1MHTgAr32yokpmvQVRohKLvIq0iIVUTMQwf3T yf5E7nUQmhJmphuGqXoWg197VGIm6uKcXLYHylt8lSt9UWIis9jUywCswo+gJXpHspvM R59kTbj8L9CX2nCt9801C6CJvLVtwBURCuEQKXp/Tg9x2jvtVnTSv1XjbadnIWgg2uPy MnFMNZf7aByhIeXe0CzM2hWBHPR2OOwEgcGpJonWT5cmnRHL55dIHE9Vu7Z2LIrWuJyr JopuZK7yvEG0ujM3blTyFk33kPlBKYM8ZqMrJMU8QqMzGk0vLAovXLSUc94o0GvcpLOs s9EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mbJqIYFPQk2XIGpnFogq+9Qft1Gq5ze56onms37/DOU=; b=uYiC0YFJnwEJoaYuH/fmBCvobc0t7Uei0QKOyVpYnSP+nJ+57RIUZDN0nQtF2dbFqW Y5U3tZ62U/ffPhu8qSeJ37bG2l8QG0vcgKPHPZ7f3dfsKwvs5Ye/xuqg02wwylIeQBnU VpjSDWRvjtwVsbecBkM8TgGoSRZxdQPpV7w97h6UIJEHzarB5+jiW+THbCDVTNVXwOeP OVMDLmgHVFROqAk42+2RwlIDd+oOQiyc3niIfWhAYCaZvFRsgEa+ZfV/fhYHZn1qxc8K TSf/DGjk4xnTKmFTfnnjwMWb+JHCxxgr482LrLTGcmD6aswmGj1P01xtW9Go3VZoiCw/ tDKA== X-Gm-Message-State: APf1xPCi7mCKNDukcGwPiuuEymowCXV1Xq8IcxxpANpIvgGHqE6VbsTN wR/4EKMPckXFupeVOrkhVW3H1nHUv9Ug2QySB3A6JsH2TPY= X-Received: by 10.159.36.247 with SMTP id 110mr6722986uar.77.1518046479202; Wed, 07 Feb 2018 15:34:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.70.21 with HTTP; Wed, 7 Feb 2018 15:34:38 -0800 (PST) In-Reply-To: <1517877294-4826-5-git-send-email-yamada.masahiro@socionext.com> References: <1517877294-4826-1-git-send-email-yamada.masahiro@socionext.com> <1517877294-4826-5-git-send-email-yamada.masahiro@socionext.com> From: Ulf Magnusson Date: Thu, 8 Feb 2018 00:34:38 +0100 Message-ID: Subject: Re: [PATCH 04/14] kconfig: print additional new line for choice for redirection To: Masahiro Yamada Cc: Linux Kbuild mailing list , Greg Kroah-Hartman , Andrew Morton , Nicolas Pitre , "Luis R . Rodriguez" , Randy Dunlap , Sam Ravnborg , Michal Marek , Linus Torvalds , Linux Kernel Mailing List , Marc Herbert Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 6, 2018 at 1:34 AM, Masahiro Yamada wrote: > If stdout is redirected to a file, prompts look differently due to > missing new lines. > > Currently, conf_askvalue() takes care of this by putting additional > new line, but conf_choice() does not. Do likewise so that prompts > after 'choice' look properly. > > Signed-off-by: Masahiro Yamada > --- > > scripts/kconfig/conf.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c > index d346642..6ce06c8 100644 > --- a/scripts/kconfig/conf.c > +++ b/scripts/kconfig/conf.c > @@ -317,6 +317,8 @@ static int conf_choice(struct menu *menu) > case oldaskconfig: > fflush(stdout); > xfgets(line, sizeof(line), stdin); > + if (!tty_stdio) > + printf("\n"); > strip(line); > if (line[0] == '?') { > print_help(menu); > -- > 2.7.4 > Reviewed-by: Ulf Magnusson Maybe this could be moved into the xfgets() function as well. Cheers, Ulf