summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-06-05 15:17:56 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2013-06-06 11:27:24 +0200
commitc27d565604038c1572b16dd1cd06e277e6ef02e2 (patch)
treeb1780320e4514ab36a6eea4d91dd84f902ca7db1
parentbf736fe34caba0688c9095c31b9d097ea15c1296 (diff)
downloadfocaccia-qemu-c27d565604038c1572b16dd1cd06e277e6ef02e2.tar.gz
focaccia-qemu-c27d565604038c1572b16dd1cd06e277e6ef02e2.zip
ide-test: Add enum value for DEV
Get rid of the magic number.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--tests/ide-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/ide-test.c b/tests/ide-test.c
index 365e9959ff..1c31a2e0ba 100644
--- a/tests/ide-test.c
+++ b/tests/ide-test.c
@@ -64,6 +64,7 @@ enum {
 };
 
 enum {
+    DEV     = 0x10,
     LBA     = 0x40,
 };
 
@@ -394,7 +395,7 @@ static void test_identify(void)
 
     /* Read in the IDENTIFY buffer and check registers */
     data = inb(IDE_BASE + reg_device);
-    g_assert_cmpint(data & 0x10, ==, 0);
+    g_assert_cmpint(data & DEV, ==, 0);
 
     for (i = 0; i < 256; i++) {
         data = inb(IDE_BASE + reg_status);