aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic/fixdep.c13
-rw-r--r--scripts/basic/split-include.c7
-rw-r--r--scripts/echo.c2
-rw-r--r--scripts/kconfig/lxdialog/check-lxdialog.sh2
-rwxr-xr-xscripts/mkconfigs3
5 files changed, 16 insertions, 11 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index bbb575cec..1a5b10f84 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -243,22 +243,27 @@ void parse_config_file(char *map, size_t len)
243 if (!memcmp(p, "IF_NOT", 6)) goto conf7; 243 if (!memcmp(p, "IF_NOT", 6)) goto conf7;
244 } 244 }
245 /* we have at least 3 chars because of p <= end_3 */ 245 /* we have at least 3 chars because of p <= end_3 */
246 /*if (!memcmp(p, "IF_", 3)) goto conf3;*/ 246 /*if (!memcmp(p, "IF_", 3)) ...*/
247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') goto conf3; 247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') {
248 off = 3;
249 goto conf;
250 }
248 251
249 /* This identifier is not interesting, skip it */ 252 /* This identifier is not interesting, skip it */
250 while (p <= end_3 && (isalnum(*p) || *p == '_')) 253 while (p <= end_3 && (isalnum(*p) || *p == '_'))
251 p++; 254 p++;
252 continue; 255 continue;
253 256
254 conf3: off = 3;
255 conf7: off = 7; 257 conf7: off = 7;
258 conf:
256 p += off; 259 p += off;
257 for (q = p; q < end_3+3; q++) { 260 for (q = p; q < end_3+3; q++) {
258 if (!(isalnum(*q) || *q == '_')) 261 if (!(isalnum(*q) || *q == '_'))
259 break; 262 break;
260 } 263 }
261 use_config(p, q-p); 264 if (q != p) {
265 use_config(p, q-p);
266 }
262 } 267 }
263} 268}
264 269
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c
index 60934b5b1..e328788e2 100644
--- a/scripts/basic/split-include.c
+++ b/scripts/basic/split-include.c
@@ -110,11 +110,12 @@ int main(int argc, const char * argv [])
110 110
111 if (line[0] != '#') 111 if (line[0] != '#')
112 continue; 112 continue;
113 if ((str_config = strstr(line, "CONFIG_")) == NULL) 113 if ((str_config = strstr(line, " CONFIG_")) == NULL)
114 continue; 114 continue;
115 115
116 /* Make the output file name. */ 116 /* We found #define CONFIG_foo or #undef CONFIG_foo.
117 str_config += sizeof("CONFIG_") - 1; 117 * Make the output file name. */
118 str_config += sizeof(" CONFIG_") - 1;
118 for (itarget = 0; !isspace(str_config[itarget]); itarget++) 119 for (itarget = 0; !isspace(str_config[itarget]); itarget++)
119 { 120 {
120 int c = (unsigned char) str_config[itarget]; 121 int c = (unsigned char) str_config[itarget];
diff --git a/scripts/echo.c b/scripts/echo.c
index 85a8aa913..3c45e339c 100644
--- a/scripts/echo.c
+++ b/scripts/echo.c
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
187 putchar('\n'); 187 putchar('\n');
188 } 188 }
189 ret: 189 ret:
190 return fflush_all(); 190 return fflush(NULL);
191} 191}
192 192
193/*- 193/*-
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index acabe385c..d34dfd46d 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -56,7 +56,7 @@ EOF
56} 56}
57 57
58usage() { 58usage() {
59 printf "Usage: $0 [-check compiler options|-header|-library]\n" 59 printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n"
60} 60}
61 61
62if [ $# -eq 0 ]; then 62if [ $# -eq 0 ]; then
diff --git a/scripts/mkconfigs b/scripts/mkconfigs
index 0d1771a36..ef6ae8aaf 100755
--- a/scripts/mkconfigs
+++ b/scripts/mkconfigs
@@ -42,9 +42,8 @@ echo "\
42 * 42 *
43 * This file is generated automatically by scripts/mkconfigs. 43 * This file is generated automatically by scripts/mkconfigs.
44 * Do not edit. 44 * Do not edit.
45 *
46 */ 45 */
47static const char *const bbconfig_config =" 46static const char bbconfig_config[] ="
48 47
49sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' 48sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
50 49