add an init function parameter to qemu_chr_open()