Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8731653ybi; Tue, 9 Jul 2019 22:10:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUqfDUO2SsR8Gaw11lfU8h89kDtEiE3dAXCdP6rSUfoNF3HyW/Y73Ip/8Y+FY0+uUmTEiH X-Received: by 2002:a63:e54:: with SMTP id 20mr7432378pgo.244.1562735443559; Tue, 09 Jul 2019 22:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562735443; cv=none; d=google.com; s=arc-20160816; b=GVqLAgh0TNzBw8SUNP/LhsswVZg3IYIVoVecw2ly4VdaH1sJDyS3u69EUlN+hJRASt A9DD4XmrGJL77oK6diFU6yiNRpl4VRm751WdmZNvrktXSWx9DiljmODr5RLt6NTiJwwg CnFNIKJ2IgULIIiCC4kU0rW03Xcla9ixBoVwYezDOiILC5xSr24EVyIQzPKmfkDa0Sc3 QpfXxw+PNCWO32bbLiO54fBbEDX5dyBOZoOZeVXO5hGWbHrQcn1+e8o+roxSyXRgBnYR cIYa/Iuq7gaZO1YIcM/2PxmwIaIGH8GKxS9ivFi6zbOD8n24YzSu1HYddKVCTLizxjv+ erHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2A1x8f1xb46t8Lsssbr+9RLRSbxxm24EBLZBxoaTwtA=; b=UIPdXlO6UH2tfSlW/lrclx0pbUaLhueJ0S961rwkpyvckBC9u2gLifXQ8e3HdCVuKX gZnzsdWZpZRHVFcpEs/1AMeFzbTQEhQ/o7mIZ9WW5SPaD6xF4+ABrzDGEHpnVgII8c53 3dvEEjZUDL/unI8OSgvHXn2wNO4n/2gfZbVXaQZL77RR7+ejYXiIsKVBSFP6TqIqQ2At 3Av8p7RXI5LNVBfR/Jqe70Uwui/m48DrNSqdjTJlRIjG6DIhEfJqX8tepuvRpZ9HC9X4 iPlxtjXzoPU17N0wRyzGCdTC0BpqFyVBL1KDCRNbWmDI/QC1MZ/5LDTVgc2ETgc+94HC xW/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si1088676pgv.97.2019.07.09.22.10.09; Tue, 09 Jul 2019 22:10:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbfGJFKE (ORCPT + 99 others); Wed, 10 Jul 2019 01:10:04 -0400 Received: from mga18.intel.com ([134.134.136.126]:28140 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbfGJFKD (ORCPT ); Wed, 10 Jul 2019 01:10:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 22:10:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,473,1557212400"; d="scan'208";a="189050296" Received: from ingas-nuc1.sea.intel.com ([10.254.182.100]) by fmsmga004.fm.intel.com with ESMTP; 09 Jul 2019 22:10:03 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, michal.lowas-rzechonek@silvair.com, jakub.witowski@silvair.com, Inga Stotland Subject: [PATCH BlueZ 2/9] mesh: Rename mesh-db.c to mesh-config-json.c Date: Tue, 9 Jul 2019 22:09:52 -0700 Message-Id: <20190710050959.7321-3-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190710050959.7321-1-inga.stotland@intel.com> References: <20190710050959.7321-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This moves mesh-db.h to mesh-config.h and mesh-db.c to mesh-config-json.c. mesh-config.h declares common APIs for storing mesh node configuration. mesh-config-json.c defines the APIs for JSOn specific storage. This allows for future parallel implementation a different (not JSON-based) mechanism of storing node configuration. --- Makefile.mesh | 2 +- mesh/cfgmod-server.c | 3 +-- mesh/{mesh-db.c => mesh-config-json.c} | 3 +-- mesh/{mesh-db.h => mesh-config.h} | 0 mesh/model.c | 2 +- mesh/node.c | 2 +- mesh/storage.c | 3 +-- 7 files changed, 6 insertions(+), 9 deletions(-) rename mesh/{mesh-db.c => mesh-config-json.c} (99%) rename mesh/{mesh-db.h => mesh-config.h} (100%) diff --git a/Makefile.mesh b/Makefile.mesh index 1ace507af..502ba2a47 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -25,7 +25,7 @@ mesh_sources = mesh/mesh.h mesh/mesh.c \ mesh/provision.h mesh/prov.h \ mesh/model.h mesh/model.c \ mesh/cfgmod.h mesh/cfgmod-server.c \ - mesh/mesh-db.h mesh/mesh-db.c \ + mesh/mesh-config.h mesh/mesh-config-json.c \ mesh/util.h mesh/util.c \ mesh/dbus.h mesh/dbus.c \ mesh/agent.h mesh/agent.c \ diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c index a19ddc72e..486c87307 100644 --- a/mesh/cfgmod-server.c +++ b/mesh/cfgmod-server.c @@ -32,8 +32,7 @@ #include "mesh/appkey.h" #include "mesh/model.h" #include "mesh/storage.h" -#include "mesh/mesh-db.h" - +#include "mesh/mesh-config.h" #include "mesh/cfgmod.h" #define CFG_MAX_MSG_LEN 380 diff --git a/mesh/mesh-db.c b/mesh/mesh-config-json.c similarity index 99% rename from mesh/mesh-db.c rename to mesh/mesh-config-json.c index e0a000261..35d0bd27e 100644 --- a/mesh/mesh-db.c +++ b/mesh/mesh-config-json.c @@ -31,8 +31,7 @@ #include "mesh/mesh-defs.h" #include "mesh/util.h" - -#include "mesh/mesh-db.h" +#include "mesh/mesh-config.h" #define CHECK_KEY_IDX_RANGE(x) (((x) >= 0) && ((x) <= 4095)) diff --git a/mesh/mesh-db.h b/mesh/mesh-config.h similarity index 100% rename from mesh/mesh-db.h rename to mesh/mesh-config.h diff --git a/mesh/model.c b/mesh/model.c index e08f95b71..0474762e0 100644 --- a/mesh/model.c +++ b/mesh/model.c @@ -30,7 +30,7 @@ #include "mesh/mesh.h" #include "mesh/crypto.h" #include "mesh/node.h" -#include "mesh/mesh-db.h" +#include "mesh/mesh-config.h" #include "mesh/net.h" #include "mesh/appkey.h" #include "mesh/cfgmod.h" diff --git a/mesh/node.c b/mesh/node.c index a2d95dacf..06e809706 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -31,7 +31,7 @@ #include "mesh/mesh-defs.h" #include "mesh/mesh.h" #include "mesh/net.h" -#include "mesh/mesh-db.h" +#include "mesh/mesh-config.h" #include "mesh/provision.h" #include "mesh/storage.h" #include "mesh/keyring.h" diff --git a/mesh/storage.c b/mesh/storage.c index 2b7804242..bba2ef348 100644 --- a/mesh/storage.c +++ b/mesh/storage.c @@ -22,7 +22,6 @@ #endif #define _GNU_SOURCE -//#include #include #include #include @@ -37,7 +36,7 @@ #include "mesh/node.h" #include "mesh/net.h" #include "mesh/appkey.h" -#include "mesh/mesh-db.h" +#include "mesh/mesh-config.h" #include "mesh/util.h" #include "mesh/storage.h" -- 2.21.0