Re: [PATCH] 2.6.16.18 scripts/kconfig/mconf.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 1 Jun 2006, Nick Warne wrote:

> 
> --- linux-current/scripts/kconfig/mconf.cORIG	2006-05-30 18:58:59.000000000 
> +0100
> +++ linux-current/scripts/kconfig/mconf.c	2006-05-30 19:10:29.000000000 +0100
> @@ -402,6 +402,9 @@
>  	bool hit;
>  	struct property *prop;
>  
> +	if (!sym->name)
> +		return;
> +
>  	str_printf(r, "Symbol: %s [=%s]\n", sym->name,
>  	                               sym_get_string_value(sym));
>  	for_all_prompts(sym, prop)

Only choice symbols currently have no name, but there are otherwise normal 
symbols, so there is need to just return here. This should look more like:

	if (sym->name)
		str_printf(r, "Symbol: %s", sym->name);
	else if (sym_is_choice(sym))
		str_printf(r, "Choice:");
	else
		str_printf(r, "Weird symbol:");
	str_printf(r, "[=%s]\n", sym_get_string_value(sym));


> @@ -853,15 +856,17 @@
>  	{
>  		if (sym->name) {
>  			str_printf(&help, "CONFIG_%s:\n\n", sym->name);
> -			str_append(&help, _(sym->help));
> -			str_append(&help, "\n");
>  		}
> -	} else {
> -		str_append(&help, nohelp_text);
> -	}
> +	str_append(&help, _(sym->help));
> +	str_append(&help, "\n");
>  	get_symbol_str(&help, sym);
>  	show_helptext(menu_get_prompt(menu), str_get(&help));
>  	str_free(&help);
> +	} else {
> +		str_append(&help, nohelp_text);
> +		show_helptext(menu_get_prompt(menu), str_get(&help));
> +		str_free(&help);
> +	}
>  }

That looks a little misformated, anyway, this should just be:

	if (sym->name)
		str_printf(&help, "CONFIG_%s:\n\n", sym->name);

	str_append(&help, sym->help ? _(sym->help) : nohelp_text);
	str_append(&help, "\n");
	get_symbol_str(&help, sym);
	show_helptext(menu_get_prompt(menu), str_get(&help));
	str_free(&help);

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux