From patchwork Fri Sep 11 00:19:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7156671 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A557B9F39B for ; Fri, 11 Sep 2015 00:25:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D245720836 for ; Fri, 11 Sep 2015 00:25:32 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C42C620834 for ; Fri, 11 Sep 2015 00:25:31 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B77F41831D6; Thu, 10 Sep 2015 17:25:31 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id 2D59E1831C0 for ; Thu, 10 Sep 2015 17:25:30 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 10 Sep 2015 17:25:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,508,1437462000"; d="scan'208";a="766678116" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.137]) by orsmga001.jf.intel.com with ESMTP; 10 Sep 2015 17:25:13 -0700 Subject: [PATCH] ndctl: drop ndctl.h dependency in blk+pmem acceptance tests From: Dan Williams To: linux-nvdimm@lists.01.org Date: Thu, 10 Sep 2015 20:19:29 -0400 Message-ID: <20150911001905.12759.68823.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP They were not properly checking for HAVE_NDCTL_H and they can use the string name for the region type rather than the type number. Cc: Ross Zwisler Signed-off-by: Dan Williams Reviewed-by: Ross Zwisler --- lib/blk_namespaces.c | 3 +-- lib/pmem_namespaces.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/blk_namespaces.c b/lib/blk_namespaces.c index c3fee58f793b..1bea7bdb07b0 100644 --- a/lib/blk_namespaces.c +++ b/lib/blk_namespaces.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -249,7 +248,7 @@ int test_blk_namespaces(int log_level) /* create our config */ ndctl_region_foreach(bus, region) - if (ndctl_region_get_nstype(region) == ND_DEVICE_NAMESPACE_BLK) { + if (strcmp(ndctl_region_get_type_name(region), "blk") == 0) { blk_region = region; break; } diff --git a/lib/pmem_namespaces.c b/lib/pmem_namespaces.c index 127e3bee79d8..28b582026677 100644 --- a/lib/pmem_namespaces.c +++ b/lib/pmem_namespaces.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -209,7 +208,7 @@ int test_pmem_namespaces(int log_level) /* create our config */ ndctl_region_foreach(bus, region) - if (ndctl_region_get_nstype(region) == ND_DEVICE_NAMESPACE_PMEM) { + if (strcmp(ndctl_region_get_type_name(region), "pmem") == 0) { pmem_region = region; break; }