From patchwork Fri Jun 7 11:58:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 249697 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 368742C0098 for ; Fri, 7 Jun 2013 22:49:34 +1000 (EST) Received: from localhost ([::1]:54721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvRM-0002gz-4U for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2013 08:06:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvKT-0001n6-II for qemu-devel@nongnu.org; Fri, 07 Jun 2013 07:59:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkvKP-0004Ny-5L for qemu-devel@nongnu.org; Fri, 07 Jun 2013 07:59:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvKO-0004Nn-Tx for qemu-devel@nongnu.org; Fri, 07 Jun 2013 07:59:33 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r57BxWHd001615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Jun 2013 07:59:32 -0400 Received: from localhost (ovpn-112-30.ams2.redhat.com [10.36.112.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r57BxUml030632; Fri, 7 Jun 2013 07:59:31 -0400 From: Stefan Hajnoczi To: Date: Fri, 7 Jun 2013 13:58:38 +0200 Message-Id: <1370606325-10680-20-git-send-email-stefanha@redhat.com> In-Reply-To: <1370606325-10680-1-git-send-email-stefanha@redhat.com> References: <1370606325-10680-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi Subject: [Qemu-devel] [PULL 19/26] 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 From: Kevin Wolf Get rid of the magic number. Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- 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);