summaryrefslogtreecommitdiffstats
path: root/tests/libqos/ahci.c
diff options
context:
space:
mode:
authorJohn Snow2016-01-11 20:10:42 +0100
committerJohn Snow2016-01-11 20:10:42 +0100
commitd0b282a58c86ea86a2662e6f796a54a86a457dae (patch)
tree1155c5b847e5db016a39861f360ef502c7214862 /tests/libqos/ahci.c
parentlibqos/ahci: ATAPI support (diff)
downloadqemu-d0b282a58c86ea86a2662e6f796a54a86a457dae.tar.gz
qemu-d0b282a58c86ea86a2662e6f796a54a86a457dae.tar.xz
qemu-d0b282a58c86ea86a2662e6f796a54a86a457dae.zip
libqos/ahci: ATAPI identify
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-4-git-send-email-jsnow@redhat.com
Diffstat (limited to 'tests/libqos/ahci.c')
-rw-r--r--tests/libqos/ahci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c
index 4bdde4c1a7..276a466d83 100644
--- a/tests/libqos/ahci.c
+++ b/tests/libqos/ahci.c
@@ -114,6 +114,11 @@ void ahci_free(AHCIQState *ahci, uint64_t addr)
qfree(ahci->parent, addr);
}
+bool is_atapi(AHCIQState *ahci, uint8_t port)
+{
+ return ahci_px_rreg(ahci, port, AHCI_PX_SIG) == AHCI_SIGNATURE_CDROM;
+}
+
/**
* Locate, verify, and return a handle to the AHCI device.
*/