| 721 | } |
| 722 | |
| 723 | int main(int ac, char **av) |
| 724 | { |
| 725 | const char *progname = av[0]; |
| 726 | int opt; |
| 727 | const char *name, *defconfig_file = NULL /* gcc uninit */; |
| 728 | const char *input_file = NULL, *output_file = NULL; |
| 729 | int no_conf_write = 0; |
| 730 | |
| 731 | tty_stdio = isatty(0) && isatty(1); |
| 732 | |
| 733 | while ((opt = getopt_long(ac, av, "hr:w:s", long_opts, NULL)) != -1) { |
| 734 | switch (opt) { |
| 735 | case 'h': |
| 736 | conf_usage(progname); |
| 737 | exit(1); |
| 738 | break; |
| 739 | case 'r': |
| 740 | input_file = optarg; |
| 741 | break; |
| 742 | case 's': |
| 743 | conf_set_message_callback(NULL); |
| 744 | break; |
| 745 | case 'w': |
| 746 | output_file = optarg; |
| 747 | break; |
| 748 | case 0: |
| 749 | switch (input_mode_opt) { |
| 750 | case syncconfig: |
| 751 | /* |
| 752 | * syncconfig is invoked during the build stage. |
| 753 | * Suppress distracting |
| 754 | * "configuration written to ..." |
| 755 | */ |
| 756 | conf_set_message_callback(NULL); |
| 757 | sync_kconfig = 1; |
| 758 | break; |
| 759 | case defconfig: |
| 760 | case savedefconfig: |
| 761 | defconfig_file = optarg; |
| 762 | break; |
| 763 | case randconfig: |
| 764 | set_randconfig_seed(); |
| 765 | break; |
| 766 | case fatalrecursive: |
| 767 | recursive_is_error = 1; |
| 768 | continue; |
| 769 | default: |
| 770 | break; |
| 771 | } |
| 772 | input_mode = input_mode_opt; |
| 773 | default: |
| 774 | break; |
| 775 | } |
| 776 | } |
| 777 | if (ac == optind) { |
| 778 | fprintf(stderr, "%s: Kconfig file missing\n", av[0]); |
| 779 | conf_usage(progname); |
| 780 | exit(1); |
nothing calls this directly
no test coverage detected