Skip to content

Commit 0954828

Browse files
committed
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
1 parent c55c9d5 commit 0954828

5 files changed

Lines changed: 11 additions & 26 deletions

File tree

‎scripts/kconfig/confdata.c‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -574,19 +574,17 @@ int conf_write(const char *name)
574574
if (!out)
575575
return 1;
576576

577-
sym = sym_lookup("KERNELVERSION", 0);
578-
sym_calc_value(sym);
579577
time(&now);
580578
env = getenv("KCONFIG_NOTIMESTAMP");
581579
if (env && *env)
582580
use_timestamp = 0;
583581

584582
fprintf(out, _("#\n"
585583
"# Automatically generated make config: don't edit\n"
586-
"# Linux kernel version: %s\n"
584+
"# %s\n"
587585
"%s%s"
588586
"#\n"),
589-
sym_get_string_value(sym),
587+
rootmenu.prompt->text,
590588
use_timestamp ? "# " : "",
591589
use_timestamp ? ctime(&now) : "");
592590

@@ -797,25 +795,23 @@ int conf_write_autoconf(void)
797795
return 1;
798796
}
799797

800-
sym = sym_lookup("KERNELVERSION", 0);
801-
sym_calc_value(sym);
802798
time(&now);
803799
fprintf(out, "#\n"
804800
"# Automatically generated make config: don't edit\n"
805-
"# Linux kernel version: %s\n"
801+
"# %s\n"
806802
"# %s"
807803
"#\n",
808-
sym_get_string_value(sym), ctime(&now));
804+
rootmenu.prompt->text, ctime(&now));
809805
fprintf(tristate, "#\n"
810806
"# Automatically generated - do not edit\n"
811807
"\n");
812808
fprintf(out_h, "/*\n"
813809
" * Automatically generated C config: don't edit\n"
814-
" * Linux kernel version: %s\n"
810+
" * %s\n"
815811
" * %s"
816812
" */\n"
817813
"#define AUTOCONF_INCLUDED\n",
818-
sym_get_string_value(sym), ctime(&now));
814+
rootmenu.prompt->text, ctime(&now));
819815

820816
for_all_symbols(i, sym) {
821817
sym_calc_value(sym);

‎scripts/kconfig/gconf.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)
133133
GladeXML *xml;
134134
GtkWidget *widget;
135135
GtkTextBuffer *txtbuf;
136-
char title[256];
137136
GtkStyle *style;
138137

139138
xml = glade_xml_new(glade_file, "window1", NULL);
@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)
210209
/*"style", PANGO_STYLE_OBLIQUE, */
211210
NULL);
212211

213-
sprintf(title, _("Linux Kernel v%s Configuration"),
214-
getenv("KERNELVERSION"));
215-
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
212+
gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
216213

217214
gtk_widget_show(main_wnd);
218215
}

‎scripts/kconfig/mconf.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename)
288288
{
289289
static char menu_backtitle[PATH_MAX+128];
290290
int size;
291-
struct symbol *sym;
292291

293-
sym = sym_lookup("KERNELVERSION", 0);
294-
sym_calc_value(sym);
295292
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
296-
_("%s - Linux Kernel v%s Configuration"),
297-
config_filename, sym_get_string_value(sym));
293+
"%s - %s", config_filename, rootmenu.prompt->text);
298294
if (size >= sizeof(menu_backtitle))
299295
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
300296
set_dialog_backtitle(menu_backtitle);

‎scripts/kconfig/nconf.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128];
633633
static const char *set_config_filename(const char *config_filename)
634634
{
635635
int size;
636-
struct symbol *sym;
637636

638-
sym = sym_lookup("KERNELVERSION", 0);
639-
sym_calc_value(sym);
640637
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
641-
_("%s - Linux Kernel v%s Configuration"),
642-
config_filename, sym_get_string_value(sym));
638+
"%s - %s", config_filename, rootmenu.prompt->text);
643639
if (size >= sizeof(menu_backtitle))
644640
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
645641

‎scripts/kconfig/qconf.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void)
12741274
char title[256];
12751275

12761276
QDesktopWidget *d = configApp->desktop();
1277-
snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"),
1278-
getenv("KERNELVERSION"),
1277+
snprintf(title, sizeof(title), "%s%s",
1278+
rootmenu.prompt->text,
12791279
#if QT_VERSION < 0x040000
12801280
" (Qt3)"
12811281
#else

0 commit comments

Comments
 (0)