qemu/hw/char/parallel.c
/* If fd is zero, it means that the parallel device uses the console */
If fd is zero, it means that the parallel device uses the console
If fd is zero it means that the parallel device uses the console
bool parallel_mm_init(MemoryRegion *address_space,
                      hwaddr base, int it_shift, qemu_irq irq,
                      Chardev *chr)
{
    ParallelState *s;
    s = g_malloc0(sizeof(ParallelState));
    s->irq = irq;
    qemu_chr_fe_init(&s->chr, chr, &error_abort);
    s->it_shift = it_shift;
    qemu_register_reset(parallel_reset, s);
    memory_region_init_io(&s->iomem, NULL, &parallel_mm_ops, s,
                          "parallel", 8 << it_shift);
    memory_region_add_subregion(address_space, base, &s->iomem);
    return true;
}
bool parallel_mm_init ( MemoryRegion * address_space , hwaddr base , int it_shift , qemu_irq irq , Chardev * chr ) { ParallelState * s ; s = g_malloc0 ( sizeof ( ParallelState ) ) ; s -> irq = irq ; qemu_chr_fe_init ( & s -> chr , chr , & error_abort ) ; s -> it_shift = it_shift ; qemu_register_reset ( parallel_reset , s ) ; memory_region_init_io ( & s -> iomem , NULL , & parallel_mm_ops , s , " " , 8 << it_shift ) ; memory_region_add_subregion ( address_space , base , & s -> iomem ) ; return true ; }
If fd is zero, it means that the parallel device uses the console
If fd is zero it means that the parallel device uses the console