Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

- rename lexer and parse files

- fix 'Save as' menu of xconfig

* tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: fix 'Save As' menu of xconfig
kconfig: rename zconf.y to parser.y
kconfig: rename zconf.l to lexer.l

+44 -14
+5 -4
scripts/kconfig/Makefile
··· 143 143 144 144 # =========================================================================== 145 145 # object files used by all kconfig flavours 146 - common-objs := confdata.o expr.o symbol.o preprocess.o zconf.lex.o zconf.tab.o 146 + common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \ 147 + symbol.o 147 148 148 - $(obj)/zconf.lex.o: $(obj)/zconf.tab.h 149 - HOSTCFLAGS_zconf.lex.o := -I$(src) 150 - HOSTCFLAGS_zconf.tab.o := -I$(src) 149 + $(obj)/lexer.lex.o: $(obj)/parser.tab.h 150 + HOSTCFLAGS_lexer.lex.o := -I$(src) 151 + HOSTCFLAGS_parser.tab.o := -I$(src) 151 152 152 153 # conf: Used for defconfig, oldconfig and related targets 153 154 hostprogs-y += conf
+1 -1
scripts/kconfig/expr.h
··· 172 172 * int "BAZ Value" 173 173 * range 1..255 174 174 * 175 - * Please, also check zconf.y:print_symbol() when modifying the 175 + * Please, also check parser.y:print_symbol() when modifying the 176 176 * list of property types! 177 177 */ 178 178 enum prop_type {
+1 -1
scripts/kconfig/lkc.h
··· 90 90 char *xstrdup(const char *s); 91 91 char *xstrndup(const char *s, size_t n); 92 92 93 - /* zconf.l */ 93 + /* lexer.l */ 94 94 int yylex(void); 95 95 96 96 struct gstr {
+35 -7
scripts/kconfig/qconf.cc
··· 1392 1392 conf_set_changed_callback(conf_changed); 1393 1393 // Set saveAction's initial state 1394 1394 conf_changed(); 1395 + configname = xstrdup(conf_get_configname()); 1396 + 1395 1397 QAction *saveAsAction = new QAction("Save &As...", this); 1396 1398 connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs())); 1397 1399 QAction *searchAction = new QAction("&Find", this); ··· 1522 1520 1523 1521 void ConfigMainWindow::loadConfig(void) 1524 1522 { 1525 - QString s = QFileDialog::getOpenFileName(this, "", conf_get_configname()); 1526 - if (s.isNull()) 1523 + QString str; 1524 + QByteArray ba; 1525 + const char *name; 1526 + 1527 + str = QFileDialog::getOpenFileName(this, "", configname); 1528 + if (str.isNull()) 1527 1529 return; 1528 - if (conf_read(QFile::encodeName(s))) 1530 + 1531 + ba = str.toLocal8Bit(); 1532 + name = ba.data(); 1533 + 1534 + if (conf_read(name)) 1529 1535 QMessageBox::information(this, "qconf", "Unable to load configuration!"); 1536 + 1537 + free(configname); 1538 + configname = xstrdup(name); 1539 + 1530 1540 ConfigView::updateListAll(); 1531 1541 } 1532 1542 1533 1543 bool ConfigMainWindow::saveConfig(void) 1534 1544 { 1535 - if (conf_write(NULL)) { 1545 + if (conf_write(configname)) { 1536 1546 QMessageBox::information(this, "qconf", "Unable to save configuration!"); 1537 1547 return false; 1538 1548 } ··· 1555 1541 1556 1542 void ConfigMainWindow::saveConfigAs(void) 1557 1543 { 1558 - QString s = QFileDialog::getSaveFileName(this, "", conf_get_configname()); 1559 - if (s.isNull()) 1544 + QString str; 1545 + QByteArray ba; 1546 + const char *name; 1547 + 1548 + str = QFileDialog::getSaveFileName(this, "", configname); 1549 + if (str.isNull()) 1560 1550 return; 1561 - saveConfig(); 1551 + 1552 + ba = str.toLocal8Bit(); 1553 + name = ba.data(); 1554 + 1555 + if (conf_write(name)) { 1556 + QMessageBox::information(this, "qconf", "Unable to save configuration!"); 1557 + } 1558 + conf_write_autoconf(0); 1559 + 1560 + free(configname); 1561 + configname = xstrdup(name); 1562 1562 } 1563 1563 1564 1564 void ConfigMainWindow::searchConfig(void)
+1
scripts/kconfig/qconf.h
··· 291 291 class ConfigMainWindow : public QMainWindow { 292 292 Q_OBJECT 293 293 294 + char *configname; 294 295 static QAction *saveAction; 295 296 static void conf_changed(void); 296 297 public:
+1 -1
scripts/kconfig/zconf.l scripts/kconfig/lexer.l
··· 15 15 #include <unistd.h> 16 16 17 17 #include "lkc.h" 18 - #include "zconf.tab.h" 18 + #include "parser.tab.h" 19 19 20 20 #define YY_DECL static int yylex1(void) 21 21
scripts/kconfig/zconf.y scripts/kconfig/parser.y