From patchwork Thu May 30 08:20:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1941570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=kgM87l87; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2001:4860:4864:20::3a; helo=mail-oa1-x3a.google.com; envelope-from=swupdate+bncbcwivbv7sugrbrpn4czamgqewerfsta@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-oa1-x3a.google.com (mail-oa1-x3a.google.com [IPv6:2001:4860:4864:20::3a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VqfMK0lLqz20WX for ; Thu, 30 May 2024 18:20:27 +1000 (AEST) Received: by mail-oa1-x3a.google.com with SMTP id 586e51a60fabf-24fc0fe50adsf655176fac.1 for ; Thu, 30 May 2024 01:20:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717057223; cv=pass; d=google.com; s=arc-20160816; b=Fm543fF0JIXbqgyoSBwdy++FntwEnHOm861lrVvukG9tUZTfzQaDvR/AX74nxCl3c9 Ye0HLUNTfBJBUUPNW1F0kYm+frvBDIhudZVlw8JpHzxoBvuUGJ2NH5W09fpfwkwbDMFC p1Z7BnvpcUfo1qGdUYBWUU685Wbm5ILR6ByM/WXJHD12d9g8YoZBXwAVYUpCiWRzisOS o7NBg+T7g1T4al1RUhGeNrlG8VAA6uZRUW5qUQO2LcwwCanqWFsVFhaZKSAalBMZ396k mb11fRMmgVHY+jBqEiwaLxfwj7VgLm5+Frimmj1R+MRtY1gWUjlDbR4I1kWR0g3W2527 JZvQ== 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=EqoDmbHKfYzkfU2yGEQoqwmCCTGS9nnXK8prukxGums=; fh=ZaxlO5bkcKE3JTq0BhOPcbiOZ8lw9Kv4uhXogwa71ZY=; b=VAYYlcspIap5Y9JeGP6TEpnuKJ5B2V6/bYkdYNk418KsSSjgGijTib00UDiPS9mT8S 6fXKC4kv0ST8iu11pncxlP2HtBaDYikNplz4Jmf6DspPp9gSxKNoiDYgEIxAGY56uIJg nrhao3F1DxGZ4u8uDdVDHk9GLBQIAR67ctCfaWXvgNF8fK8mkbxaXJBMr8F6mnJSmVQa VwFTEaSok2W7aoilfOoHdMBDbvcelUGr2Ht1DiXLcwXz+ei8FHdYOboUAmQ48Et561LB x87I775qMCKV7skhFslrrUWXRm2ZaRfZl7/Ol6jxU91AzZE+BhEy4jR5RDx4imIXedWR J3gQ==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@atmark-techno.com header.s=gw2_bookworm header.b=JeWMbuRr; dkim=pass header.i=@atmark-techno.com header.s=google header.b=Ra2zbWhD; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1717057223; x=1717662023; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=EqoDmbHKfYzkfU2yGEQoqwmCCTGS9nnXK8prukxGums=; b=kgM87l87ffPo3mcbuaN13aqB5q5rCjfaEYxchHxEFW9CVyfqQpusioaMi66/P7Ji3e aDtrU92hLMvoq+rhMU/Ci4NpJpRYhPXFF5Iza+P1eLTnng4e7GCR3/uc3I4tulmyHexs eppfM4yvrcPAbJfQdhlUHVUJ/SW+UZoJIlWMj3qABNTIlducmLvupoDx8G5ogpGiZCCq ehe1RxiJguSOT59JW7ydOztAs8ZurUv3hlUeOvICVoJ3IE9C3AqyhwgyLEjLqGBji2E+ /Dyo98HqfDQ4XqnEKCSTfGNGRVJa2GtF2OTAi73k9Qogm3BLl6SUNSSOAbfuEYVGBwIa JbQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717057223; x=1717662023; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=EqoDmbHKfYzkfU2yGEQoqwmCCTGS9nnXK8prukxGums=; b=niPFPVetu27NFtUabN0kw/3EzibNBxpSAoYlup0bZPDYXLoSP+FpchDGRP+yLhpQWK ibLpYYdlLesiz7P9f1x792ZfrjM1KZZN2cr90ge6Jh+J2m66G2O3ZGGfvAtK/874CHCH DyCIFiyopJOE/svXMWtbumxISQz5bVLpVHoFG/sDWv/Dw+/ulTclCcsGsyyhAxLnIUNB 6EsMROPy6K34e6/uFYU/QhrdwgGQGGTuyju/aIBFHWbpHdTnj9wVFcZ/DI9hX9oA83Km J/biazmTkv97Xs5KZ4k/AO8GzJ4f/QAAUtf5iubqqaDrMWlJm52m0iFu22QGgzEqJWfJ EafA== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXo6eesSlrEXeV5k60UiaXctkMaCCFQ5bR1vKV43q3hK6vIc2O+JefuHIpcJb5cK396MGZeJvxeY69thywssrrhlbeb0qNMDniyZPB/AA== X-Gm-Message-State: AOJu0Yx4+HoG6AHe5jf3cJawhrZ0loBzVcO5titW4qVjOIRe8B7YUJYj 7DtLpkrwCdlXufP2er0+zkmuRTPPd3F5g+GDTW5iaAyOghX12VMo X-Google-Smtp-Source: AGHT+IF+ETJ4Zn4+hni8fJlaoBxagL+nYQED1B2ZWYei8fF2DvjmD3ZhLOM88b+4lvpeTWCcyGfnMA== X-Received: by 2002:a05:6870:8189:b0:24f:c5a6:2987 with SMTP id 586e51a60fabf-25060b01f7bmr1714711fac.3.1717057222603; Thu, 30 May 2024 01:20:22 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6871:3a24:b0:250:682b:b979 with SMTP id 586e51a60fabf-250682c8395ls344499fac.2.-pod-prod-06-us; Thu, 30 May 2024 01:20:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1G6bx+p1em/w3IXez06OpGBBWFNligOj/xc1JFA1EMzjVM7dNYfbX9x7Wtcn98PLgzvaThSjiNrsXjprO3VIfObWbfAf6FfCT X-Received: by 2002:a05:6871:3a13:b0:24c:5737:6cf6 with SMTP id 586e51a60fabf-25060bf9fe5mr1822049fac.26.1717057221086; Thu, 30 May 2024 01:20:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717057221; cv=none; d=google.com; s=arc-20160816; b=XvU9MIMBrtrPrT35tOdevbpK8+D3F14YbSa6DrGItBKO6TcIrh/1QXymTjlZjRv/2C xfzEf/zu/Q36XatQGhXuWidqV2fvprSOHjVDLwb9yCquFQgz8EId1ppfPVtk6tf4pczS atxqXkJj0dyNWzus+49RrqM3vBdahOLmrI1mdYO895glRWjIXWjDbvKfX5gsX3oMtVZX UAABddVFYygp54wF8rUASXAUtdj8S+oHk3RByCd3+5R8xe9iNwdBr5kPG395Y3bT+f7V MRjF9vVH/ffV8s2s1Xx+4H19vyVdvHEUhhQ6zfQ++PwYRmNyaXC9zF9Qg2f1w7oSJS92 ZCzQ== 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:dkim-signature:dkim-signature; bh=MQqHlPTjv7QHl2GO9PchAeEXrudI/nxnJ3nQiyqgs/Q=; fh=OAUsBzhOXlmuOcTmL+gZ3KZQxaT/Bf7J5yF2iSRlPgc=; b=GnltfM4URoVTriCaj931tvOCAZ23zp/o/6lfGbjY/vlO6Figf1NG6qVtxQFLNY3+rI iLMebB97olnNxvIWP8QBo9uiFdeOd5LtAeTPyzkWlZYF1MRUCjif01EqL+UdKzLm2//d BFzaG+OY95RsSX+eHPX8c24wkXkm7nyzx7BA++6AOjhhX9C70iqMWZ66+GjUOiRArjGN k6Trma7Tb0cMwuwkMKktayj37ogaUmnPs2lzAGX2DmgUD2pl/HuUG4z9A5PRpIYeZ2l8 pIyAXpHmMi9DpzL5hxXU0WUzKUFqLgfMuBP+3+7EdffW90LGKuHxIRZ57gyVhVOL3IYo 9ztA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@atmark-techno.com header.s=gw2_bookworm header.b=JeWMbuRr; dkim=pass header.i=@atmark-techno.com header.s=google header.b=Ra2zbWhD; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTPS id 46e09a7af769-6f9093f4398si81129a34.0.2024.05.30.01.20.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:20:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id BC61F3F2 for ; Thu, 30 May 2024 17:20:18 +0900 (JST) Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 61B897C9 for ; Thu, 30 May 2024 17:20:17 +0900 (JST) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-70239c35ee4so70301b3a.2 for ; Thu, 30 May 2024 01:20:17 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVHmluzrr9cyoOJPCm1Yk1/K+SzkXfGDRkCxB/pZajq+sKAO3mruKEzxbiXLMOfQ3KF+1xPbQ9jakTymA3cwR1MKPx+Gj4ilnId X-Received: by 2002:a05:6a20:158c:b0:1af:d057:be95 with SMTP id adf61e73a8af0-1b26452d8afmr1603750637.11.1717057216358; Thu, 30 May 2024 01:20:16 -0700 (PDT) X-Received: by 2002:a05:6a20:158c:b0:1af:d057:be95 with SMTP id adf61e73a8af0-1b26452d8afmr1603732637.11.1717057215922; Thu, 30 May 2024 01:20:15 -0700 (PDT) Received: from pc-0182.atmarktech (103.131.189.35.bc.googleusercontent.com. [35.189.131.103]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fcbe9f6csm9158266b3a.127.2024.05.30.01.20.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2024 01:20:15 -0700 (PDT) Received: from [::1] (helo=pc-0182.atmark.tech) by pc-0182.atmarktech with esmtp (Exim 4.96) (envelope-from ) id 1sCb1B-005zOd-1h; Thu, 30 May 2024 17:20:13 +0900 From: Dominique Martinet To: stefano.babic@swupdate.org, swupdate@googlegroups.com Cc: shinya.koga@atmark-techno.com, Dominique Martinet Subject: [swupdate] [PATCH v3 0/4] downloader curl options: add max-download-speed Date: Thu, 30 May 2024 17:20:03 +0900 Message-Id: <20240530082007.1427631-1-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@atmark-techno.com header.s=gw2_bookworm header.b=JeWMbuRr; dkim=pass header.i=@atmark-techno.com header.s=google header.b=Ra2zbWhD; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=atmark-techno.com 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: , suricatta had a bunch of options not handled for downloader, so these few patches level the field a bit: - for command line option, just add --max-download-speed - for config parsing, use common channel_settings() - while here ustrtoull bit me during testing so make it a bit more strict; I wasn't sure if we wanted a hard error but keeping the same value is probably better for compatiblity... Thinking again most callers don't check for errors so it'd probably be better to keep the original value for compatibility instead? I don't have strong feelings either way link to v1/v2: https://groups.google.com/g/swupdate/c/wQFyW58kTnI/m/5VQEUdDQCAAJ v1->v2: - keep 'retries' that wasn't 'retry' for downloader settings v2->v3: - remove error message in ustrtoull - add many warnings/errors to various callers Dominique Martinet (3): util: ustrtoull: error on bad suffixes downloader: allow common channel settings ustrtoull callers cleanup: add warnings/errors when ustrotull fails Shin-ya Koga (1): downloader: add -n/--max-download-speed option core/util.c | 8 ++++++++ corelib/downloader.c | 19 +++++++++++++++---- corelib/server_utils.c | 6 +++++- doc/source/swupdate.rst | 8 ++++++++ examples/configuration/swupdate.cfg | 4 ++++ handlers/copy_handler.c | 10 ++++++++-- handlers/delta_handler.c | 7 +++++-- handlers/diskpart_handler.c | 4 ++++ suricatta/server_general.c | 5 +++++ suricatta/server_hawkbit.c | 8 ++++++++ suricatta/server_lua.c | 3 +++ 11 files changed, 73 insertions(+), 9 deletions(-)