Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5BF3C433F5 for ; Thu, 11 Nov 2021 07:18:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C54A61284 for ; Thu, 11 Nov 2021 07:18:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C54A61284 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0668E839FA; Thu, 11 Nov 2021 08:18:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 097C8839FF; Thu, 11 Nov 2021 08:18:50 +0100 (CET) Received: from gecko.sbs.de (gecko.sbs.de [194.138.37.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FB0B8327E for ; Thu, 11 Nov 2021 08:18:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 1AB7IcwR005905 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Nov 2021 08:18:38 +0100 Received: from [167.87.75.31] ([167.87.75.31]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1AB7Ic6b031918; Thu, 11 Nov 2021 08:18:38 +0100 Subject: Re: [PATCH 1/2] tools: add fdt_add_pubkey To: Roman Kopytin , "u-boot@lists.denx.de" Cc: Rasmus Villemoes References: <20211108152844.3656459-1-Roman.Kopytin@kaspersky.com> <20211108152844.3656459-2-Roman.Kopytin@kaspersky.com> <31a7ce3e-2b47-7e77-ec1a-875fc42aff4e@siemens.com> <1996c132b4264f41adf54401b7ed9020@kaspersky.com> <863975c0-0947-6986-04c4-45cfbe96c9b2@siemens.com> <0cafa992f9be4d2b82877c358e763af7@kaspersky.com> From: Jan Kiszka Message-ID: Date: Thu, 11 Nov 2021 08:18:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <0cafa992f9be4d2b82877c358e763af7@kaspersky.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 11.11.21 06:26, Roman Kopytin wrote: > 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 ] [-k ] [-n ] [-r ] \n" > "Options:\n" > > "\t-a Cryptographic algorithm. Optional parameter, default: sha1,rsa2048\n" > "\t-k Directory with public key. Optional parameter, default: .\n" > "\t-n Public key name. Optional parameter, default: key\n" > "\t-r Required: If present this indicates that the key must be verified for the image / configuration to be considered valid\n" Maybe reorder to "configuration / image" (or reorder to ""). > "\t FDT blob file for adding of the public key. Required parameter.\n", > cmdname); > exit(EXIT_FAILURE); > } > > > Is it ok? Yes, looks good to me. I'm still looking for a way to overcome -a, though... Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux