• M
    virtio-input: Fix device introspection on non-Linux hosts · c6047e96
    Markus Armbruster 提交于
    When CONFIG_LINUX is off, devices "virtio-keyboard-device",
    "virtio-mouse-device", "virtio-tablet-device" and
    "virtio-input-host-device" aren't compiled in, yet
    "virtio-keyboard-pci", "virtio-mouse-pci", "virtio-tablet-pci" and
    "virtio-input-host-pci" still are.  Attempts to introspect them crash,
    e.g.
    
        $ qemu-system-x86_64 -device virtio-tablet-pci,help
        **
        ERROR:/work/armbru/qemu/qom/object.c:333:object_initialize_with_type: assertion failed: (type != NULL)
    
    Broken in commit 710e2d90 and commit 006a5ede.
    
    Fix by compiling the "virtio-FOO-pci" exactly when compiling the
    "virtio-FOO-device": compile "virtio-keyboard-device",
    "virtio-mouse-device", "virtio-tablet-device" regardless of
    CONFIG_LINUX, and compile "virtio-input-host-pci" only for
    CONFIG_LINUX.
    Reported-by: NPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
    Message-Id: <1444320700-26260-3-git-send-email-armbru@redhat.com>
    c6047e96
Makefile.objs 638 字节