Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3527466ybi; Sun, 14 Jul 2019 16:24:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUy+Y1QxPgidtoWnt5uHk+dp2kYvoCALk1C6u/JuSIc5cju5obQQ0s42qwge3Coco8hb9Z X-Received: by 2002:a63:4404:: with SMTP id r4mr23414313pga.245.1563146640843; Sun, 14 Jul 2019 16:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563146640; cv=none; d=google.com; s=arc-20160816; b=jSxbzwPW1yjA8sq7VuVhXOyesE6mvZxmmKVwvAAcyXuuM2TZzR01r5zu2JpJtbP+zd BkPiDrYGZedVithAUDB9pe6RMvMlv+l3IbvzvtDw3o0Fo4LHU1qj2GMGt7PmNMfc6Xx4 Cf1JeJHWZmSvF5PYrHMRhSBmUGCYVqSZUKwoXwqWlioMCRpx/7V16EBiJdIbzyn6+UG3 XY/A+d/c5FLhn+85nKCIHh4ho4uoKpab8kGle2G9F0Zsk/DqahhJUAMTa8stjff/dnSO hIETavvGhShbjxQD3+/qAxKXdP0LdyDhY2RNznfto++wPYP5NQM1k8brHJcIElRa9u01 Mflg== 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=hs4z+Mp0G0ccEXe8jd2waBJfns/E+GREmfO45IX2Tkk=; b=KKtGbkQpj+UYtKhifdFeUm3nMValmL9ggvjdKN9vC9JNEogi6DK9Aj1EUnYzny2da1 I2OiT/rMuAUzF5agdnT0lIssG1uQY+ETVd8kIhKz5zp6689PWjLLd28ceFZPWKQ3ZFiJ IcDjzA2IkxHYebR20XH8M9MdbhEkrwcNhtFCLZLwHQIja8agLc+F0BaNt3aR/NZJbPOJ 9Rxwho72585ErEq7w67XZ+hmcmvLhKIhfUskg2WjCAcsBzJHlSkTnutHcTVnklPQXZdV Z5XzOUQGFWIUx+fzNzRYiiDNQ47UF/as3psr6p9cCDGDk2BOiNeYfnwqmJTrdrpvoLHP Ya9Q== 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 m62si14915418pgm.392.2019.07.14.16.23.23; Sun, 14 Jul 2019 16:24:00 -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 S1728851AbfGNXXW (ORCPT + 99 others); Sun, 14 Jul 2019 19:23:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:39738 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728803AbfGNXXW (ORCPT ); Sun, 14 Jul 2019 19:23:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2019 16:23:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,492,1557212400"; d="scan'208";a="168805621" Received: from rreichel-mobl1.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.24.81]) by fmsmga007.fm.intel.com with ESMTP; 14 Jul 2019 16:23:21 -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 v3] mesh: Configuration storage re-org Date: Sun, 14 Jul 2019 16:23:10 -0700 Message-Id: <20190714232320.20921-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 + rebase off the tip 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 | 224 +++-- mesh/node.h | 13 +- mesh/storage.c | 656 --------------- mesh/storage.h | 51 -- mesh/util.c | 39 +- mesh/util.h | 1 + 18 files changed, 1219 insertions(+), 1321 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