Revision 1a688d3b

b/vl.c
4586 4586
    return 0;
4587 4587
}
4588 4588

  
4589
static int chardev_init_func(QemuOpts *opts, void *opaque)
4590
{
4591
    CharDriverState *chr;
4592

  
4593
    chr = qemu_chr_open_opts(opts, NULL);
4594
    if (!chr)
4595
        return -1;
4596
    return 0;
4597
}
4598

  
4589 4599
struct device_config {
4590 4600
    enum {
4591 4601
        DEV_USB,       /* -usbdevice   */
......
5180 5190
                    fprintf(stderr, "parse error: %s\n", optarg);
5181 5191
                    exit(1);
5182 5192
                }
5183
                if (qemu_chr_open_opts(opts, NULL) == NULL) {
5184
                    exit(1);
5185
                }
5186 5193
                break;
5187 5194
            case QEMU_OPTION_serial:
5188 5195
                if (serial_device_index >= MAX_SERIAL_PORTS) {
......
5501 5508
       }
5502 5509
    }
5503 5510

  
5511
    if (qemu_opts_foreach(&qemu_chardev_opts, chardev_init_func, NULL, 1) != 0)
5512
        exit(1);
5513

  
5504 5514
#ifndef _WIN32
5505 5515
    if (daemonize) {
5506 5516
	pid_t pid;

Also available in: Unified diff