[{"id":1752874,"web_url":"http://patchwork.ozlabs.org/comment/1752874/","msgid":"<3ad264da-800e-191d-81e7-3b1ed842b76a@denx.de>","list_archive_url":null,"date":"2017-08-21T13:46:09","subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 17/08/2017 16:29, Christian Storm wrote:\n> (1) disallow options' values starting with '-' except for\n>     downloader, webserver, and suricatta doing their own\n>     cmdline parsing. Otherwise, e.g., this command\n>     $ swupdate -l -c -i <file>\n>     installs <file> instead of checking it due to -l's\n>     option value missing.\n> (2) abort on superfluous non-option cmdline arguments\n>     as SWUpdate doesn't use them, probably an usage error.\n> (3) check sensible combinations with suricatta mode\n> \n> Signed-off-by: Christian Storm <christian.storm@siemens.com>\n> ---\n>  core/swupdate.c | 24 ++++++++++++++++++++++++\n>  1 file changed, 24 insertions(+)\n> \n> diff --git a/core/swupdate.c b/core/swupdate.c\n> index b01aadd..f364bce 100644\n> --- a/core/swupdate.c\n> +++ b/core/swupdate.c\n> @@ -599,6 +599,12 @@ int main(int argc, char **argv)\n>  \t/* Process options with getopt */\n>  \twhile ((c = getopt_long(argc, argv, main_options,\n>  \t\t\t\tlong_options, NULL)) != EOF) {\n> +\t\tif (optarg && *optarg == '-' && (c != 'd' && c != 'u' && c != 'w')) {\n> +\t\t\t/* An option's value starting with '-' is not allowed except\n\nI have largely used kernel multi-line comments in SWUpdate. Of course,\nthis is not an issue, but before we are going into a jungle of different\ncode-styles, we should stick to one of them. And then to:\n\n/*\n * Multi line\n * comments\n */\n\n> +\t\t\t * for downloader, webserver, and suricatta doing their own\n> +\t\t\t * argv parsing. */\n> +\t\t\tc = '?';\n> +\t\t}\n>  \t\tswitch (c) {\n>  \t\tcase 'v':\n>  \t\t\tloglevel = TRACELEVEL;\n> @@ -680,6 +686,12 @@ int main(int argc, char **argv)\n>  \t\t}\n>  \t}\n>  \n> +\tif (optind < argc) {\n> +\t\t/* SWUpdate has no non-option arguments, fail on them */\n> +\t\tusage(argv[0]);\n> +\t\texit(1);\n> +\t}\n> +\n>  \t/*\n>  \t * Parameters are parsed: now performs plausibility\n>  \t * tests before starting processes and threads\n> @@ -698,6 +710,18 @@ int main(int argc, char **argv)\n>  \t\texit(1);\n>  \t}\n>  \n> +#ifdef CONFIG_SURICATTA\n> +\tif (opt_u && (opt_c || opt_i\n> +#ifdef CONFIG_DOWNLOAD\n> +\t\t|| opt_d\n> +#endif\n> +\t)) {\n> +\t\tfprintf(stderr, \"invalid mode combination with suricatta.\\n\");\n> +\t\tusage(argv[0]);\n> +\t\texit(1);\n> +\t}\n> +#endif\n\nI am not convinced this is required. First, it can be that one starts\nSWUpdate in the same way, but in one case just adding \"-c -i <file>\".\nAnd then starts SWUpdate with all options. Of course, SWUpdate exits,\nbut it does what it is supposed to do. Without this test, everything\nworks as expected: SWUpdate checks for a sw-description inside the file\nprovided with -i, parses and reports the result before exiting.\n\nI can also think that -d and -u are not mutually exclusive, but just a\nsecond server is available in case of Hawkbit failure (or viceversa).\n\nBest regards,\nStefano Babic","headers":{"Return-Path":"<swupdate+bncBAABBJ6I5PGAKGQETTPN3NA@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::238;\n\thelo=mail-lf0-x238.google.com;\n\tenvelope-from=swupdate+bncbaabbj6i5pgakgqettpn3na@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"Ii+KRg8d\"; dkim-atps=neutral"],"Received":["from mail-lf0-x238.google.com (mail-lf0-x238.google.com\n\t[IPv6:2a00:1450:4010:c07::238])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xbZj64Nrwz9ryQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 23:46:17 +1000 (AEST)","by mail-lf0-x238.google.com with SMTP id y15sf4487056lfd.2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 21 Aug 2017 06:46:17 -0700 (PDT)","by 10.28.150.151 with SMTP id y145ls113020wmd.3.canary-gmail; Mon,\n\t21 Aug 2017 06:46:14 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net.\n\t[2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id\n\tv202si2598177wmv.3.2017.08.21.06.46.14\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Aug 2017 06:46:14 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xbZj23gsPz1r64g;\n\tMon, 21 Aug 2017 15:46:14 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xbZj22tMbz3jgXn;\n\tMon, 21 Aug 2017 15:46:14 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id miN3wNCbhr9W; Mon, 21 Aug 2017 15:46:12 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tMon, 21 Aug 2017 15:46:12 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id D58C44540556;\n\tMon, 21 Aug 2017 15:46:11 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id k_1ef3l4ryIX; Mon, 21 Aug 2017 15:46:09 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id 3B4CA4540535;\n\tMon, 21 Aug 2017 15:46:09 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503323175; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=OYvXJkeA2kpNIgz/unPan00XI+Pl/PisC1x5wwFUYQVcjWmKEPrjXwAQK0HGDoV6r7\n\tpGxA1Gbd2ilHIbmOWmnEAJZTlNLXA5q9OgB3IUagr+qBxaaIVqBulFk2FuiXI+fRssaW\n\tk2VMYkHj++sCiNoQdmeQ3YEbfIojBK1T2U+3YRo6D4zPBZiDitKSYwAEaKSjN3/GXPys\n\t6KLpAbyQ0K1/+UWziZnULD5+e9DMRAorn2KrU5clXLUo0t+rCUhmAtlIL5ICZhUZ2Vz8\n\tL9US2fGcFJqjxEbDMXZIHPUePD0fNhMUzgB0LTity/tfA4BEJx+OKNouwSPbOdodEse5\n\tHyXA==","i=1; a=rsa-sha256; t=1503323174; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=Utp7XsYdtL8u26veX1m0TG/MGF0Vhdu9UCiZIn6qOL3oTI+G+ycWQKmCLmKkJha7YT\n\tazeRWIHPlVzk//cObxLNP2vPNZ+3PO/zSP54xyc+nUu7209q9Pz04HuPac4lWIF6DCXg\n\trIh5nQG22jDKOqAq3uLEtXzB5Nwice71j386iwIm/ujFj/mcByDvaiMRaq7duV3RznY0\n\tE63f93sbFtJ7W5AFrlqfoNGDvl33fxg2kDyk4BRD8turfFlZH/ek1TFw5ZLMItwuKtOo\n\tp2Q3G2R9F+akPO7oCxpV8HiiCYvGCkK1Qx+ejHR+9Z3W2ageUPT0ZGf85270c+sb/w5B\n\t0DZw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=kbMeqsAWyk0Wmnsn3tTjKvlJP1ZmCtTDJVUDRspirB8=;\n\tb=rbdD89+AZ7LYlnxbyctryXJ1mZFYkWJIiBXE3pv098BOqA8tOCg6cz6JhRKmQHZhxD\n\t2AWVT/22Wf2BmQo37z+OsUFXBUTRPL+kvpT5m9SEln91G+skbqHLAh9Vhi1zK7hyn5QF\n\twf6pki5Z23JoNuogVamuH0V6cTWjYF9zrDu0W1WB/gWAsu7fBWb+/4PR6jqRZc2+he16\n\tDTvCTr/oj6UL+grd64hwZlB7+jYaK96yL8BXZG6u+/n7qx9Zc/guwR0BupF6R++W6flw\n\tGGZdCFvSEIfaxVWB4XpMIwgMGb2nxmC/XqawRoPe+ZB4TU0dmM5UkWQeoAE2nav4+DlI\n\tvqfw==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results;\n\tbh=Rjc4/CXun5jwFagdvA94QzOI8Dvn+i1ZEU8AmxWPBaY=;\n\tb=Cstsw1lKMMunLAH5ZDHYKDfKrPcpXE+6DFlDWV+Wa7Dr0BMp5aWELQm1HweeI9U8ZP\n\tn7GiRPwoex+OaCq3vliudJEb9cNgQpDsUUhNhiMA77wozPzU37gjtaXVIjGc+UCfAape\n\tZRvkr2zCwp3V9qf/x+OPT8BDzPLaEXLxLFN56yO7QK4BfDR7rOKqOxyih1xuH7Ln8P9P\n\tnUXNZdxbC5d1325so9E1fuj+v+Uvp4pXg//tBGVsY3igABvtWL4efT2c1uM7D7IF/4HG\n\tWLntK+h9HyWlH8sB9PF0g0V2+mAFFtYnhJWbX7nTsWeoJDwqx7t1jqRWqhVuSGxu7oQD\n\t/ZmA=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted\n\tnor denied by best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted\n\tnor denied by best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=kbMeqsAWyk0Wmnsn3tTjKvlJP1ZmCtTDJVUDRspirB8=;\n\tb=Ii+KRg8d9rdMg3wDA/vCX0pulQekRjEeVo8iXf77/1kZasqSzhfGGdEYvIFYOXFoIo\n\tPdJxkJ6pxx4cERd1qmkTgnV1WO7QBSpcthZQA3ZIkxyvw5n9msdwqArVCHOy271l5HMb\n\tjBn8ujFjqh5G3O4xb5CfQ1yMy+415kQflryWtrchNMA/vFfsD0aBe/6DQ3H+qP9dYqb5\n\tK2XFVDG3Ru7gE9TnSmbP1DVduR7bOqE8xr9OU+qcH2yzQuAp8yjM/e34I4vbeHsmCtAw\n\tEXm+IN1R67fDRkpQaKw21l9TzQqd0RDL62yJWKQ2JXQRaGywa4uI/udA3Fn5oLSy9DoH\n\tG8tQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=kbMeqsAWyk0Wmnsn3tTjKvlJP1ZmCtTDJVUDRspirB8=;\n\tb=NylpapxNK2Cr/Aa+ESrSlZbBVP66V4LEGJhz3yAS2E+z6gz75GpAwSz6eDyahuw7sd\n\t/pkuS1xc+k+X1va/bXLGMAl96YfiS7+ILYVYl0IRrDWna9CG/0jqOTG0xE3BDCPs1C96\n\tLl1rnO8Bl2Y6LnPrHK5O0YFwXhekNKMgR9WxEvxOiJtpEFJKiTC5Or2lHdDPmT37mpf0\n\t9nYbSMnLGOn7LV2MTpfiGA5ECUsc3g2NYz5g0ZepsjCJW1+28Soa1fKY+TEIMD+W29ce\n\tkOYFodRuS3Tf1Kg5ZSa6K0q6z5r1+8VdudEpA9ZeNA1qJiHzn9OJuWOjBFc/Dv93UFkw\n\tbLBg==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5hZyBhdrMq/GdjPTPTk2ih8+YRS4l4DTNkHOhBMkLYhyWvYhQSz\n\tzAAvpMBby5L/dQ==","X-Received":["by 10.28.216.82 with SMTP id p79mr17127wmg.29.1503323175145;\n\tMon, 21 Aug 2017 06:46:15 -0700 (PDT)","by 10.223.199.211 with SMTP id y19mr659757wrg.23.1503323174791; \n\tMon, 21 Aug 2017 06:46:14 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither\n\tpermitted nor denied by best guess record for domain of\n\tsbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","To":"Christian Storm <christian.storm@siemens.com>, swupdate@googlegroups.com","References":"<20170817142942.4328-1-christian.storm@siemens.com>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<3ad264da-800e-191d-81e7-3b1ed842b76a@denx.de>","Date":"Mon, 21 Aug 2017 15:46:09 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170817142942.4328-1-christian.storm@siemens.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"en-GB","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied\n\tby best\n\tguess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1753812,"web_url":"http://patchwork.ozlabs.org/comment/1753812/","msgid":"<20170822120649.fnldvrbpj4qiqnsb@MD1KR9XC.ww002.siemens.net>","list_archive_url":null,"date":"2017-08-22T12:06:49","subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/","name":"Storm, Christian","email":"christian.storm@siemens.com"},"content":"Hi Stefano,\n\n> > (1) disallow options' values starting with '-' except for\n> >     downloader, webserver, and suricatta doing their own\n> >     cmdline parsing. Otherwise, e.g., this command\n> >     $ swupdate -l -c -i <file>\n> >     installs <file> instead of checking it due to -l's\n> >     option value missing.\n> > (2) abort on superfluous non-option cmdline arguments\n> >     as SWUpdate doesn't use them, probably an usage error.\n> > (3) check sensible combinations with suricatta mode\n> > \n> > Signed-off-by: Christian Storm <christian.storm@siemens.com>\n> > ---\n> >  core/swupdate.c | 24 ++++++++++++++++++++++++\n> >  1 file changed, 24 insertions(+)\n> > \n> > diff --git a/core/swupdate.c b/core/swupdate.c\n> > index b01aadd..f364bce 100644\n> > --- a/core/swupdate.c\n> > +++ b/core/swupdate.c\n> > @@ -599,6 +599,12 @@ int main(int argc, char **argv)\n> >  \t/* Process options with getopt */\n> >  \twhile ((c = getopt_long(argc, argv, main_options,\n> >  \t\t\t\tlong_options, NULL)) != EOF) {\n> > +\t\tif (optarg && *optarg == '-' && (c != 'd' && c != 'u' && c != 'w')) {\n> > +\t\t\t/* An option's value starting with '-' is not allowed except\n> \n> I have largely used kernel multi-line comments in SWUpdate. Of course,\n> this is not an issue, but before we are going into a jungle of different\n> code-styles, we should stick to one of them. And then to:\n> \n> /*\n>  * Multi line\n>  * comments\n>  */\n\nOops, I haven't noticed that yet and probably did all my patches wrong :)\nI'll try to consider this in my next patches...\n\n> > +\t\t\t * for downloader, webserver, and suricatta doing their own\n> > +\t\t\t * argv parsing. */\n> > +\t\t\tc = '?';\n> > +\t\t}\n> >  \t\tswitch (c) {\n> >  \t\tcase 'v':\n> >  \t\t\tloglevel = TRACELEVEL;\n> > @@ -680,6 +686,12 @@ int main(int argc, char **argv)\n> >  \t\t}\n> >  \t}\n> >  \n> > +\tif (optind < argc) {\n> > +\t\t/* SWUpdate has no non-option arguments, fail on them */\n> > +\t\tusage(argv[0]);\n> > +\t\texit(1);\n> > +\t}\n> > +\n> >  \t/*\n> >  \t * Parameters are parsed: now performs plausibility\n> >  \t * tests before starting processes and threads\n> > @@ -698,6 +710,18 @@ int main(int argc, char **argv)\n> >  \t\texit(1);\n> >  \t}\n> >  \n> > +#ifdef CONFIG_SURICATTA\n> > +\tif (opt_u && (opt_c || opt_i\n> > +#ifdef CONFIG_DOWNLOAD\n> > +\t\t|| opt_d\n> > +#endif\n> > +\t)) {\n> > +\t\tfprintf(stderr, \"invalid mode combination with suricatta.\\n\");\n> > +\t\tusage(argv[0]);\n> > +\t\texit(1);\n> > +\t}\n> > +#endif\n> \n> I am not convinced this is required. First, it can be that one starts\n> SWUpdate in the same way, but in one case just adding \"-c -i <file>\".\n> And then starts SWUpdate with all options. Of course, SWUpdate exits,\n> but it does what it is supposed to do. Without this test, everything\n> works as expected: SWUpdate checks for a sw-description inside the file\n> provided with -i, parses and reports the result before exiting.\n\nYes, and you gave SWUpdate parameters that aren't respected, i.e.,\nthey're ignored and hence superfluous. While this seems more convenient\nto some, I would wonder why the superfluous parameters were not\nrespected and SWUpdate exits instead of, e.g., going to suricatta daemon\nmode in this example. I'd prefer SWUpdate not to silently not react to\nsome parameters I gave it because of some \"internal wirings\". At least\nthis wiring then has to be documented (in the docs as well as in\n--help). So, summing up, I think if I tell it what to do and this is an\nallowed parameter combination (has to be sensibly defined), it should do\nwhat I told it, all of it.\nBut I guess this is a matter of personal taste and hence not\nreally debatable :)\nThat said, I'm fine with dropping this patch entirely or taking some \nparts of it as v2 as you like and which you like?\n\n\n> I can also think that -d and -u are not mutually exclusive, but just a\n> second server is available in case of Hawkbit failure (or viceversa).\n\nYes, sure, this has to be adapted to the growing feature set of SWUpdate\nonce these features are implemented. But this is true for almost all\nfeatures: Once they're implemented you have to supply the \"wiring\" but\nin my opinion there's no sense in not doing, e.g., sanity checking in\nhindsight of potential features which aren't there yet. It simply has to\nbe adapted when the features arrive.\n\n\nKind regards,\n   Christian","headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBBUV56DGAKGQE5F4FQRQ@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::238;\n\thelo=mail-lf0-x238.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbuv56dgakgqe5f4fqrq@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"CItqCqDA\"; dkim-atps=neutral"],"Received":["from mail-lf0-x238.google.com (mail-lf0-x238.google.com\n\t[IPv6:2a00:1450:4010:c07::238])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xc8VH09bTz9s8P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Aug 2017 22:08:53 +1000 (AEST)","by mail-lf0-x238.google.com with SMTP id y15sf5244032lfd.2\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Aug 2017 05:08:52 -0700 (PDT)","by 10.25.115.65 with SMTP id o62ls354469lfc.14.gmail; Tue, 22 Aug\n\t2017 05:08:49 -0700 (PDT)","from goliath.siemens.de (goliath.siemens.de. [192.35.17.28])\n\tby gmr-mx.google.com with ESMTPS id\n\t187si3270737wmj.0.2017.08.22.05.08.49\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 22 Aug 2017 05:08:49 -0700 (PDT)","from mail3.siemens.de (mail3.siemens.de [139.25.208.14])\n\tby goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v7MC8nW9001193\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Tue, 22 Aug 2017 14:08:49 +0200","from localhost ([139.25.68.253])\n\tby mail3.siemens.de (8.15.2/8.15.2) with ESMTPS id v7MC8ndX031852\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)\n\tfor <swupdate@googlegroups.com>; Tue, 22 Aug 2017 14:08:49 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503403730; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=LXuTjJ/Rzk6901z5J6VqFU8uFFMzG86rtDjz+ZZmLana98cGxLRU8pj4T49HxF4fTa\n\tHPwi574HJb+GuNN6kmkwaDY2/tUsy7hrlyYzTdkSBtp/wyr5HGBqB4RMYC77LTD1EJ40\n\t9nEs8SodLLHpkRTAY2i4RTjKnAY3pMgolmsnpT8zVETsGBKYsv3Pj6e7eelgaf4/Wt3s\n\tl59uRDNzmHfoA09BLDnzHjdRxaHvWnBE9V2+UNl3wXx+lhgfNDQgAmHZNo7egAlq9kCy\n\t/o6h8NJ8881gXphDFPgb9fJGSgURMI99vk8nh1w3zo3SSPyoJ2H0K0pMlh+tQyf8hSlc\n\tScOA==","i=1; a=rsa-sha256; t=1503403729; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=N6qJuOQRkdgcPvfW37tuyXq192//qk1RJk3SaxgQuS+ZqR+kOaSIwSToO1/BLwihkN\n\t1MVeHQzcNbwOGRhpFZFWl6OXNjtOWE1xQTyPbSgJtvZskVZ7R8FwJr5B5PZ8E7lSK5dP\n\tlJmi6s48cSxJuE+a9CnFD9nNDENQySzWQvkV9Z6eyaVpm1aH4H9098AkvDTl4Se0npmP\n\t7Uwzi8QBIogkfqIFa2DhCN6MPS/MgcEpP4f6U52GBrG4XdomZdyEus3TVtxGhiuXaAnF\n\t8QQ+AeHOC4xTF7TMG0xhqlCGt0z1sm6avhs8Vp/D1DzFo9DpT8IIH2hTgK6bQHv7C/Gq\n\t0f3g=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:user-agent:in-reply-to\n\t:content-transfer-encoding:content-disposition:mime-version\n\t:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=1lZyzKCuwpEBx/5FFYstaqTcHfsmBJ72o2IbOmiS1wU=;\n\tb=xC56ZOC9Ib/7Gjb1nr5Lnq9ds3eQ/ziCZQFeCXJbDa8p7E/ZciUB+2VLjgY32ISoQn\n\tGce0UqRR2ZtWmqXsWWZij1yTCXn5LsVBnf3O9iEr47V5kIG96w9rjF/tlKs3TgnBycWG\n\tuzdYX0O1VK+PGx86XMs2ckVbse3/S78PF+MBa/WOEOSHPGS47VcPd0akbgPk6aNRMJEV\n\txBz/cbUcsy6WAAGm+4wnIH+oqDW7JTQk0tYDYBWK2JCtSTIzb+BOhcfqC5x4qsmhmAub\n\thZlocLA5/Pxquf/x4t1uZnwFUz07+IBZdnNVcY7ta3S5+IRonKjo77tXvtacZPHmUyt9\n\t7dwA==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=user-agent:in-reply-to:content-transfer-encoding\n\t:content-disposition:mime-version:mail-followup-to:message-id\n\t:subject:to:from:date:arc-authentication-results;\n\tbh=HAWoFFaxeR+hRlq1j2OcURtQ4hvPQn4ahuN1TlRrJVA=;\n\tb=p7SigKMteC6I4A7acqjh092btdzKHNjC0ybDF46IWayfGFw6xvBEiSv9K10FsoMqws\n\t7ImKyWCLQH2lHLfDjOm7e8m+dIqoaS7YxljhSc3fZ+2Gi8IJAgggjjh5BEH7X0cbzyLp\n\tKggMR4MC84lfFAALKZ4iqm686dZOVGpJbrvJrOonp8K/NGEyGDK8HvEdfAIFjLDzOiED\n\tGlpPwzwU9X9Ix7/7cN7Y4UPUwdYOqQRv5/Vwk0vEBQlNHssi7nXckSCp/5lZIFVk7UGb\n\tm/QU3SKSs1q8rTYDiRUHh9J9LpJw2KapGXjMbswM9NPZtcobALRG9QNDPAp45MGl9c8Q\n\tnoRw=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.28 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:date:from:to:subject:message-id:mail-followup-to\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=1lZyzKCuwpEBx/5FFYstaqTcHfsmBJ72o2IbOmiS1wU=;\n\tb=CItqCqDA1zaMFUGUYGP6NYa4AJe8bd0rEcOsCyckpuc2vuqR5OmOUGms+WQ3wZM+23\n\t0htwOpnMjTStWqPrpb5UJNaMvNgcJX34lVpk7eWP6Tjd9Y7F+79e9X1AMYTKgsxDLSkT\n\thPfDBJSEKGL1j4+5FPCddVKOtSIuIW7WwivJlyZxtzHPw/e2ZHkW+anML/fYS4Yz8/hC\n\tUnbplK8h9K90PbxUGKetTgr8QbpWN6zZ+dKF9zRlsuOlhGjETT9L+GkMxmOTXc3VE2Qv\n\tp3xcHlKzLtLx5HK3/zGGXbSehNH0HyRnR9QWS5952dEfg4GuVrtz8/1T6r9pyEFgZ2eg\n\tMNjg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:date:from:to:subject:message-id\n\t:mail-followup-to:mime-version:content-disposition\n\t:content-transfer-encoding:in-reply-to:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:x-spam-checked-in-group:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=1lZyzKCuwpEBx/5FFYstaqTcHfsmBJ72o2IbOmiS1wU=;\n\tb=C2A6ZMo5MyK60iW6+NplfxfEZWS7CmtzjwHHzaOIn/lQ3EScDUu3PEu1RoCduWPSf8\n\tNxvCAsBliWbWSO9BAE4KoUpe7nNK6jgEcgyLNK3ELFlm8lM46dJ0HgcbUw4klI3KvrN+\n\t1w3ybAQbrpY3cffz2LerkndfsC6RSyDK2OQBKEpMFMdz4YwPMmHMQQkYt8RVKPFgiMU1\n\t+dt3L7XV6x973PewEjLPwSkGs2rRCC46EcXqnuuqb90SdGOtt0MYw/jWQ5idYyNcsv8u\n\tiI+Soiv5XRSl+jBCS+elExFzMYcrSop/ZB/fEVWTiQ8YyPqKjevnYVpo5HhfZrdMVuX0\n\tK0DA==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5jDatVVpZG9jAF0h2KzAYLdNHF9/xiquij0oxAANQgcNgAxx5qZ\n\tkx9e+vlZum/L3g==","X-Received":["by 10.46.5.208 with SMTP id 199mr1163ljf.20.1503403730305;\n\tTue, 22 Aug 2017 05:08:50 -0700 (PDT)","by 10.25.166.210 with SMTP id p201mr61926lfe.9.1503403729758;\n\tTue, 22 Aug 2017 05:08:49 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.28 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.28; ","Date":"Tue, 22 Aug 2017 14:06:49 +0200","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","Message-ID":"<20170822120649.fnldvrbpj4qiqnsb@MD1KR9XC.ww002.siemens.net>","Mail-Followup-To":"swupdate@googlegroups.com","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Disposition":"inline","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<3ad264da-800e-191d-81e7-3b1ed842b76a@denx.de>","User-Agent":"Mutt/20170113 (1.7.2)","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.28 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}},{"id":1755427,"web_url":"http://patchwork.ozlabs.org/comment/1755427/","msgid":"<2a9c51d7-a92a-09b9-27a2-89bee07c5f17@denx.de>","list_archive_url":null,"date":"2017-08-23T15:50:00","subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Christian,\n\nOn 22/08/2017 14:06, Christian Storm wrote:\n> Hi Stefano,\n> \n>>> (1) disallow options' values starting with '-' except for\n>>>     downloader, webserver, and suricatta doing their own\n>>>     cmdline parsing. Otherwise, e.g., this command\n>>>     $ swupdate -l -c -i <file>\n>>>     installs <file> instead of checking it due to -l's\n>>>     option value missing.\n>>> (2) abort on superfluous non-option cmdline arguments\n>>>     as SWUpdate doesn't use them, probably an usage error.\n>>> (3) check sensible combinations with suricatta mode\n>>>\n>>> Signed-off-by: Christian Storm <christian.storm@siemens.com>\n>>> ---\n>>>  core/swupdate.c | 24 ++++++++++++++++++++++++\n>>>  1 file changed, 24 insertions(+)\n>>>\n>>> diff --git a/core/swupdate.c b/core/swupdate.c\n>>> index b01aadd..f364bce 100644\n>>> --- a/core/swupdate.c\n>>> +++ b/core/swupdate.c\n>>> @@ -599,6 +599,12 @@ int main(int argc, char **argv)\n>>>  \t/* Process options with getopt */\n>>>  \twhile ((c = getopt_long(argc, argv, main_options,\n>>>  \t\t\t\tlong_options, NULL)) != EOF) {\n>>> +\t\tif (optarg && *optarg == '-' && (c != 'd' && c != 'u' && c != 'w')) {\n>>> +\t\t\t/* An option's value starting with '-' is not allowed except\n>>\n>> I have largely used kernel multi-line comments in SWUpdate. Of course,\n>> this is not an issue, but before we are going into a jungle of different\n>> code-styles, we should stick to one of them. And then to:\n>>\n>> /*\n>>  * Multi line\n>>  * comments\n>>  */\n> \n> Oops, I haven't noticed that yet and probably did all my patches wrong :)\n> I'll try to consider this in my next patches...\n> \n\nThanks !\n\n>>> +\t\t\t * for downloader, webserver, and suricatta doing their own\n>>> +\t\t\t * argv parsing. */\n>>> +\t\t\tc = '?';\n>>> +\t\t}\n>>>  \t\tswitch (c) {\n>>>  \t\tcase 'v':\n>>>  \t\t\tloglevel = TRACELEVEL;\n>>> @@ -680,6 +686,12 @@ int main(int argc, char **argv)\n>>>  \t\t}\n>>>  \t}\n>>>  \n>>> +\tif (optind < argc) {\n>>> +\t\t/* SWUpdate has no non-option arguments, fail on them */\n>>> +\t\tusage(argv[0]);\n>>> +\t\texit(1);\n>>> +\t}\n>>> +\n>>>  \t/*\n>>>  \t * Parameters are parsed: now performs plausibility\n>>>  \t * tests before starting processes and threads\n>>> @@ -698,6 +710,18 @@ int main(int argc, char **argv)\n>>>  \t\texit(1);\n>>>  \t}\n>>>  \n>>> +#ifdef CONFIG_SURICATTA\n>>> +\tif (opt_u && (opt_c || opt_i\n>>> +#ifdef CONFIG_DOWNLOAD\n>>> +\t\t|| opt_d\n>>> +#endif\n>>> +\t)) {\n>>> +\t\tfprintf(stderr, \"invalid mode combination with suricatta.\\n\");\n>>> +\t\tusage(argv[0]);\n>>> +\t\texit(1);\n>>> +\t}\n>>> +#endif\n>>\n>> I am not convinced this is required. First, it can be that one starts\n>> SWUpdate in the same way, but in one case just adding \"-c -i <file>\".\n>> And then starts SWUpdate with all options. Of course, SWUpdate exits,\n>> but it does what it is supposed to do. Without this test, everything\n>> works as expected: SWUpdate checks for a sw-description inside the file\n>> provided with -i, parses and reports the result before exiting.\n> \n> Yes, and you gave SWUpdate parameters that aren't respected, i.e.,\n> they're ignored and hence superfluous. While this seems more convenient\n> to some, I would wonder why the superfluous parameters were not\n> respected and SWUpdate exits instead of, e.g., going to suricatta daemon\n> mode in this example. I'd prefer SWUpdate not to silently not react to\n> some parameters I gave it because of some \"internal wirings\". At least\n> this wiring then has to be documented (in the docs as well as in\n> --help).\n\nHere you are absolutely right !\n\n> So, summing up, I think if I tell it what to do and this is an\n> allowed parameter combination (has to be sensibly defined), it should do\n> what I told it, all of it.\n> But I guess this is a matter of personal taste and hence not\n> really debatable :)\n\nYes, and I do not know myself which is the best approach. To take care\nof your patch, you should at least drop the line :\n\n+#ifdef CONFIG_DOWNLOAD\n +\t\t|| opt_d\n\nbecause this could be a use case. But I agree that -c / -i are mutually\nexclusive with suricatta.\n\nThe other point I have seen when I tested your patch is:\n\n+\t\tfprintf(stderr, \"invalid mode combination with suricatta.\\n\");\n\nThis is an error and should be noted very well. However, due to usage()\noutput, the real reason is not so evident. I think it is better just to\nreport the error (maybe with the note \"run swupdate -h\") without calling\nusage().\n\n\n> That said, I'm fine with dropping this patch entirely or taking some \n> parts of it as v2 as you like and which you like?\n\nI am fine if you could rework this patch with the changes we have\ndiscussed :-)\n\n> \n> \n>> I can also think that -d and -u are not mutually exclusive, but just a\n>> second server is available in case of Hawkbit failure (or viceversa).\n> \n> Yes, sure, this has to be adapted to the growing feature set of SWUpdate\n> once these features are implemented. \n\nRight - but just for this case: downloader and hawkbit are already\nimplemented. That means this can already be a use case.\n\n> But this is true for almost all\n> features: Once they're implemented you have to supply the \"wiring\" but\n> in my opinion there's no sense in not doing,\n\nFully agree.\n\n> e.g., sanity checking in\n> hindsight of potential features which aren't there yet. It simply has to\n> be adapted when the features arrive.\n\nFully agree, again.\n\nBest regards,\nStefano","headers":{"Return-Path":"<swupdate+bncBAABBM6I63GAKGQEO3T4RTY@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23a;\n\thelo=mail-lf0-x23a.google.com;\n\tenvelope-from=swupdate+bncbaabbm6i63gakgqeo3t4rty@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"o5ou6Alr\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23a.google.com (mail-lf0-x23a.google.com\n\t[IPv6:2a00:1450:4010:c07::23a])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xcsMC5hKlz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 01:50:14 +1000 (AEST)","by mail-lf0-x23a.google.com with SMTP id 79sf316611lfs.13\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 08:50:14 -0700 (PDT)","by 10.46.21.18 with SMTP id s18ls558397ljd.49.gmail; Wed, 23 Aug\n\t2017 08:50:11 -0700 (PDT)","from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9])\n\tby gmr-mx.google.com with ESMTPS id\n\tg21si286144wmd.0.2017.08.23.08.50.11\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 23 Aug 2017 08:50:11 -0700 (PDT)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xcsM738MVz1rL1S;\n\tWed, 23 Aug 2017 17:50:11 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xcsM60FyTz3jgYK;\n\tWed, 23 Aug 2017 17:50:10 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id E1efSk99IHEc; Wed, 23 Aug 2017 17:50:04 +0200 (CEST)","from babic.homelinux.org\n\t(host-88-217-136-221.customer.m-online.net [88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tWed, 23 Aug 2017 17:50:04 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id 5E925454052E;\n\tWed, 23 Aug 2017 17:50:03 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id yEiSDYpNe8Ou; Wed, 23 Aug 2017 17:50:00 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id 9E5374540447;\n\tWed, 23 Aug 2017 17:50:00 +0200 (CEST)"],"ARC-Seal":["i=2; a=rsa-sha256; t=1503503412; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=sV6Uvhh7qSdrKw5OQyjqil4461OQvQqaM0Sq6oDgxSGOWlXLxGjav1mZD+lxdwDRXe\n\t7G9pRBhVwgZuRyeNReyi5F7OVLW1YCUykScAGdpqkVuZeQIwMhdbj2pfuqxB99eBwBSo\n\tdqsqNVBGnYJ9lhdbnKd08Ak31YhtplL7Q2JBRBZiN357fdpuxPtZ1crS6AWXzdMDkZ+H\n\tr1p+97tscrfT5OpggSC8M4NGuESgMOMrUix1vuHdKVVjda7GUUzvyMJ6Bv0m/n0zjKDf\n\tb75qwUqN02N8xTTRZX2jph6DwdZkrB4/DoVAG7yjpTtmaK5w0OS93Q8yrxcpWk6jCpFQ\n\t6ksA==","i=1; a=rsa-sha256; t=1503503411; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=xwXHekbt5y9Z0kZl9RJ12ZiUvqNWJO2KI3Fk4lzLh5LfX3A/ASS24qZ2cToaeKihYd\n\tt41VMpzurwGcvHISQd7QK+aWBqRTwRZwDBH7jCzKXmf0Fy8RHo5X0kuDp/ndObI9QA9n\n\tAG81mibBF/RgGN9W5LmiHX0ZEZwW+XDx/GXRVITYH0fqu/vI/nFcfuqszICDZTItqedj\n\tdkEDIE2BJz8ct90OgxezADUwQQWMF3yKrWgu6K443LNLdLEr9VpxIFDYOi5DwL6JcrbU\n\tbby41l9DRndci3AwtqUiNyyu+D51cOOEVUQCvPc4W3b2VTlnQux6rxBPAgRpRIFntWlK\n\t7FBQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:content-language:in-reply-to\n\t:mime-version:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=8PrJIbvTN7syn497OSpQuYOKS+M9ul+9+gNaAbyWH+Y=;\n\tb=qv6nZpqOuaH4F8BtDCNx8rToKa/fEWaEg2bDlc5E3SFzbD0+Metf5NR/MKL7wT7Cp8\n\t6BINEJKRKY2RiAnGsYFEnhscYLYgYFZS+XP9DEJAS02hBL/c0WlfTynfLdA1tcXyMOwK\n\tO4AINeja+9YMyErFup7BPhINz/XA6PZA0G24izte0JfO8Vm1k1TiUe+5yULc0ZVE76sN\n\tlTvS7wUSZ3Z/OZwsJGQzQXpJRVjrpUdi/+sfnaAhRrv/OoFCSNH7gfwBNreY6Ma9EBl7\n\tXBbLdCn0L3e3fmZac22Zt6CiblPujT4gJ9iYS4/aFkQXJr2ziha2yaKEiQWLeFUKfyWp\n\tY3vg==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=content-transfer-encoding:content-language:in-reply-to:mime-version\n\t:user-agent:date:message-id:from:references:to:subject\n\t:arc-authentication-results;\n\tbh=ArPDXCwaStez6Q+G8dUVYAJHjPBEQmfB96iL/wDiD1Q=;\n\tb=YAkppNkawy+lPkP39qDSmqNZeL7V8V70zcZSdsMcs6i1FlnyBwadPYArltPYWe9ZT+\n\t3uz4j2tKGmAuB316T2roR3PDA5/GfM74OJtwrJp2lBZBb9+wR2OUtenwwliVe3VulQLf\n\tOjzFb7hEQl0ZMA3c/oTZ3gPJRP797eojGqk/r0ANEfPOU0k5NRnDRtgWs3SbPSUTJhBZ\n\t7rzbvghGIvpwVn6PodzkEblJwTtv1AD3XeclcRWgemUGKFYr5HP2BtXGcwiSH7BD6/Q6\n\t0IJjlfAug4AwZbt+aNm/40r1OKOIJxAYH9+zw/B9SJ5xbd5un1hyWExp7aVXrHu/BqpG\n\t9GZg=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 212.18.0.9 is neither permitted nor denied\n\tby best guess record for domain of sbabic@denx.de)\n\tsmtp.mailfrom=sbabic@denx.de"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:subject:to:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:list-post:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=8PrJIbvTN7syn497OSpQuYOKS+M9ul+9+gNaAbyWH+Y=;\n\tb=o5ou6AlreENGvkLf5ga/AGVi2eLwGi8ffQhn5hNmMJNEGysUCOpjt3NUuC/xkzNjIY\n\t3uFzlyq8o9s44fCw0nNOc1uxPwLhqX+30otYpFnx6ffHpi2sIumqJEweNYQMW+3RDZZh\n\tucqDwDZXjZ939vlGJqgyg3EJ8Rg6UB7elYXPmin4A1KNeIQg6gnLfntHZPUR51tBHXIF\n\tLDzrCAtQi52uvcxpJ+u7A4w5KBg5YsayzlRd+TuXkahJ+oz6Vb8BnQDeRo6EzdTx7jZF\n\tiS/4qytBh/ccZMqwjb8BVLgRy9yFUATzbTMOrio7dpmJRZhGDV7OEQrRVUB+wnGUgqrg\n\txzwQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:subject:to:references:from:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:x-spam-checked-in-group:list-post:list-help\n\t:list-archive:list-subscribe:list-unsubscribe;\n\tbh=8PrJIbvTN7syn497OSpQuYOKS+M9ul+9+gNaAbyWH+Y=;\n\tb=EhVVqAWETbFwj3TzK6uYeelUtswN3/lXSxDRMxw1TmipU9kM3WoX0PzIZaJdJcamaW\n\tk5vtl0WOmhuhPfnaQDHGSi8/vYOII/OY0lPXjqdeB8SjA48ZGnrVGK2J2/alx8jqCoLK\n\tVTgv99hweW9/vy64Zsfr5YVjfzbeRMfvVey72qJJ1oE1NTPrvjZGZGdbibzlUMY6GeiE\n\tBjPCc7GSqLY6t42s/sKwnEjH/x9UtXueZJackkmQQADSDhglnRWQAKCUVYZn5/6l3Mir\n\tzXwiEXzBwQnFA77XdkWe4OcuVES7lfFmtA9NbkkhQ+iDmY4z3G6Olst0jp6CYUGMzzRk\n\tqErQ==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHYfb5hhgcaCDet3VBr6/pcO9hsdR8RCb9UXAOqjf6Gk4NRVMIadwX5e\n\tdYXKbNKencqjcg==","X-Received":["by 10.25.40.148 with SMTP id o142mr5054lfo.3.1503503412177;\n\tWed, 23 Aug 2017 08:50:12 -0700 (PDT)","by 10.25.205.197 with SMTP id d188mr324265lfg.37.1503503411680; \n\tWed, 23 Aug 2017 08:50:11 -0700 (PDT)"],"X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 212.18.0.9 is neither permitted nor\n\tdenied by best guess record for domain of sbabic@denx.de)\n\tclient-ip=212.18.0.9; ","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"Subject":"Re: [swupdate] [PATCH resent] core: make cmdline parsing more robust","To":"swupdate@googlegroups.com, Christian Storm <christian.storm@siemens.com>","References":"<20170822120649.fnldvrbpj4qiqnsb@MD1KR9XC.ww002.siemens.net>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<2a9c51d7-a92a-09b9-27a2-89bee07c5f17@denx.de>","Date":"Wed, 23 Aug 2017 17:50:00 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170822120649.fnldvrbpj4qiqnsb@MD1KR9XC.ww002.siemens.net>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Language":"de-DE","X-Original-Sender":"sbabic@denx.de","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 212.18.0.9 is neither permitted nor denied by best guess\n\trecord\n\tfor domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"}}]