Revision c845f401 qemu-char.c

b/qemu-char.c
2416 2416
    CharDriverState *chr;
2417 2417
    QemuOpts *opts;
2418 2418

  
2419
    if (strstart(filename, "chardev:", &p)) {
2420
        return qemu_chr_find(p);
2421
    }
2422

  
2419 2423
    opts = qemu_chr_parse_compat(label, filename);
2420 2424
    if (!opts)
2421 2425
        return NULL;
......
2445 2449
        monitor_printf(mon, "%s: filename=%s\n", chr->label, chr->filename);
2446 2450
    }
2447 2451
}
2452

  
2453
CharDriverState *qemu_chr_find(const char *name)
2454
{
2455
    CharDriverState *chr;
2456

  
2457
    TAILQ_FOREACH(chr, &chardevs, next) {
2458
        if (strcmp(chr->label, name) != 0)
2459
            continue;
2460
        return chr;
2461
    }
2462
    return NULL;
2463
}

Also available in: Unified diff