Revision 292444cb vl.c

b/vl.c
4730 4730
#endif
4731 4731
    CPUState *env;
4732 4732
    int show_vnc_port = 0;
4733
    int defconfig = 1;
4733 4734

  
4734 4735
    init_clocks();
4735 4736

  
......
4789 4790
    tb_size = 0;
4790 4791
    autostart= 1;
4791 4792

  
4793
    /* first pass of option parsing */
4794
    optind = 1;
4795
    while (optind < argc) {
4796
        if (argv[optind][0] != '-') {
4797
            /* disk image */
4798
            continue;
4799
        } else {
4800
            const QEMUOption *popt;
4801

  
4802
            popt = lookup_opt(argc, argv, &optarg, &optind);
4803
            switch (popt->index) {
4804
            case QEMU_OPTION_nodefconfig:
4805
                defconfig=0;
4806
                break;
4807
            }
4808
        }
4809
    }
4810

  
4811
    if (defconfig) {
4812
        FILE *fp;
4813
        fp = fopen(CONFIG_QEMU_CONFDIR "/qemu.conf", "r");
4814
        if (fp) {
4815
            if (qemu_config_parse(fp) != 0) {
4816
                exit(1);
4817
            }
4818
            fclose(fp);
4819
        }
4820

  
4821
        fp = fopen(CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf", "r");
4822
        if (fp) {
4823
            if (qemu_config_parse(fp) != 0) {
4824
                exit(1);
4825
            }
4826
            fclose(fp);
4827
        }
4828
    }
4829

  
4830
    /* second pass of option parsing */
4792 4831
    optind = 1;
4793 4832
    for(;;) {
4794 4833
        if (optind >= argc)

Also available in: Unified diff