From bfc4f8a432d111a63ae2a5bf9846b2b3413c2479 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 10 Sep 2014 11:06:07 +0200
Subject: [PATCH 08/12] ide-test: Add enum value for DEV

Message-id: <1410347169-4368-2-git-send-email-kwolf@redhat.com>
Patchwork-id: 60953
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/3] ide-test: Add enum value for DEV
Bugzilla: 1123372
RH-Acked-by: Max Reitz <mreitz@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

Get rid of the magic number.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit c27d565604038c1572b16dd1cd06e277e6ef02e2)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 tests/ide-test.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tests/ide-test.c b/tests/ide-test.c
index 177ab00..ac59259 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);
-- 
1.7.1