From: "Gix, Brian" <brian.gix@intel.com>
To: "linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH BlueZ] mesh: Align option names with functionality
Date: Thu, 3 Sep 2020 21:28:05 +0000 [thread overview]
Message-ID: <8debd6d1d3bdc97cb898fa77ecf7ef3be5de8198.camel@intel.com> (raw)
In-Reply-To: <20200903200052.11005-1-inga.stotland@intel.com>
Applied
On Thu, 2020-09-03 at 13:00 -0700, Inga Stotland wrote:
> Change option "config" ('c') to "storage" ('s) to specify
> a custom storage directory for node configuration.
>
> Change option 'f' (long name was missing) to "config" ('c')
> to specify a custom mesh configuration file to override the
> default mesh-main.conf
> ---
> mesh/main.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/mesh/main.c b/mesh/main.c
> index 1a4e6ba76..5a3cbf290 100644
> --- a/mesh/main.c
> +++ b/mesh/main.c
> @@ -39,14 +39,15 @@
> #include "mesh/mesh-io.h"
> #include "mesh/util.h"
>
> -static const char *config_dir;
> +static const char *storage_dir;
> static const char *mesh_conf_fname;
> static enum mesh_io_type io_type;
> static void *io_opts;
>
> static const struct option main_options[] = {
> { "io", required_argument, NULL, 'i' },
> - { "config", optional_argument, NULL, 'c' },
> + { "storage", required_argument, NULL, 's' },
> + { "config", required_argument, NULL, 'c' },
> { "nodetach", no_argument, NULL, 'n' },
> { "debug", no_argument, NULL, 'd' },
> { "dbus-debug", no_argument, NULL, 'b' },
> @@ -108,7 +109,7 @@ static void request_name_callback(struct l_dbus *dbus, bool success,
> return;
> }
>
> - if (!mesh_init(config_dir, mesh_conf_fname, io_type, io_opts,
> + if (!mesh_init(storage_dir, mesh_conf_fname, io_type, io_opts,
> mesh_ready_callback, dbus)) {
> l_error("Failed to initialize mesh");
> l_main_quit();
> @@ -195,7 +196,7 @@ int main(int argc, char *argv[])
> for (;;) {
> int opt;
>
> - opt = getopt_long(argc, argv, "i:c:f:ndbh", main_options, NULL);
> + opt = getopt_long(argc, argv, "i:s:c:ndbh", main_options, NULL);
> if (opt < 0)
> break;
>
> @@ -213,10 +214,10 @@ int main(int argc, char *argv[])
> case 'd':
> enable_debug();
> break;
> - case 'c':
> - config_dir = optarg;
> + case 's':
> + storage_dir = optarg;
> break;
> - case 'f':
> + case 'c':
> mesh_conf_fname = optarg;
> break;
> case 'b':
prev parent reply other threads:[~2020-09-03 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 20:00 [PATCH BlueZ] mesh: Align option names with functionality Inga Stotland
2020-09-03 21:28 ` Gix, Brian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8debd6d1d3bdc97cb898fa77ecf7ef3be5de8198.camel@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox