From patchwork Sat Sep 5 01:31:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7126931 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87D42BEEC1 for ; Sat, 5 Sep 2015 01:37:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC4B9208AE for ; Sat, 5 Sep 2015 01:37:37 +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 E16F0208A2 for ; Sat, 5 Sep 2015 01:37:36 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D589E182E53; Fri, 4 Sep 2015 18:37:36 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id F1331182E32 for ; Fri, 4 Sep 2015 18:37:35 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 04 Sep 2015 18:37:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,471,1437462000"; d="scan'208";a="762769561" 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; 04 Sep 2015 18:37:37 -0700 Subject: [PATCH 07/11] ndctl: update dimm flag names From: Dan Williams To: linux-nvdimm@lists.01.org Date: Fri, 04 Sep 2015 21:31:53 -0400 Message-ID: <20150905013153.28464.64571.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20150905012538.28464.18136.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20150905012538.28464.18136.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, 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 It is important for the flag names to be explicit about their polarity as feedback to a firmware implementer to get the polarity correct. Update to keep in sync with the kernel rename. Cc: Robert Elliott Cc: Toshi Kani Cc: Linda Knippers Signed-off-by: Dan Williams --- lib/libndctl.c | 10 +++++----- lib/test-libndctl.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libndctl.c b/lib/libndctl.c index d08cf0812f50..d85453a3ac63 100644 --- a/lib/libndctl.c +++ b/lib/libndctl.c @@ -839,15 +839,15 @@ static void parse_nfit_mem_flags(struct ndctl_dimm *dimm, char *flags) start = flags; while ((end = strchr(start, ' '))) { *end = '\0'; - if (strcmp(start, "arm") == 0) + if (strcmp(start, "not_armed") == 0) dimm->f_arm = 1; - else if (strcmp(start, "save") == 0) + else if (strcmp(start, "save_fail") == 0) dimm->f_save = 1; - else if (strcmp(start, "flush") == 0) + else if (strcmp(start, "flush_fail") == 0) dimm->f_flush = 1; - else if (strcmp(start, "smart") == 0) + else if (strcmp(start, "smart_event") == 0) dimm->f_smart = 1; - else if (strcmp(start, "restore") == 0) + else if (strcmp(start, "restore_fail") == 0) dimm->f_restore = 1; start = end + 1; } diff --git a/lib/test-libndctl.c b/lib/test-libndctl.c index c2e7bc7b4ff4..ec03ad439d55 100644 --- a/lib/test-libndctl.c +++ b/lib/test-libndctl.c @@ -1471,8 +1471,8 @@ static int check_dimms(struct ndctl_bus *bus, struct dimm *dimms, int n, if (ndctl_dimm_has_errors(dimm) != !!dimms[i].flags) { fprintf(stderr, "bus: %s dimm%d %s expected%s errors\n", ndctl_bus_get_provider(bus), i, - dimms[i].flags ? "" : " no", - ndctl_dimm_get_devname(dimm)); + ndctl_dimm_get_devname(dimm), + dimms[i].flags ? "" : " no"); return -ENXIO; }