mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Make help text work again for string/int/hex
Date: Thu, 25 Sep 2003 14:59:56 +0100	[thread overview]
Message-ID: <20030925135956.GN13172@parcelfarce.linux.theplanet.co.uk> (raw)


conf_askvalue calls fgets() which puts "?\n" in the buffer, not "?".
So testing the second char for '\0' fails every time.  You need to
check for \n instead, I think.

(whitespace damaged patch, it's a trivial change to make)

Index: scripts/kconfig/conf.c
===================================================================
RCS file: /var/cvs/linux-2.6/scripts/kconfig/conf.c,v
retrieving revision 1.1
diff -u -p -r1.1 conf.c
--- scripts/kconfig/conf.c      29 Jul 2003 17:02:27 -0000      1.1
+++ scripts/kconfig/conf.c      25 Sep 2003 13:56:03 -0000
@@ -174,7 +174,7 @@ int conf_string(struct menu *menu)
                        break;
                case '?':
                        /* print help */
-                       if (line[1] == 0) {
+                       if (line[1] == '\n') {
                                help = nohelp_text;
                                if (menu->sym->help)
                                        help = menu->sym->help;


-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

                 reply	other threads:[~2003-09-25 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030925135956.GN13172@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®