Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2775333ybi; Sat, 13 Jul 2019 23:28:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBg1ZYcbdMJDtlwIUFUbOZASZJDjXhs5fmm8H9pUC/TeysO4sgOjSi+MoufmH1Brla6uaS X-Received: by 2002:a17:902:b702:: with SMTP id d2mr22006396pls.259.1563085739606; Sat, 13 Jul 2019 23:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563085739; cv=none; d=google.com; s=arc-20160816; b=S2LFk2JyiW2nuM56hQL3SEKrULVF6EU6EfUQe6eqakYYcsXqCEcK3Ly7oLat8eUPqq S/ZcZDycZG/FyLp0OtIEkqITuOf/mgshmGcHyNM+fED+yOGh1E4asCAVGeskHgeVSRz1 Tyhf88b9N18rtD/SCR68VvhTeRJtzUrH62SQDBYnu6zUPlcvFA27kSSgwV32E0ZjqbZO 9tf5kPJcJwY5+FxrgbF4FpVq88Pe55/NnXfbhLUyseCP9gW7BPq9aaoK3DPdLQSjUJ6I K49b8Cvvk5SLaeiiEjzwKDGmDv4jas98P2LuhtFrNUUZpftl8wcNQ8+SRtCMIjZfSWw1 FEFw== 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 :message-id:date:subject:cc:to:from; bh=y/tYN8cvJDNwJSueOPuIRGgO3gROnbhFt9lG9v1Xmfo=; b=PVGSo7wnghGTce6nlc1s/ovFfC3RyuAL1oPJlTs94SNky2bYCUUnkJ67Kgq57d9yVG iwhsvdnxetIXPDGAXCg4xifxTWtAWOLQMZqcqalWJsCBUNPMm7aRMYZKlrrBCRICJ/bx dQpWZDPaoHEpQcQIwr6ArXoC7ItoQxOBqVKVsLL89AZrt9a2EfkGeHeXsCMTS+brsAcq RNI7BOYrDhCy/BMC/uOctdmyF8KzZpUboxaY423kioI1l0Aso+tnl6a3p6POMSOGh/1b zG8qJ4Ixt452RU/3CAb1a+b8kTpMhb5HsrQQJRgFY0lcJ5OQOHW+Dd9reYT1MpIH2Wqt xcug== 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 p20si1909043pgm.192.2019.07.13.23.28.25; Sat, 13 Jul 2019 23:28:59 -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 S1726017AbfGNG2P (ORCPT + 99 others); Sun, 14 Jul 2019 02:28:15 -0400 Received: from mga06.intel.com ([134.134.136.31]:30353 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfGNG2P (ORCPT ); Sun, 14 Jul 2019 02:28:15 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2019 23:28:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,489,1557212400"; d="scan'208";a="318387970" Received: from ingas-nuc1.sea.intel.com ([10.251.146.93]) by orsmga004.jf.intel.com with ESMTP; 13 Jul 2019 23:28:14 -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 00/10 v2] mesh: Configuration storage re-org Date: Sat, 13 Jul 2019 23:28:02 -0700 Message-Id: <20190714062812.31041-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 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 set of patches introduces the notion of generic mesh-config API that allows the daemon to be agnostic of the underlying node configuration directory layout and the format of the file(s) in which node configuration is saved. Currently, the daemon supports only JSON-based configuration format. It is expected that other configuration formats may be added in future. As a result of these changes, storage.c and storage.h are obsolete and are removed. Inga Stotland (10): mesh: Move network config setup from storage.c to node.c mesh: Rename mesh-db.c to mesh-config-json.c mesh: Change mesh_db prefix to mesh_config mesh: Move load from storage functionality into node.c mesh: Confine dependency on json-c to mesh-config-json.c mesh: Replace storage_save_config with mesh_config_save_config mesh: Use mesh_config APIs to store node configuration mesh: Manage node config directory in mesh-config mesh: Create or re-use a node storage directory for keyring mesh: Rename mesh_config_srv_init() to cfgmod_server_init() Makefile.mesh | 3 +- mesh/appkey.c | 19 +- mesh/cfgmod-server.c | 31 +- mesh/cfgmod.h | 2 +- mesh/keyring.c | 36 +- mesh/{mesh-db.c => mesh-config-json.c} | 1071 +++++++++++++++++------- mesh/mesh-config.h | 172 ++++ mesh/mesh-db.h | 157 ---- mesh/mesh.c | 15 +- mesh/mesh.h | 1 + mesh/model.c | 23 +- mesh/net.c | 26 +- mesh/node.c | 221 +++-- mesh/node.h | 14 +- mesh/storage.c | 656 --------------- mesh/storage.h | 51 -- mesh/util.c | 39 +- mesh/util.h | 1 + 18 files changed, 1218 insertions(+), 1320 deletions(-) rename mesh/{mesh-db.c => mesh-config-json.c} (58%) create mode 100644 mesh/mesh-config.h delete mode 100644 mesh/mesh-db.h delete mode 100644 mesh/storage.c delete mode 100644 mesh/storage.h -- 2.21.0