All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Kopytin <Roman.Kopytin@kaspersky.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: RE: [PATCH 1/2] tools: add fdt_add_pubkey
Date: Thu, 11 Nov 2021 05:26:34 +0000	[thread overview]
Message-ID: <0cafa992f9be4d2b82877c358e763af7@kaspersky.com> (raw)
In-Reply-To: <863975c0-0947-6986-04c4-45cfbe96c9b2@siemens.com>

Thanks, I found example in fdtgrep.
What do you think about function like:

static void print_usage(const char *msg)
{
	if (msg != NULL)
		fprintf(stderr, "Error: %s\n", msg);
	fprintf(stderr, "Usage: %s [-a <algo>] [-k <keydir>] [-n <keyname>] [-r <conf|image>] <fdt blob>\n"
		"Options:\n"

		"\t-a <algo>       Cryptographic algorithm. Optional parameter, default: sha1,rsa2048\n"
		"\t-k <keydir>     Directory with public key. Optional parameter, default: .\n"
		"\t-n <keyname>    Public key name. Optional parameter, default: key\n"
		"\t-r <conf|image> Required: If present this indicates that the key must be verified for the image / configuration to be considered valid\n"
		"\t<fdt blob>      FDT blob file for adding of the public key. Required parameter.\n",
		cmdname);
	exit(EXIT_FAILURE);
}


Is it ok?

-----Original Message-----
From: Jan Kiszka <jan.kiszka@siemens.com> 
Sent: Wednesday, November 10, 2021 10:22 PM
To: Roman Kopytin <Roman.Kopytin@kaspersky.com>; u-boot@lists.denx.de
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: Re: [PATCH 1/2] tools: add fdt_add_pubkey

On 10.11.21 09:26, Roman Kopytin wrote:
> Could you please provide good example with needed style for helper?
> In tools I saw a lot of programs w/o help.
> 

Have a look at binman to see this full-blown - not a completely fair comparison as it benefits from Python argparse.

Jan

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

  reply	other threads:[~2021-11-11  5:27 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 15:28 [PATCH 0/2] RFC: add fdt_add_pubkey tool Roman Kopytin
2021-11-08 15:28 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin
2021-11-10  0:58   ` Simon Glass
2021-11-10  7:03     ` Roman Kopytin
2021-11-10  7:41       ` Jan Kiszka
2021-11-10  6:39   ` Jan Kiszka
2021-11-10  7:39   ` Jan Kiszka
2021-11-10  8:26     ` Roman Kopytin
2021-11-10 19:21       ` Jan Kiszka
2021-11-11  5:26         ` Roman Kopytin [this message]
2021-11-11  7:18           ` Jan Kiszka
2021-11-10 21:15   ` Jan Kiszka
2021-11-08 15:28 ` [PATCH 2/2] test_vboot.py: include test of fdt_add_pubkey tool Roman Kopytin
2021-11-10  0:58   ` Simon Glass
2021-11-09  9:16 ` [PATCH 0/2] RFC: add " Jan Kiszka
2021-11-09  9:37   ` Roman Kopytin
2021-11-09 10:07     ` Jan Kiszka
2021-11-09 12:43       ` François Ozog
2021-11-09 12:58         ` Jan Kiszka
2021-11-09 13:16           ` François Ozog
2021-11-09 14:00             ` Jan Kiszka
2021-11-09 17:32               ` François Ozog
2021-11-10  0:58         ` Simon Glass
2021-11-10  0:58       ` Simon Glass
2021-11-10  6:43         ` Jan Kiszka
2021-11-10 16:31           ` Simon Glass
2021-11-10 16:48             ` Jan Kiszka
2021-11-10 17:29               ` François Ozog
2021-11-10 17:44                 ` Jan Kiszka
2021-11-10 19:36               ` Simon Glass
2021-11-10 20:51                 ` Jan Kiszka
2021-11-11  0:31                   ` Simon Glass
2021-11-10  0:58   ` Simon Glass
2021-11-10  6:55     ` Jan Kiszka
2021-11-10  7:20       ` Jan Kiszka
2021-11-10 16:31         ` Simon Glass
2021-11-10 16:49           ` Jan Kiszka
2021-11-10 19:36             ` Simon Glass
2021-11-10 20:58               ` Jan Kiszka
2021-11-11  0:31                 ` Simon Glass
2021-11-10 20:49         ` binman replace broken? (was: Re: [PATCH 0/2] RFC: add fdt_add_pubkey tool) Jan Kiszka
2021-11-11  0:32           ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11  8:15 [PATCH 0/2] RFC: add fdt_add_pubkey tool Roman Kopytin
2021-11-11  8:15 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin
2021-11-08 15:24 [PATCH 0/2] test3 Roman Kopytin
2021-11-08 15:24 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin
2021-11-08 15:20 [PATCH 0/2] test2 Roman Kopytin
2021-11-08 15:20 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin
2021-11-08 14:58 [PATCH 0/2] test Roman Kopytin
2021-11-08 14:58 ` [PATCH 1/2] tools: add fdt_add_pubkey Roman Kopytin

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=0cafa992f9be4d2b82877c358e763af7@kaspersky.com \
    --to=roman.kopytin@kaspersky.com \
    --cc=jan.kiszka@siemens.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.