From patchwork Wed Jun 5 13:17:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 249045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F051B2C00A0 for ; Wed, 5 Jun 2013 23:18:52 +1000 (EST) Received: from localhost ([::1]:40123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDc2-0001j6-VQ for incoming@patchwork.ozlabs.org; Wed, 05 Jun 2013 09:18:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDbO-0001Ua-Jj for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:18:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkDbL-0000rM-4A for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:18:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkDbK-0000rH-SY for qemu-devel@nongnu.org; Wed, 05 Jun 2013 09:18:07 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r55DI6h6017559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Jun 2013 09:18:06 -0400 Received: from dhcp-200-207.str.redhat.com (dhcp-192-246.str.redhat.com [10.33.192.246]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r55DI2A5025881; Wed, 5 Jun 2013 09:18:05 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Wed, 5 Jun 2013 15:17:56 +0200 Message-Id: <1370438278-1703-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1370438278-1703-1-git-send-email-kwolf@redhat.com> References: <1370438278-1703-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, afaerber@suse.de, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v2 2/4] ide-test: Add enum value for DEV X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Get rid of the magic number. Signed-off-by: Kevin Wolf --- tests/ide-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ide-test.c b/tests/ide-test.c index 365e995..1c31a2e 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);