From patchwork Thu Oct 14 15:46:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1540977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=O58CcCSE; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13b; helo=mail-lf1-x13b.google.com; envelope-from=swupdate+bncbcxploxj6ikrbznbugfqmgqe46htx5q@googlegroups.com; receiver=) Received: from mail-lf1-x13b.google.com (mail-lf1-x13b.google.com [IPv6:2a00:1450:4864:20::13b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVYfy6CNBz9sfG for ; Fri, 15 Oct 2021 02:46:49 +1100 (AEDT) Received: by mail-lf1-x13b.google.com with SMTP id z29-20020a195e5d000000b003fd437f0e07sf4606732lfi.20 for ; Thu, 14 Oct 2021 08:46:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634226405; cv=pass; d=google.com; s=arc-20160816; b=hFC5COxJHiLT4PqyENA0LmdwR+qEVRu828NDPonASggqB3uhtLVSzPmgD2zI0ruhBf 7STBm9MGUQjx+H6W2zMpneubYv5hF1//nnih4/TLkaLxl/DwIQzbCqpbVTbgleRLjp1R B3SKax1/fk6Ym1iVTw1lh8JGVMuRFnUElYEdzoxyLV/8V150ttWAxsxkwl9U/gad+v3Q Col3j7opC4auIZLrHjKI3N5Lh8+Bc8kU6u7Guzy+yB2omXxQ4JkiL+G2mM1HWpqfgyW2 zWjMmPAv0WyzsJ5Oi13KrMLl/sMNXCgjaW6K5PwiM5pHDzg/R/YAg3WF1eTCrN6NedhV OTLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=7dU7ZhnMkSJjXQ/S/pXf6roCdwKxvBEuRd10A51lSOM=; b=CPTtl6pbFJgSPL9JtXQr+WnqgJSvb2ho2PFg6ZpFZHLTCMlgFKOfxDXnT61oZ4XOuJ b1ycT0di/DOZ1kWHrkQ1mXjmfSJrf6HKzmBH1h1kmo+jnVMFHFiVQzJCOOoVn0C7NuVD jtioMhwDYT3V0rKmC1ZQuF5aCRzUYSkMJKVXmlDwXfYvTjbbXilvLakvBGzbrgMpfIyf rDIU8eZY2bv7/GmLxB0RM1iSsq09ugUVuWv1BSRU4ovk65CfV7hmP5KIkYSMjXYV18er gXokzqXpfRFjm57o3ZWD9EVwKAUyGHsNHQGnn2Bfl2+xNnURewspwAYlnt/e3wCUjc8l VucA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=7dU7ZhnMkSJjXQ/S/pXf6roCdwKxvBEuRd10A51lSOM=; b=O58CcCSExjQkYgj4Rd3A3UkzUd0I9zLMOFXa6jw+5VP6/g4qhtU+QKcpXTFPP9jhOo kZwUaCrGSl39hu8cYYAMJcv67zNiD6s4FSFqqOOqCFNBLTkxcIQ92urT3XrgpwnHV7zd Mz6oNSrHkCiV6vp9JmnwEKw2qe7a17PR4xBBZ//IZMFgTaXn9YQSo61CAWopPml6oBt1 AiIgTaz+mQCSd0Y0SbMNFOICx1GJG470K90nK68yotRbQIj1Ao5Ty89bCkQz0SmDrmyk w+7f3nCMJNx4irglUba96lM6pSrwcm4rHQywl93noPEH8tJo9JZtzN9qQnfz4xjdPlkY 0J/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=7dU7ZhnMkSJjXQ/S/pXf6roCdwKxvBEuRd10A51lSOM=; b=cvTJSWbGTsKODUP1VRjEaxacvtxa2NGH4qtVCOnEf55M1Gly4CLKZEyPwyeEKQ2MUz 4baaCEEvqyIBZnTB+ERnc+xb+zbeQ564OnxC9DeiTxFIyDRXDOeyRD7bMQq5f0ROQcu7 wA33RVU/kznPdZ8mzNWcMArq+DZgsURdknWR3afzAyoYs6hsfCHagDxO8c564XLNmOUw SuniWHyZ2AAhAgwi661p4jfzMfUAfQbGAAvPMnYoW6JPv/9b+DE7pSQ5+NpkrAR0FiSI ANn3HA+y/Z28BpWjG7EXBWDEMI9FjFPvBa+y13mqbmhzZT3hnXyhcrbtKkm3dG+3RMWC LGdA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530d9jYqrkgvW5371Kss4ZutmRb/2DYEyrwbg78iDvK5XvKPB+q8 y0ebkSLe9O+poDwUCnxAK40= X-Google-Smtp-Source: ABdhPJyzjlqnPNFXhOYTjHOVyu4PBoI3875PUvBH09H6um27FF0Y/gfUg+C+ZiVpfJ3pfNuU3e2rbQ== X-Received: by 2002:a2e:b8c3:: with SMTP id s3mr6866608ljp.44.1634226405725; Thu, 14 Oct 2021 08:46:45 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:760d:: with SMTP id r13ls1164162ljc.0.gmail; Thu, 14 Oct 2021 08:46:44 -0700 (PDT) X-Received: by 2002:a2e:7401:: with SMTP id p1mr6664935ljc.531.1634226404753; Thu, 14 Oct 2021 08:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634226404; cv=none; d=google.com; s=arc-20160816; b=AgPBlJFWqKCDeu8zom7OCwYor9+LzGDS3+HMXC/KjI5rZQVCOaCuwCr5w8JhKIzW8m gnZ0iSxLQhHZs0mc2t4Bgndh8thh3J4O5JALtzXC8E4bytTBctI9TUWgnqs/YWz2dACc b0PlNm3zGCm6E9y9Y62JJ6gwmzfLcPOr9RJqbF99ZLpWtl7JhOBJ2OqDq22kEhUVUinD m98m0IXbVXzigag6c66YCKLQgU7fnhtXJpcYlontWR/4Ogik64CXbDNGKSUtvIlpobNB F2ztq/eSt5RGKFAGrlj0gsl3LdVIh5EtwWMMpRfHNXNfHDHYI56secHBsZGsxl7EW4NM uh4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=S2akEK6NbrsvM4fr9KvGvbZMO8KDLdeEV1nDzLLH0sA=; b=gnqA8+4fADJOIisZrbZO2VATecuAg3SX4NYZup4K0LaFO4xUOXSpBsrom+HBD1f82Z WvtdLwudexUQe4YpRPP6/5S88smkm+6/mc0ELvUGXu2HrVypPRGjnx4rRFT+xz+qanFH yv8StqZ3KYVGrcPJYo4GVebkuiVk9xd0XSyuARjwD0Qzch4lvclziXOwWTLGPxEfYwDT Deg5HkIY+KrrO+3qCuWsnwy4GcVuBAFboLa3eRU1HIl2IhbtbX2uYRRcBy2/iEWAcOS2 J5gQYIOty+FBtxcrYclkd6pQX+Zt1a7hepyntgusVxq/TY8Jk+NWqlrwYiXGi7tXvQt1 W2tQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id m18si192593ljg.7.2021.10.14.08.46.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 08:46:44 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HVYfr13T9z1qwyB; Thu, 14 Oct 2021 17:46:44 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HVYfr0vqRz1qqkG; Thu, 14 Oct 2021 17:46:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id CZq9FwFx5XqX; Thu, 14 Oct 2021 17:46:43 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 14 Oct 2021 17:46:43 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id EDB6F45407A7; Thu, 14 Oct 2021 17:46:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 8os8yuB44Ulu; Thu, 14 Oct 2021 17:46:39 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 5C7F3454034C; Thu, 14 Oct 2021 17:46:39 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 1/3] cosmetic: sort entries in getopt list Date: Thu, 14 Oct 2021 17:46:35 +0200 Message-Id: <20211014154637.2674613-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- core/swupdate.c | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/core/swupdate.c b/core/swupdate.c index a31aeb1..3ad18e2 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -69,21 +69,21 @@ struct flash_description *get_flash_info(void) { #endif static struct option long_options[] = { - {"verbose", no_argument, NULL, 'v'}, - {"version", no_argument, NULL, '0'}, - {"image", required_argument, NULL, 'i'}, - {"file", required_argument, NULL, 'f'}, - {"loglevel", required_argument, NULL, 'l'}, - {"syslog", no_argument, NULL, 'L' }, - {"select", required_argument, NULL, 'e'}, {"accepted-select", required_argument, NULL, 'q'}, - {"output", required_argument, NULL, 'o'}, +#ifdef CONFIG_UBIATTACH + {"blacklist", required_argument, NULL, 'b'}, +#endif + {"check", no_argument, NULL, 'c'}, +#ifdef CONFIG_DOWNLOAD + {"download", required_argument, NULL, 'd'}, +#endif {"dry-run", no_argument, NULL, 'n'}, - {"no-downgrading", required_argument, NULL, 'N'}, - {"no-reinstalling", required_argument, NULL, 'R'}, - {"max-version", required_argument, NULL, '3'}, - {"no-transaction-marker", no_argument, NULL, 'M'}, - {"no-state-marker", no_argument, NULL, 'm'}, + {"file", required_argument, NULL, 'f'}, + {"help", no_argument, NULL, 'h'}, +#ifdef CONFIG_HW_COMPATIBILITY + {"hwrevision", required_argument, NULL, 'H'}, +#endif + {"image", required_argument, NULL, 'i'}, #ifdef CONFIG_SIGNED_IMAGES {"key", required_argument, NULL, 'k'}, {"ca-path", required_argument, NULL, 'k'}, @@ -93,25 +93,25 @@ static struct option long_options[] = { #ifdef CONFIG_ENCRYPTED_IMAGES {"key-aes", required_argument, NULL, 'K'}, #endif -#ifdef CONFIG_UBIATTACH - {"blacklist", required_argument, NULL, 'b'}, -#endif - {"help", no_argument, NULL, 'h'}, -#ifdef CONFIG_HW_COMPATIBILITY - {"hwrevision", required_argument, NULL, 'H'}, -#endif -#ifdef CONFIG_DOWNLOAD - {"download", required_argument, NULL, 'd'}, -#endif + {"loglevel", required_argument, NULL, 'l'}, + {"max-version", required_argument, NULL, '3'}, + {"no-downgrading", required_argument, NULL, 'N'}, + {"no-reinstalling", required_argument, NULL, 'R'}, + {"no-state-marker", no_argument, NULL, 'm'}, + {"no-transaction-marker", no_argument, NULL, 'M'}, + {"output", required_argument, NULL, 'o'}, + {"preupdate", required_argument, NULL, 'P'}, + {"postupdate", required_argument, NULL, 'p'}, + {"select", required_argument, NULL, 'e'}, #ifdef CONFIG_SURICATTA {"suricatta", required_argument, NULL, 'u'}, #endif + {"syslog", no_argument, NULL, 'L' }, + {"verbose", no_argument, NULL, 'v'}, + {"version", no_argument, NULL, '0'}, #ifdef CONFIG_WEBSERVER {"webserver", required_argument, NULL, 'w'}, #endif - {"check", no_argument, NULL, 'c'}, - {"postupdate", required_argument, NULL, 'p'}, - {"preupdate", required_argument, NULL, 'P'}, {NULL, 0, NULL, 0} }; From patchwork Thu Oct 14 15:46:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1540976 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=IXhDXVHj; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::438; helo=mail-wr1-x438.google.com; envelope-from=swupdate+bncbcxploxj6ikrbzfbugfqmgqetzuspty@googlegroups.com; receiver=) Received: from mail-wr1-x438.google.com (mail-wr1-x438.google.com [IPv6:2a00:1450:4864:20::438]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVYfy5klBz9sXS for ; Fri, 15 Oct 2021 02:46:49 +1100 (AEDT) Received: by mail-wr1-x438.google.com with SMTP id r16-20020adfbb10000000b00160958ed8acsf4852485wrg.16 for ; Thu, 14 Oct 2021 08:46:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634226405; cv=pass; d=google.com; s=arc-20160816; b=b9yrzNxzheEr/4JwWAK69xXHXF6bV4hfc3zcYo3t96MggYezWpGUOIfJXmxbYIZLkC 8qoP2j9Jf856RJaJT37bgK90pOIf4z1UVN//o1yIfqXmJvBfSk/Oa0lxVoH3f97AhKEZ DCH/2KjNafJ36SHvg+O+sCORpojKyzSWfHN15B63S2aJU1FaFeREgCeF5kAYCNgRCV4C lm1cPPYXoIbUO6lK/W71IKLTxEuuYgV5cPB4Je2DNg4W5kkK5mbdpEJo95eVuMB3UcDZ kJ6q0Z+DGE3f8ODTZRoVkCzmw0fpadIK+KUS5WLkmZv7wnyAXR5aNG9Pio2MTra7hhWY TLuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=yysqx/3FoxNXWEw/JzUqgrfoJkaiczaHiS3XbhVEm1M=; b=A64Tj8oJyqJKouTw37FEzenw0mStE7Tfw3e+cm7w2H+a4wl/0UdVTY6gUxtHgdIdMI ZNBjGn43PGj1RIFVr67GgjsKIVyrZAHVu9VblCPqSTrrT3WU8O0VB3mr/0qdSz6h+wwb P2Zexxw7p3nRiKh33sZ7pHEaGPzrY+E/MGMvqSekhJoHfnTyutGdLK69dtqjfxbx4Yf8 yEUaOhg2UTU8J0jRjRP4uC6jD0nFZsuj+jssRdWZWIEcXmDXhCY91h1wooR2kBfoXbK/ g/3xZAFfaGoBXsF9Oi8tqYiHxbEAXGwYgErZR6cDvpoiJYO/ED0LOn7ko4k+GeQeGt5a 8Paw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=yysqx/3FoxNXWEw/JzUqgrfoJkaiczaHiS3XbhVEm1M=; b=IXhDXVHjBXwrCOaPZtk8tVmGsioTa7nx8mMdeKy6OzmuKNdnmBXOKS9Pcsea+hjGSe ADObIcB6tRTBOsrA3RUatA5MzerOyWIAb5qCJGmdJOCsUNGQkgF29NgIbjoJclSCcOTS xnLefEcMPtwTUpKeqyUuTy6waEP4THFnWr60WF/XNWJEyiPYX4yY8FKIP54hloGs6P1R DL+XjzV3xD/2SeGhjXW7h2/2E+Asad7pCdtt/PL2k75AJaMHCuJ1ytnzqYyzWCOonaHq 7cLFB6zg4cAAxZeJl734neFj9tXj9VjpBZKpTr0TN5nZqONQfm+nDwBjb6a54E+cnNyN bILw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=yysqx/3FoxNXWEw/JzUqgrfoJkaiczaHiS3XbhVEm1M=; b=o53lgdrrrveeXx9tzY3PKS48tLnQbrdd/cwYSL8n5ZIAwK2EvpgPeoEn9pIPDDYFaH pMc3yoQom++8hxRw8NurJP5vfeGyvk/R/933C1VPjyYvzYNHW2OGhWvvDdMQ91e9rcmp 6o6Ir/15eB7N8U2pXGp5LiREgqsQDgHIMI2a6/jegQIqRMnbGnUI9mpirBxmv3dqqQZw rcArtwR0r6loGLmEAjMPBcCBPxJRXawuKWo3TFHGyGmEB0J+93yOzrID3EFa5N+BzQNz tKsV7XTpNK95NBTO5+wKumfGSt9oVH0QEgGGK/BSu/BGlCf1wz8bBNJ6Agd05TpTiq7D +4gw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532Pkm44cukueB7xXbfvjbp3C0CBW6jKNRCrib26umYyxrCqtBO2 tyq2TnoD6LwlxdOv0bMJuME= X-Google-Smtp-Source: ABdhPJyRbYgB+/M47O6O1LRPPrMh0/0TeA+mR1/zZAHoXe+G0goVsEuCwFwXimS0yZQbZ1ETS5MP6Q== X-Received: by 2002:a05:600c:2159:: with SMTP id v25mr19660410wml.175.1634226405053; Thu, 14 Oct 2021 08:46:45 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1c:2983:: with SMTP id p125ls5023956wmp.2.canary-gmail; Thu, 14 Oct 2021 08:46:44 -0700 (PDT) X-Received: by 2002:a7b:c766:: with SMTP id x6mr20148670wmk.15.1634226404124; Thu, 14 Oct 2021 08:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634226404; cv=none; d=google.com; s=arc-20160816; b=HyoZi2+6rbPa+QWjH85TP6tVuq/oSKGAgNsGkWk4XSLO46UIxTK98JexV9FzQAVPSJ r5rNo6ia9Slsc0Zw+zjSv7AFovio3d6gSDPgEC69dWHJipS9P8SX2j2axsYer1DAIKsM IOipmoPzWP+8i+wySPqfEpEpzYhHAnUPYIipU/C273Ps9T9N1lDPCFq3c61Lq10WeDBS A3CZPmI9GlUexyfXckeGQ9YGJxdUzzPyAD9+x+NKDCqkxxWDaui9TahypxNcv3YV7ZsM GCVs2YIud8MAmpitUJdvyjyglZg0hvddE7dEwrPLSNtbGrJLnE5BiKnUPntbXZVAdw7s AuQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=dlFMcrCBHWqIY2b/2EWXoLNwRKBgb6eqBnLLa2gpyBI=; b=DXHt6Kquu2tSU/bJuRsAS8T5yBcMo5zNVoJOTMLUbnUkQOV49JyjirD1D4900cMu4p tfQVc2D5tqhGIGgF2365kGNErwhqIhw80ON5GLTdWgGEhxEM9bz3IJ78YDdfwyAuAC0X jMwLICdWK3LnhKVHSxfJ8KF05oWKcXflfCUZyGVY1ZaIBsQExpl/24j3AUPfzDWHtNKu a0CRlXKWkDPKhK2TNfDI723QTzXICt+W1yEsib7i97HEfiQNLwcku26jALQ/xWpUYBM8 n4cCdFfsniepPpZpGPGzfYb36Dq6h/sNNWyzhnQ9I2WT/qjSV7TmfTJANvsuZm0WWTlt D9gQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id e2si191182wrj.4.2021.10.14.08.46.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 08:46:44 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HVYfq6Pvtz1qwy6; Thu, 14 Oct 2021 17:46:43 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HVYfq6CtFz1qqkG; Thu, 14 Oct 2021 17:46:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id P-5v1mqHOs2A; Thu, 14 Oct 2021 17:46:42 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 14 Oct 2021 17:46:42 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 3D8B24540DCA; Thu, 14 Oct 2021 17:46:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BPI2m2fQPqA6; Thu, 14 Oct 2021 17:46:39 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 7874145407A7; Thu, 14 Oct 2021 17:46:39 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 2/3] Utility: detect and return root device Date: Thu, 14 Oct 2021 17:46:36 +0200 Message-Id: <20211014154637.2674613-2-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211014154637.2674613-1-sbabic@denx.de> References: <20211014154637.2674613-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , This can be used in startup scripts before starting the daemon. It helps to simplify scripts, and retrurns the device where root is mounted. To call it: swupdate -g or swupdate --get-root Signed-off-by: Stefano Babic --- core/swupdate.c | 12 +++++++++++- doc/source/swupdate.rst | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/swupdate.c b/core/swupdate.c index 3ad18e2..d651f8e 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -79,6 +79,7 @@ static struct option long_options[] = { #endif {"dry-run", no_argument, NULL, 'n'}, {"file", required_argument, NULL, 'f'}, + {"get-root", no_argument, NULL, 'g'}, {"help", no_argument, NULL, 'h'}, #ifdef CONFIG_HW_COMPATIBILITY {"hwrevision", required_argument, NULL, 'H'}, @@ -433,7 +434,7 @@ int main(int argc, char **argv) #endif memset(main_options, 0, sizeof(main_options)); memset(image_url, 0, sizeof(image_url)); - strcpy(main_options, "vhni:e:q:l:Lcf:p:P:o:N:R:Mm"); + strcpy(main_options, "vhni:e:gq:l:Lcf:p:P:o:N:R:Mm"); #ifdef CONFIG_MTD strcat(main_options, "b:"); #endif @@ -476,9 +477,18 @@ int main(int argc, char **argv) while ((c = getopt_long(argc, argv, main_options, long_options, NULL)) != EOF) { switch (c) { + char *root; case 'f': cfgfname = sdup(optarg); break; + case 'g': + root = get_root_device(); + if (root) { + printf("%s\n", root); + free(root); + } + exit(EXIT_SUCCESS); + break; case 'l': loglevel = strtoul(optarg, NULL, 10); break; diff --git a/doc/source/swupdate.rst b/doc/source/swupdate.rst index a81b87a..fb335ad 100644 --- a/doc/source/swupdate.rst +++ b/doc/source/swupdate.rst @@ -500,6 +500,8 @@ Command line parameters | --ca-\ | string | Available if CONFIG_SIGNED_IMAGES is set. | | path | | Path to the Certificate Authority (PEM). | +-------------+----------+--------------------------------------------+ +| --get-root | | Detect and print the root device and exit | ++-------------+----------+--------------------------------------------+ | -l | int | Set loglevel. | +-------------+----------+--------------------------------------------+ | -L | - | Send LOG output to syslog (local). | From patchwork Thu Oct 14 15:46:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1540975 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=t6uJ/mqq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::139; helo=mail-lf1-x139.google.com; envelope-from=swupdate+bncbcxploxj6ikrbzvbugfqmgqezdwlmta@googlegroups.com; receiver=) Received: from mail-lf1-x139.google.com (mail-lf1-x139.google.com [IPv6:2a00:1450:4864:20::139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVYfy71SXz9shn for ; Fri, 15 Oct 2021 02:46:50 +1100 (AEDT) Received: by mail-lf1-x139.google.com with SMTP id i6-20020a056512318600b003fd8c8c2677sf4676196lfe.1 for ; Thu, 14 Oct 2021 08:46:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634226407; cv=pass; d=google.com; s=arc-20160816; b=l9NLKA1hbpVlIvbUTi7hjUwqo0W8gTF3Noe8q65pXhXuZ+XTKYLacD5zbEmFsULYsd iAxrx93UYU9TJgOy3RCY+WIkPORHjqHzRER9C9tI78dVtCG0Oxr8yr84s2OQ5fPnSgI0 r2n/dK3vappTi8VtEyf+DGC4RIWc3flWzoBwI+BTR8QL5n+19I0hRCnqJMCNBCgxppWF NpnRGF6erQUkIV45soypQmVvXO2mPZycZ/6F1lKhH+udVeeofF56U4n+fcH/2/TA5kSh NPa0sMHMigj03EWHnzNHq9qXsDKKyqX4cFzpW+qXStQ28knri/TIIUCTjiNGSxx8Ai5P eYAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=8HAfU0TUgTqFrWEGz43SrioR72fodGZTyumeq+lciIc=; b=t7FcmzyP+bqE7Ufs3Xo5Ltcy0WGElsWYPLI/AnuCgZgsVjHXJvstjP9TfFMxsaymgO wp5DKdOeAJGSrPrtOkg0oq24bo8JvFd0ETeDcvrj2ARThP5UhVtuwVdL1fd0ZhmONOa7 svPT5QXmejr4pzI2kKckjXD02KeXyfPZKpNDjrNLTnZlPoLIb0pGuFngbCyAXfkkfS7/ X7FuqHwRR7uLdWc5ZmEYC151uUA/krIrQHG/NnmW2W5ziFDzxz92VJYHYQ8ZzFPNGPNS Fm5tfcf4CE1U6Yp58LhQRb0fX3Y3TAHzXWsVo0LSsLx58PzDheojSoPG4YC5DYRouuIx aLIQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=8HAfU0TUgTqFrWEGz43SrioR72fodGZTyumeq+lciIc=; b=t6uJ/mqq3IJBQHDREIqRKP+itcNJ0lIi/AgocCb1SjgKyZgvyr+gTmMeHAmc/58Zbe p0pc5Tfa1U4WhL5I0eDFAKvxgmxi9CTXIYUwA01PsxFD1r1MdKYCsMh1G/1MNZMLutCS TZ97igNLUM7aZ+m/VrU9K4oCAc8LX6bUp/1fENAS6TPpDHbfX53/74GMxaGOuzgykwQd x6NnwBb4olOVO3/QcW+dJE7EH/tjz7PJGy5ozk7qH1CdAM/r968iynEyz8rzJSgLM8Dp AMVXrjeS6QeaRFN0GAyrHz68OsEGMKFMTynDV3NSrhXd/reR3Bqn/EXkKU/dAl68RNPX McIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=8HAfU0TUgTqFrWEGz43SrioR72fodGZTyumeq+lciIc=; b=n4xZduvNzRMYkerVJArtpudReolxuF20PubS1c3xJMuzfCK+MQRrVJ6aOQHM7+HYte lODH1BZUF4do0w0uwsoJELiYkqBXqX9MibsGgVkdXgKt7snAfRAjsbIoSmpVZMfhTVOU yfZem6du/K8eS0nnXihISlmzelEXdQcWACfw/7jtH5st/3HmZir4Cyn8BG7oIjEFRCxP VGrezdPKp8JeRGs5Q4MoJpNo2eyi1pptGwWT5jucoxTSHrakeQRUARwJ2SoZAy8hgTs+ m7jgiliJm6NAZD5X4MW2yFVcQZnab8sT6eaB2wPsvspFzucJZtLlK9j0PdE0LphUuUkh 99nA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533TBIxZBBo4Xy5I2XiWmMxJqTif6pnQ2hFQx3IR4iL5qdZ6/TAD JZTVDKhYr8wpOBFVeuzs+mE= X-Google-Smtp-Source: ABdhPJzTtcWvGjWMASbQuex1bVn1cq3/ut3stHRySjTTsrwqXE9lAfuOJKMo3o1ZX68p42A3EXdedw== X-Received: by 2002:a05:6512:31c4:: with SMTP id j4mr5835443lfe.368.1634226407090; Thu, 14 Oct 2021 08:46:47 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:5c87:: with SMTP id q129ls1162185ljb.3.gmail; Thu, 14 Oct 2021 08:46:46 -0700 (PDT) X-Received: by 2002:a05:651c:1108:: with SMTP id d8mr6909887ljo.220.1634226406352; Thu, 14 Oct 2021 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634226406; cv=none; d=google.com; s=arc-20160816; b=zRdFL6L2m2qpAUiMJ+BZNsFuywK0sG+A6DQEYbCkupF2jjaCoRg5Gj29vDh/r5BHSD lGP0LNOCWUfPfF6XmFWHaKHAyVGeMQWMghkbwg+tVLa5DHceMJr2oNar6Q5p6FNummv6 Z9R4Bxtut0j+CcvEzo0zAAT/6P/mXs7s0lZ9NwgITpg0OS44iwgcg42BzekhKtRrYArX Ty59x5XUFKHaKkgcDf2vJtVCVkqNvYDLWSSoNrC+BWf4VqDM5mEnH9bgUMcXSd6tE/X8 cpZwtMYc6uGaMPvqIMfDlEN6k1f7zh/LekeFaDNqNHaOviVO0/6uYxYQ7NO1Fz3PpV7i 9vSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=HsKl69dcY7yryeOW5cvzKkrw33mjOcho6PY8CLPcZEI=; b=xD8a5yWDC5QRaBKdbY+bZrfLC2SgbPEqBJ1CDy4hARuXUsKveHyDWop77WRacm++uA czsmYA9Xpv6HBfHXOAtJq6JYZpmOTk4+oBa1FUwCNtX7aotgqusu3+YBav06n0jsZ5gu vdHk9TNSSAlmBqB7Nm5Ei4NpRyCIReIlXj0RA45qH+5yglwKjRHzxBr+fbecTRUfrcSb TKfjjx8OGM9fvpt4gmZL7KqZxjVihGDeRPb2w/m3YV6KeIR1OjoES1YQ7wzKZRM43o8k 5EyzUo7a9kVvWMUJBuNHrWQ36r293xKAMtcIsZgEiWjlfwxgQ5CwE7j79l8KMgzWAwdi yUBA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id o25si158065lfo.9.2021.10.14.08.46.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 08:46:46 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HVYfs3bTFz1rk5k; Thu, 14 Oct 2021 17:46:45 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HVYfs3L02z1qqkH; Thu, 14 Oct 2021 17:46:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id MWRZ9PlPMvRi; Thu, 14 Oct 2021 17:46:44 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 14 Oct 2021 17:46:44 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 7099C454034C; Thu, 14 Oct 2021 17:46:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i9E7tSX9cl_v; Thu, 14 Oct 2021 17:46:42 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 8DCB04540D24; Thu, 14 Oct 2021 17:46:39 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 3/3] cosmetic: align help output in suricatta Date: Thu, 14 Oct 2021 17:46:37 +0200 Message-Id: <20211014154637.2674613-3-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211014154637.2674613-1-sbabic@denx.de> References: <20211014154637.2674613-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- suricatta/server_hawkbit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index f8f560e..d4765ce 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1614,8 +1614,8 @@ void server_print_help(void) "\t -s, --connection-timeout Set the server connection timeout (default: 300s).\n" "\t -a, --custom-http-header Set custom HTTP header, " "appended to every HTTP request being sent.\n" - "\t -n, --max-download-speed Set download speed limit.\n" - "Example: -n 100k; -n 1M; -n 100; -n 1G\n", + "\t -n, --max-download-speed Set download speed limit.\n" + "\t Example: -n 100k; -n 1M; -n 100; -n 1G\n", CHANNEL_DEFAULT_POLLING_INTERVAL, CHANNEL_DEFAULT_RESUME_TRIES, CHANNEL_DEFAULT_RESUME_DELAY, INITIAL_STATUS_REPORT_WAIT_DELAY);