mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Make help text work again for string/int/hex
@ 2003-09-25 13:59 Matthew Wilcox
  0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2003-09-25 13:59 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-kernel


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-25 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-25 13:59 [PATCH] Make help text work again for string/int/hex Matthew Wilcox

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®