Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8731644ybi; Tue, 9 Jul 2019 22:10:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoTBggcMobe7dVrwrwHs+aG1R/pKTxb5ecJhbfj7UUatL+CSzkTUEYVXp7uNcRFZ/xgQgg X-Received: by 2002:a17:902:9b81:: with SMTP id y1mr38146341plp.194.1562735443560; 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=YOAqM4cDi8B5Y8tQz6ZdHPC6n/m8qL4VS6wUJ96UYUqawbRG395Qt4LKdNXXT7bngt 84MDVY5AGAMQXbLxPVrahB47206y/MrGV/pmi1/cQLcGT0wdRoIz6NokjOlpTrSc28hQ UhmB7gMpgxYx+hW186AfjiFTk2Po462E7QUgb6z8lCUgmFjS4eWHCkjoBmLjJVnjqMvw NH6n8e6p7N0qJ7IDLcFH91HxTH/BsTg5g/NaYl3Wjey1WsaAxNV5Kwme3TVjW/5MzQbt Vt6ZsuDaNBuARJv1MkatCtH+dYyUV+Yoqb3DbBor1YYBijEpzmQviwKeDRrm0V+f49OP s0mw== 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=yL09JoX6u18mLy/GJpl9AW+S74TvATb93cHIAaPTq+o=; b=oe/boicJnxtl9FJZInx3xcqr52U65OqrDmYIjCntR7nJ4MaCo6AmfQXgzcZcs07BBh /gdHu/YgfvJ8RR5V4hXD+lnIEcL+stsRMQZd7xZg8faUUz9C9xfy6Gc0q60Nu6Q9lFyQ 8ROdAgtaemvqIgzjWnCNOSIvN6IBTTZ8XCnh6oxFXeodx5TyidZlH6gUZEikp+XsTmEZ Y0OCuX+Ek3spjadMA7gUWd+TQHaqQCAalRIUisWnI+rHfGPvImQa2Ms2jrvJcbCxQGKJ 00xlTv22ay8l4TD/bEBgwIVS08615abaOVCGzaPEJ4AyFzUIJcsZB2SN0fxAbAr64I/q iXSQ== 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 t8si1154620pgu.288.2019.07.09.22.10.07; 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 S1726092AbfGJFKC (ORCPT + 99 others); Wed, 10 Jul 2019 01:10:02 -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 S1726015AbfGJFKC (ORCPT ); Wed, 10 Jul 2019 01:10:02 -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:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,473,1557212400"; d="scan'208";a="189050265" Received: from ingas-nuc1.sea.intel.com ([10.254.182.100]) by fmsmga004.fm.intel.com with ESMTP; 09 Jul 2019 22:10:00 -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 0/9] mesh: Configuration storage re-org Date: Tue, 9 Jul 2019 22:09:50 -0700 Message-Id: <20190710050959.7321-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. The only assumption is that the configuration is stored in / directory. Currently, the daemon supports only JSON-based configuration format. It is expected that other configuration formats may be added in future. Inga Stotland (9): 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: Generalize mesh-config APIs mesh: Change variable prefix "jconfig" to "config" mesh: Define storage format specific read/write routines mesh: Implement config read/write for mesh json format mesh: Switch to using mesh-config routines for storage mesh: Make storage.c json-c agnostic Makefile.mesh | 2 +- mesh/cfgmod-server.c | 27 +- mesh/{mesh-db.c => mesh-config-json.c} | 515 ++++++++++++++++++------- mesh/mesh-config.h | 161 ++++++++ mesh/mesh-db.h | 157 -------- mesh/mesh.c | 11 +- mesh/model.c | 7 +- mesh/node.c | 83 ++-- mesh/node.h | 4 +- mesh/storage.c | 385 +++++++----------- 10 files changed, 745 insertions(+), 607 deletions(-) rename mesh/{mesh-db.c => mesh-config-json.c} (73%) create mode 100644 mesh/mesh-config.h delete mode 100644 mesh/mesh-db.h -- 2.21.0