958e1b
From bfc4f8a432d111a63ae2a5bf9846b2b3413c2479 Mon Sep 17 00:00:00 2001
958e1b
From: Kevin Wolf <kwolf@redhat.com>
958e1b
Date: Wed, 10 Sep 2014 11:06:07 +0200
958e1b
Subject: [PATCH 08/12] ide-test: Add enum value for DEV
958e1b
958e1b
Message-id: <1410347169-4368-2-git-send-email-kwolf@redhat.com>
958e1b
Patchwork-id: 60953
958e1b
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/3] ide-test: Add enum value for DEV
958e1b
Bugzilla: 1123372
958e1b
RH-Acked-by: Max Reitz <mreitz@redhat.com>
958e1b
RH-Acked-by: Fam Zheng <famz@redhat.com>
958e1b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
958e1b
Get rid of the magic number.
958e1b
958e1b
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
958e1b
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
(cherry picked from commit c27d565604038c1572b16dd1cd06e277e6ef02e2)
958e1b
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
958e1b
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
---
958e1b
 tests/ide-test.c |    3 ++-
958e1b
 1 files changed, 2 insertions(+), 1 deletions(-)
958e1b
958e1b
diff --git a/tests/ide-test.c b/tests/ide-test.c
958e1b
index 177ab00..ac59259 100644
958e1b
--- a/tests/ide-test.c
958e1b
+++ b/tests/ide-test.c
958e1b
@@ -64,6 +64,7 @@ enum {
958e1b
 };
958e1b
 
958e1b
 enum {
958e1b
+    DEV     = 0x10,
958e1b
     LBA     = 0x40,
958e1b
 };
958e1b
 
958e1b
@@ -394,7 +395,7 @@ static void test_identify(void)
958e1b
 
958e1b
     /* Read in the IDENTIFY buffer and check registers */
958e1b
     data = inb(IDE_BASE + reg_device);
958e1b
-    g_assert_cmpint(data & 0x10, ==, 0);
958e1b
+    g_assert_cmpint(data & DEV, ==, 0);
958e1b
 
958e1b
     for (i = 0; i < 256; i++) {
958e1b
         data = inb(IDE_BASE + reg_status);
958e1b
-- 
958e1b
1.7.1
958e1b