diff options
author | Ron Yorston <rmy@pobox.com> | 2019-01-10 08:38:15 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-01-10 08:38:15 +0000 |
commit | f99a280743e877c14ee90a3f9e93a34ca3476a27 (patch) | |
tree | 60ca3d17596e190c8c7cbca587168946598bee8a /scripts | |
parent | 40d5dd07ea1f290eaed30a03fd598e33a8eaf495 (diff) | |
parent | 6ca8e347fed8c24655df692f22694baf7c572770 (diff) | |
download | busybox-w32-f99a280743e877c14ee90a3f9e93a34ca3476a27.tar.gz busybox-w32-f99a280743e877c14ee90a3f9e93a34ca3476a27.tar.bz2 busybox-w32-f99a280743e877c14ee90a3f9e93a34ca3476a27.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/basic/split-include.c | 3 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/lxdialog.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 7 |
4 files changed, 12 insertions, 6 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index 8127fe261..9a9260f2c 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -133,7 +133,8 @@ int main(int argc, const char * argv []) | |||
133 | is_same = 0; | 133 | is_same = 0; |
134 | if ((fp_target = fopen(ptarget, "r")) != NULL) | 134 | if ((fp_target = fopen(ptarget, "r")) != NULL) |
135 | { | 135 | { |
136 | fgets(old_line, buffer_size, fp_target); | 136 | if (!fgets(old_line, buffer_size, fp_target)) |
137 | ERROR_EXIT(ptarget); | ||
137 | if (fclose(fp_target) != 0) | 138 | if (fclose(fp_target) != 0) |
138 | ERROR_EXIT(ptarget); | 139 | ERROR_EXIT(ptarget); |
139 | if (!strcmp(line, old_line)) | 140 | if (!strcmp(line, old_line)) |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index f69591c69..80bd55a68 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -142,7 +142,8 @@ static void conf_askvalue(struct symbol *sym, const char *def) | |||
142 | check_stdin(); | 142 | check_stdin(); |
143 | case ask_all: | 143 | case ask_all: |
144 | fflush(stdout); | 144 | fflush(stdout); |
145 | fgets(line, 128, stdin); | 145 | if (!fgets(line, 128, stdin)) |
146 | exit(1); | ||
146 | return; | 147 | return; |
147 | case set_default: | 148 | case set_default: |
148 | printf("%s\n", def); | 149 | printf("%s\n", def); |
@@ -395,7 +396,8 @@ static int conf_choice(struct menu *menu) | |||
395 | check_stdin(); | 396 | check_stdin(); |
396 | case ask_all: | 397 | case ask_all: |
397 | fflush(stdout); | 398 | fflush(stdout); |
398 | fgets(line, 128, stdin); | 399 | if (!fgets(line, 128, stdin)) |
400 | exit(1); | ||
399 | strip(line); | 401 | strip(line); |
400 | if (line[0] == '?') { | 402 | if (line[0] == '?') { |
401 | printf("\n%s\n", menu->sym->help ? | 403 | printf("\n%s\n", menu->sym->help ? |
diff --git a/scripts/kconfig/lxdialog/lxdialog.c b/scripts/kconfig/lxdialog/lxdialog.c index 79f6c5fb5..5b8e3e947 100644 --- a/scripts/kconfig/lxdialog/lxdialog.c +++ b/scripts/kconfig/lxdialog/lxdialog.c | |||
@@ -189,7 +189,7 @@ int j_inputbox(const char *t, int ac, const char *const *av) | |||
189 | int ret = dialog_inputbox(t, av[2], atoi(av[3]), atoi(av[4]), | 189 | int ret = dialog_inputbox(t, av[2], atoi(av[3]), atoi(av[4]), |
190 | ac == 6 ? av[5] : (char *)NULL); | 190 | ac == 6 ? av[5] : (char *)NULL); |
191 | if (ret == 0) | 191 | if (ret == 0) |
192 | fprintf(stderr, dialog_input_result); | 192 | fprintf(stderr, "%s", dialog_input_result); |
193 | return ret; | 193 | return ret; |
194 | } | 194 | } |
195 | 195 | ||
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 9fc837c9f..cda0473ac 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -498,7 +498,8 @@ static int exec_conf(void) | |||
498 | 498 | ||
499 | *argptr++ = NULL; | 499 | *argptr++ = NULL; |
500 | 500 | ||
501 | pipe(pipefd); | 501 | if (pipe(pipefd)) |
502 | _exit(EXIT_FAILURE); | ||
502 | pid = fork(); | 503 | pid = fork(); |
503 | if (pid == 0) { | 504 | if (pid == 0) { |
504 | sigprocmask(SIG_SETMASK, &osset, NULL); | 505 | sigprocmask(SIG_SETMASK, &osset, NULL); |
@@ -863,9 +864,11 @@ static void conf(struct menu *menu) | |||
863 | static void show_textbox(const char *title, const char *text, int r, int c) | 864 | static void show_textbox(const char *title, const char *text, int r, int c) |
864 | { | 865 | { |
865 | int fd; | 866 | int fd; |
867 | int len = strlen(text); | ||
866 | 868 | ||
867 | fd = creat(".help.tmp", 0777); | 869 | fd = creat(".help.tmp", 0777); |
868 | write(fd, text, strlen(text)); | 870 | if (write(fd, text, len) != len) |
871 | exit(1); | ||
869 | close(fd); | 872 | close(fd); |
870 | show_file(".help.tmp", title, r, c); | 873 | show_file(".help.tmp", title, r, c); |
871 | unlink(".help.tmp"); | 874 | unlink(".help.tmp"); |