]> xenbits.xensource.com Git - libvirt.git/commit
virpcimock: Move actions checking one level up
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Jun 2019 15:33:06 +0000 (17:33 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Sat, 17 Aug 2019 09:05:30 +0000 (11:05 +0200)
commit038e6f069f7a651b578daf6fb8e3919761ff37f0
tree3c0555299818cfbfe4068fcce120b83d394bda71
parent39de732aa728ae9b8a9414ad08b8d0ee7ed02732
virpcimock: Move actions checking one level up

The pci_driver_bind() and pci_driver_unbind() functions are
"internal implementation", meaning other parts of the code should
be able to call them and get the job done. Checking for actions
(PCI_ACTION_BIND and PCI_ACTION_UNBIND) should be done in
handlers (pci_driver_handle_bind() and
pci_driver_handle_unbind()). Surprisingly, the other two actions
(PCI_ACTION_NEW_ID and PCI_ACTION_REMOVE_ID) are checked already
at this level.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
tests/virpcimock.c