aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/ahci.h
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-01-19 15:16:02 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2015-02-16 15:02:10 +0000
commitf3dd2da4cc8c17921cb50920600adafb02959abf (patch)
treee4e8ff7f8c55f88296e7d4e27c0a4c2f00f34c7d /tests/libqos/ahci.h
parent1a8bba4ddce44cff33bfd3d4976fb33923c06a1b (diff)
qtest/ahci: Bookmark FB and CLB pointers
Instead of re-querying the AHCI device for the FB and CLB buffers, save the pointer we gave to the device during initialization and reference these values instead. [Peter Maydell <peter.maydell@linaro.org> reported the following clang compiler warnings: tests/libqos/ahci.c:256:40: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_test_message("CLB: 0x%08lx", ahci->port[i].clb); tests/libqos/ahci.c:264:39: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_test_message("FB: 0x%08lx", ahci->port[i].fb); The commit moved from uint32_t to uint64_t, so PRIx64 should be used for the format specifier. --Stefan] Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1421698563-6977-15-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos/ahci.h')
-rw-r--r--tests/libqos/ahci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h
index 645f05b9c4..72c39bcefa 100644
--- a/tests/libqos/ahci.h
+++ b/tests/libqos/ahci.h
@@ -245,6 +245,11 @@
/*** Structures ***/
+typedef struct AHCIPortQState {
+ uint64_t fb;
+ uint64_t clb;
+} AHCIPortQState;
+
typedef struct AHCIQState {
QOSState *parent;
QPCIDevice *dev;
@@ -253,6 +258,7 @@ typedef struct AHCIQState {
uint32_t fingerprint;
uint32_t cap;
uint32_t cap2;
+ AHCIPortQState port[32];
} AHCIQState;
/**