Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6a19492f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6a19492f
编写于
8月 31, 2011
作者:
M
Michal Marek
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'kconfig/for-next' of
git://github.com/lacombar/linux-2.6
into kbuild/kconfig
上级
db57630b
702a9450
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
89 addition
and
49 deletion
+89
-49
scripts/kconfig/confdata.c
scripts/kconfig/confdata.c
+36
-13
scripts/kconfig/lxdialog/textbox.c
scripts/kconfig/lxdialog/textbox.c
+1
-2
scripts/kconfig/mconf.c
scripts/kconfig/mconf.c
+52
-34
未找到文件。
scripts/kconfig/confdata.c
浏览文件 @
6a19492f
...
...
@@ -503,17 +503,6 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
fprintf
(
fp
,
"#define %s%s%s 1
\n
"
,
CONFIG_
,
sym
->
name
,
suffix
);
}
/*
* Generate the __enabled_CONFIG_* and
* __enabled_CONFIG_*_MODULE macros for use by the
* IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is
* generated even for booleans so that the IS_ENABLED() macro
* works.
*/
fprintf
(
fp
,
"#define __enabled_"
CONFIG_
"%s %d
\n
"
,
sym
->
name
,
(
*
value
==
'y'
));
fprintf
(
fp
,
"#define __enabled_"
CONFIG_
"%s_MODULE %d
\n
"
,
sym
->
name
,
(
*
value
==
'm'
));
break
;
}
case
S_HEX
:
{
...
...
@@ -564,6 +553,35 @@ static struct conf_printer header_printer_cb =
.
print_comment
=
header_print_comment
,
};
/*
* Generate the __enabled_CONFIG_* and __enabled_CONFIG_*_MODULE macros for
* use by the IS_{ENABLED,BUILTIN,MODULE} macros. The _MODULE variant is
* generated even for booleans so that the IS_ENABLED() macro works.
*/
static
void
header_print__enabled_symbol
(
FILE
*
fp
,
struct
symbol
*
sym
,
const
char
*
value
,
void
*
arg
)
{
switch
(
sym
->
type
)
{
case
S_BOOLEAN
:
case
S_TRISTATE
:
{
fprintf
(
fp
,
"#define __enabled_"
CONFIG_
"%s %d
\n
"
,
sym
->
name
,
(
*
value
==
'y'
));
fprintf
(
fp
,
"#define __enabled_"
CONFIG_
"%s_MODULE %d
\n
"
,
sym
->
name
,
(
*
value
==
'm'
));
break
;
}
default:
break
;
}
}
static
struct
conf_printer
header__enabled_printer_cb
=
{
.
print_symbol
=
header_print__enabled_symbol
,
.
print_comment
=
header_print_comment
,
};
/*
* Tristate printer
*
...
...
@@ -945,11 +963,16 @@ int conf_write_autoconf(void)
conf_write_heading
(
out_h
,
&
header_printer_cb
,
NULL
);
for_all_symbols
(
i
,
sym
)
{
if
(
!
sym
->
name
)
continue
;
sym_calc_value
(
sym
);
if
(
!
(
sym
->
flags
&
SYMBOL_WRITE
)
||
!
sym
->
name
)
conf_write_symbol
(
out_h
,
sym
,
&
header__enabled_printer_cb
,
NULL
);
if
(
!
(
sym
->
flags
&
SYMBOL_WRITE
))
continue
;
/* write symbol to auto.conf, tristate and header files */
conf_write_symbol
(
out
,
sym
,
&
kconfig_printer_cb
,
(
void
*
)
1
);
conf_write_symbol
(
tristate
,
sym
,
&
tristate_printer_cb
,
(
void
*
)
1
);
...
...
scripts/kconfig/lxdialog/textbox.c
浏览文件 @
6a19492f
...
...
@@ -320,7 +320,6 @@ static void print_page(WINDOW * win, int height, int width)
*/
static
void
print_line
(
WINDOW
*
win
,
int
row
,
int
width
)
{
int
y
,
x
;
char
*
line
;
line
=
get_line
();
...
...
@@ -329,10 +328,10 @@ static void print_line(WINDOW * win, int row, int width)
waddch
(
win
,
' '
);
waddnstr
(
win
,
line
,
MIN
(
strlen
(
line
),
width
-
2
));
getyx
(
win
,
y
,
x
);
/* Clear 'residue' of previous line */
#if OLD_NCURSES
{
int
x
=
getcurx
(
win
);
int
i
;
for
(
i
=
0
;
i
<
width
-
x
;
i
++
)
waddch
(
win
,
' '
);
...
...
scripts/kconfig/mconf.c
浏览文件 @
6a19492f
...
...
@@ -15,6 +15,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <locale.h>
...
...
@@ -272,6 +273,7 @@ static struct menu *current_menu;
static
int
child_count
;
static
int
single_menu_mode
;
static
int
show_all_options
;
static
int
saved_x
,
saved_y
;
static
void
conf
(
struct
menu
*
menu
);
static
void
conf_choice
(
struct
menu
*
menu
);
...
...
@@ -792,9 +794,54 @@ static void conf_save(void)
}
}
static
int
handle_exit
(
void
)
{
int
res
;
dialog_clear
();
if
(
conf_get_changed
())
res
=
dialog_yesno
(
NULL
,
_
(
"Do you wish to save your new configuration ?
\n
"
"<ESC><ESC> to continue."
),
6
,
60
);
else
res
=
-
1
;
end_dialog
(
saved_x
,
saved_y
);
switch
(
res
)
{
case
0
:
if
(
conf_write
(
filename
))
{
fprintf
(
stderr
,
_
(
"
\n\n
"
"Error while writing of the configuration.
\n
"
"Your configuration changes were NOT saved."
"
\n\n
"
));
return
1
;
}
/* fall through */
case
-
1
:
printf
(
_
(
"
\n\n
"
"*** End of the configuration.
\n
"
"*** Execute 'make' to start the build or try 'make help'."
"
\n\n
"
));
res
=
0
;
break
;
default:
fprintf
(
stderr
,
_
(
"
\n\n
"
"Your configuration changes were NOT saved."
"
\n\n
"
));
}
return
res
;
}
static
void
sig_handler
(
int
signo
)
{
exit
(
handle_exit
());
}
int
main
(
int
ac
,
char
**
av
)
{
int
saved_x
,
saved_y
;
char
*
mode
;
int
res
;
...
...
@@ -802,6 +849,8 @@ int main(int ac, char **av)
bindtextdomain
(
PACKAGE
,
LOCALEDIR
);
textdomain
(
PACKAGE
);
signal
(
SIGINT
,
sig_handler
);
conf_parse
(
av
[
1
]);
conf_read
(
NULL
);
...
...
@@ -823,40 +872,9 @@ int main(int ac, char **av)
set_config_filename
(
conf_get_configname
());
do
{
conf
(
&
rootmenu
);
dialog_clear
();
if
(
conf_get_changed
())
res
=
dialog_yesno
(
NULL
,
_
(
"Do you wish to save your "
"new configuration?
\n
"
"<ESC><ESC> to continue."
),
6
,
60
);
else
res
=
-
1
;
res
=
handle_exit
();
}
while
(
res
==
KEY_ESC
);
end_dialog
(
saved_x
,
saved_y
);
switch
(
res
)
{
case
0
:
if
(
conf_write
(
filename
))
{
fprintf
(
stderr
,
_
(
"
\n\n
"
"Error while writing of the configuration.
\n
"
"Your configuration changes were NOT saved."
"
\n\n
"
));
return
1
;
}
/* fall through */
case
-
1
:
printf
(
_
(
"
\n\n
"
"*** End of the configuration.
\n
"
"*** Execute 'make' to start the build or try 'make help'."
"
\n\n
"
));
break
;
default:
fprintf
(
stderr
,
_
(
"
\n\n
"
"Your configuration changes were NOT saved."
"
\n\n
"
));
}
return
0
;
return
res
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录