Message ID | B46E6E2A-AC75-4F50-927B-EFDA85FD30E9@siemens.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBDD6BWV65QPBBIXQUOVQMGQEPOWR6BA@googlegroups.com> 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=FNWr9zMP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2001:4860:4864:20::39; helo=mail-oa1-x39.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbixquovqmgqepowr6ba@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-oa1-x39.google.com (mail-oa1-x39.google.com [IPv6:2001:4860:4864:20::39]) (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 4Sh7sN0crlz23mq for <incoming@patchwork.ozlabs.org>; Fri, 1 Dec 2023 08:01:26 +1100 (AEDT) Received: by mail-oa1-x39.google.com with SMTP id 586e51a60fabf-1fa182dc04asf1969969fac.1 for <incoming@patchwork.ozlabs.org>; Thu, 30 Nov 2023 13:01:26 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1701378083; cv=pass; d=google.com; s=arc-20160816; b=NtKPWrHNKF0VBcTjyKn8MHWVqbqugY5oU6ktxRxhFXe5BpGBkkoIPdEKqhbV8lUY13 jTw+p8bLzp2AHkE7PB9sBSmmOkcofGFMe8k7EfJZzuOablfyK2sIch7vjCjHgw7qhmtq /L91eIRpeZ3fgUakiAxF4exqTVHHVbsMqvR/PFy36XdX7su2E5/jKpkSe3quVe9AJeXA uv5/bZ9mmNRlnTn5x48z8H0dbwquLm1Fr6wY1sfKFGxZjtZ0clXWmwjwDTy+F9Mj3R/7 EUKeMRP0qem4FD7RPBJES2O/mxx362s6PPwGbjHRzgWtgx2KRq+3gVPmjghjLoRgKGl6 D4eQ== ARC-Message-Signature: i=3; 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:reply-to:mime-version:content-id :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Wo81ie8Pkf/roY9HtwDO4ZvfHAmWmW+ppkR0xNoIUq0=; fh=MhnrEIkS/Rx6wGNeK5FM1m9ndN+O9ELfurwDkGRmM6I=; b=PSjLrKmw+JqkKTCCTtdnbJL4IRhwh6EYe/zV2JzaR34MGs16jiMeseXRZgqnY++f23 +xk4hMMN14jSfk86yuF4A3nO1lsaYWKd8c3BLy5F2qhNq75KBtdSRAx46YRLruBkEyzp YwedAGzIwW4qi2A2a44NWyniXhCB0m5xl8YmwDoIkshdOyk2mj883IWoChBuPg3ITKxW 8lJVTz8tdxG+y82iseXp6Cr4uVQRbdjs43ZrDfrGoViUjOHvndphDhket71USYOn77x6 +nd24lPLOlX3PX5ysAl1KivlQLEDX1io7949PFwFXcy1AIMSZvRarNKlZS6h18O63Crw 1n6Q== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=mfhHZ+Pr; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe0c::62b as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1701378083; x=1701982883; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=Wo81ie8Pkf/roY9HtwDO4ZvfHAmWmW+ppkR0xNoIUq0=; b=FNWr9zMPywZMwTzhxEfa4Sm+oCWysQub3e6wppeZG4irhGstvAPZ2pduZybF0wk8md UOxMAGNC9dX2yKFGlzRDVtQ35Om+BGo+1QGNp5gvqICudcvW0Cl2N8GohMKOWF0E5q9L OJQEy5MYCGw+7+ogF/zmvpta68iperN9ev45TWVH28In92kks4MazLsxNj7bCAj27mO/ GIlnFImIBxX7C7k8EcewmFKFUEIkTtpQfrCgS9vsuLlsW90wejeYqtm5k6EcPoh4avQy ApHnOGGMosOFsrJTkAKLuN6rRrFbBYZtvmaIXYJ62WlpzSGOqlLwavoo2QIP1FAYGB+n +BIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701378083; x=1701982883; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Wo81ie8Pkf/roY9HtwDO4ZvfHAmWmW+ppkR0xNoIUq0=; b=vWHHGl56wnlCarGP1SFvbwvqnejyNEyHaD6OU1B60sRLoXwMu09wgAWQBpo+dr/ezM 158q8A7mvm+0XCn6BmuX3jLRFIqKvF6u6sThbC5XmqgpfWqeZtVGVxMUfXAwprV/Kw76 JTLR/UX0AP1/VoW3YgH2a+WjDixT7frKPNpqEmJkC3sGZD1NYInvQsPZHLvkuDNmfKeg AmHN7MWCSf12x78NtdKqOD7f38Mz/M93JshdJGiKKiTaP5iLHTwwgpEPwHbvj/FvBtmh GBlZisE/H8cshJJtFe7oe/U7+3rQwqNZ5xZsFbYmFk+i4Ov2OQ1ypNYGgHXg/HXR2ecI L11Q== X-Gm-Message-State: AOJu0Yzdbi9W2zsldp+hO6HmqKUq6YydS6JPBnnv2ouNDSHXDO2KVEsT 5+iTzaxmorKAFPXxPGJ+n7A= X-Google-Smtp-Source: AGHT+IFD7jfV9QRuR0r3omx4/FKHvOxPYAfRmFo+ZKqKCg3WWuoCwFfMg71T30rejK/3ATlI1ctQoQ== X-Received: by 2002:a05:6871:5305:b0:1e9:b496:ce2d with SMTP id hx5-20020a056871530500b001e9b496ce2dmr30479827oac.12.1701378083117; Thu, 30 Nov 2023 13:01:23 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6871:728f:b0:1fa:2fe5:f77 with SMTP id mm15-20020a056871728f00b001fa2fe50f77ls674003oac.0.-pod-prod-05-us; Thu, 30 Nov 2023 13:01:22 -0800 (PST) X-Received: by 2002:a05:6808:20a4:b0:3b8:60c2:8032 with SMTP id s36-20020a05680820a400b003b860c28032mr928116oiw.20.1701378081952; Thu, 30 Nov 2023 13:01:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701378081; cv=pass; d=google.com; s=arc-20160816; b=kc2Zg0dJtP4uLQ4vKXowgsw9ryxsQFByEPOHkTJEVdfhNgT22c+OeKS/vB6ZepuryQ 2lsSefhV9+XukuheqqIm5gjp2utOWmVSBUUHorN9lvSibxzyGoJB1EpHMjJ7htNXGaaT lf12PDZt1hvDG8eDy37WkSWpKPpKzVYpCE1IwWl4muPgLRtrz11Do+wDqFm2kaulHPrq j1MmwbTZVbsJO3TVh3vr6BVLoJlvzmpidg/nSRack3ZDZSrd/MyyKxmZdkCqId+/YfSk J7Pm7OD1IXBLTtOIX+0x2j6fDwrjrIlizIsBcsViBsStkWo8MkzMdX+K11PudzV7weg+ Fzxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-id:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=JQ8MfjAaaF4lMQqjgIgThBFcDOUSm8ynJSYzzwXloHs=; fh=MhnrEIkS/Rx6wGNeK5FM1m9ndN+O9ELfurwDkGRmM6I=; b=QkR2nq5jAnkgRvHUD/qX4HRomKnQqXx1VBZgQSzLwH5UTi7enzsEghwCBwa1VBgucQ kpsHGNNIFvbnhv5xdZqG6U6qFcaPrnp5bwIfF+A8x7FVJR4wci66AXBXwa4K2XOb9wJZ X9OSAJtIKUchSe/23vAO0GsEoGGBa1iI5EzYHW/rbVefbRSicRiyQjc40S85bjUhDcj/ nRJ+eIn2vJMDxia0ixsLuyG5SjcTOszr70UWPdc9xoF5Jl0YnXihsqFilPPmhwex6y0c cejNyfCbTZ9FvjJNIk/vMnMU8DGyt2kMsYSXHXYnduRuBO18DxaIQe9U9geCMpeIy9C0 by2A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=mfhHZ+Pr; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe0c::62b as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on062b.outbound.protection.outlook.com. [2a01:111:f400:fe0c::62b]) by gmr-mx.google.com with ESMTPS id eu10-20020a056808288a00b003b8979bb6c1si229267oib.4.2023.11.30.13.01.21 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2023 13:01:21 -0800 (PST) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe0c::62b as permitted sender) client-ip=2a01:111:f400:fe0c::62b; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hk/nNSpezWPTZafLlvgaV4nkQV4lxfXwDYaA8+zXoTJQgpNab4FdrPtc1c7xzAUJN0fs0EXRYNXbvZJB/hTmZwScl4Kyb2yVzhiqyDXUA4llJHUhg9ErGrzyqbPc9PxDuSgKkEoUX31iF9LaV37rb47YwDL5aeukhYc0k8md3eSeR9h0VttwH6RqIN2WpnuGQLkRMvHBf0WSZlWpRB8oYibVv8oGcNosLjolGEbXWjA+rBGfzYcDob8SBpBiQvQMScdBgqjXJ078M3X8zFVUkimuiIy/cI7xi3CjsVHetFuayMgMnBWrLqXDlFkddMgDYW51uc0IiH9NnyFsFwU4Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JQ8MfjAaaF4lMQqjgIgThBFcDOUSm8ynJSYzzwXloHs=; b=ocZnft6SUCDFEn9ULqPfr0PjygyJGhEb7DU6NSRi1PwF3Qpgkjiu2fMx8/KeKgUSPjvJno8QXgI0Vm+guqBZCU7XyF6wq4APyi+Bl3x8PEzUVZlpJ1UdJlmewsiJ2CU7e9l8RBY6uwR5DelKzhkK4mQMO+M3xtp08+q80CL4z+aB1p0txyPckiW5O5chs+at/CbPx3yz4JCwiPYbM85OugIC47+Ej/+O1l4dlIK1aubM+fYG2ooAicxYnIaGYImIqO2rPvKPQmQVZFGmN3yh0ETGrchuU0ZKWGcRdTku7av+h16r1MrbFPJod48dYrxjfju29zI4nBi6ctKaWknmhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) by AS8PR10MB6149.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:573::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.24; Thu, 30 Nov 2023 21:01:19 +0000 Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::4883:a6f3:3843:93af]) by DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::4883:a6f3:3843:93af%7]) with mapi id 15.20.7046.024; Thu, 30 Nov 2023 21:01:19 +0000 From: "'Storm, Christian' via swupdate" <swupdate@googlegroups.com> To: Michael Heimpold <mhei@heimpold.de> CC: Stefano Babic <stefano.babic@swupdate.org>, "swupdate@googlegroups.com" <swupdate@googlegroups.com> Subject: [swupdate] [libubootenv][RFC PATCH v2] uboot_env: Emulate %ms in sscanf() Thread-Topic: [libubootenv][RFC PATCH v2] uboot_env: Emulate %ms in sscanf() Thread-Index: AQHaI9Bd7W9GefKheEukhtJbjOMtmA== Date: Thu, 30 Nov 2023 21:01:19 +0000 Message-ID: <B46E6E2A-AC75-4F50-927B-EFDA85FD30E9@siemens.com> References: <20231128180938.532132-1-stefano.babic@swupdate.org> <E32EC0F1-3CEB-45E7-9CB5-92DB031D4B92@siemens.com> <4550296.LvFx2qVVIh@kerker> In-Reply-To: <4550296.LvFx2qVVIh@kerker> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9PR10MB5404:EE_|AS8PR10MB6149:EE_ x-ms-office365-filtering-correlation-id: bcea630a-dc8a-49c2-1462-08dbf1e78015 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zSaqaCGk44uddVRNFuaNFOphDPCOZqCumRWAMGwZcTvLlSpOTMsU+3KkzUhkTTLdOJSWlmueq03+25Y8Pll5TfiKWyC/tgettCL2S+IEjelctTpnYsfWsPWnna07ANFwdt54PbU/PlsZ9FQF69Xz4IkhhuEWgkFnBVwuJwzpc0YFLb/y+yq2dSEWOWGUWGPngVjunOADfH7itbKGvXFi4ukYN0/1jccZEClQnzXXGl3LRwU619RgFFJx8l5IfiJ3RYPw1xovj9/ym9MbUw/z7WQT8HlGM6IVk/GAK4FdHiKlcqPWQGeA5XJO5qZnQCjVy80bp5epjdTIwcSpTBqImtXs4oZaqd25rWg1/YIDDX+D1wankRtIXGR6gnpc2jomd2UTbohRuEpPE/erJGsmMtnyXHF3LHaYGX8z7tRAaRmVGvhQZvm17xs0KjgYFfXFI78S1hOjAMIXkRkkfvN2nqBNWMAY53IttMBZ3+Sca9QvW95fOwpAs3M+i9R8B8l7YCcjXs52/pXcQi6hLbgyEZjTDWBp8R5+PYAuLwAbiQUmlcxm8Dx3IFPv4yla9oVhyp8AMPX14o9mXhHEqyP1SAPJ+5Ele8IyR7KEZcq587Ytsf3Eg44Bm60uIpa/rW9b11xOnieLJlbkyF4FF4bu3w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(39860400002)(366004)(136003)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(38070700009)(86362001)(76116006)(91956017)(66476007)(54906003)(66446008)(6916009)(71200400001)(64756008)(66946007)(82960400001)(33656002)(38100700002)(36756003)(122000001)(26005)(6506007)(83380400001)(2616005)(6512007)(2906002)(316002)(66556008)(4326008)(6486002)(8676002)(5660300002)(478600001)(8936002)(41300700001)(45980500001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: Z5/Orn8nu2fcTSQqYjZhjkDfyQQzgjNjC22EjTm3Hqu3/A7eUWjVYALdPmw3HePlT5GqIwcOeL8FONI5nrsteTBWche6ileFtshqj4rQOgA+qhEosShm0w9mLqVKF7gk3Q8psNKczQLch3nl98VQXoMmcziIAnLIMI1AwBIIE5usTd0czz1yIgbUmSBrbzaeBBxeJd1EPiC6k9qbbF50U4D2L6v97rEZ170D6MpSzrHtC+PPwvTivkymDdPfldZyFLc0tGRyl+Xaly0CvO4FB63qRKTm2Vi5AbN7atM9aeAFX6rS6xEvg8SEnDgy6eEVHFdFZwFRfjkDiNHE8vUJ2OzYLcpJVIT8cpfLvOEIErvKo9P3BddFrk607YS6A9Jne1rsi3hwLSyijDAKNOftW94EVwhDaYzo4WZ6gBhNRyT/8X+pQQ2+lGWntd0Uewbq6gh3kLis1k2fmVNYgrIj8xAIEqK4zt75uObh6W9eByUrCF5rQksWkVLtcqDJQhR6vCiE7iXchAAqpJLRvDnjSMTXv+/cZc+kBvYVCnBYP7Pf0kz6vlULeQUZTShkyrxtPVldb47TM2gDscc28E7IqtUlbZWdoGh/2xsCY7Xe9aWED4o/cz32MPYOIIxf5d9p/ewXLaRN/Mthr6tW5RGiK9w/bT+dnX2/KKByu1e4QC1vVesxPivwIIQ/oc5Ix9fgsciPSHru0R6A2ajdk6q8A5uNTexa3oTT4VeEUVSlwupX+OgUEQfGYcdelr/80z9b3UvMvw+Fo2Gaae9pDzvmmhrNW7J7wo5fLGAqKlONCoQgtgCIkgz+uZVXDXpf073VFHnSbWxZilrS5CX4M4VcvyyKNlWLLE/UwEBSD4UDGccwru1Is2K7IZ2gadJIkwuiKM0jSXstIkXdQhHGRyDHuT00upi1eEK0jzZo50t/oLGdjFtkAw6fNfPBC84ZWDBmbCym0OOmM8rlX/ot6jd1TTesjDAyJYymluGuZCd1Ss82wuhHFEBxwJhSUuqg3gELVjeILu+Hp91ewqBVz4aKxvpm5pNkRWwT+iQjTFR0WW/oumfNBKgaKfbxWNLVy4haUISMdLvFa8AQVOwmr7uWKCf5uFkKnlwV7h78YI2PyiX3R3FHrRLSQUuwAaPoP7ADrbu5lrg6DYbuY3ED/sktiTfyQpP5dS3sE3fG8HJog2nNU4DdMQ+H9yth8cLZIRA+EFSLsT3fM92KP8IK2uZxp56On02uA0Le4vy9COFGqVjaf2SnF3E3k8wls1fdLLo7CcggEEw/ErIKMeRZ7LdDG2rVn3cOWBaCpejPpRpKJm1uNVLNc/x21Z6QXjXtJU4SkPCzLh16hQ6c0mKPP7yny9YtTefz5NxHAMaKaFpjTv2/FuKNDz8VK6OmBo1IkHSOBegt5vBKMDak6MrgfYHrE9qASO8jwG30X2b33VPrKqxdXd5PYqWJZMCcNM9ZNFKAU/m+O8qIqKzjYaBut03urNeFMvRonSCL2PE4F4bM3APEn0fTDf7n1A+MMNvNKF1uMKAHJa+qsw9UZk64UA2JwEWP0vIpC7jvtZX2Pc51i9N/DUvd0s9ovkVGWCAt7Yh1+1/5xG89wlRu40lAP9H1/w== Content-Type: text/plain; charset="UTF-8" Content-ID: <C345DB82BA5A8E4EA195FFF80F07C088@EURPRD10.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: bcea630a-dc8a-49c2-1462-08dbf1e78015 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2023 21:01:19.1453 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cuHBcb6IYD2H647yhWkM8KC6YII+5ghH4DP9xyCWWEVfNCLsbI1gsd2b04sTMRZKl03DCX5pklBYod6X0sDC8e7KF/UFLKTux6HwC25qIcw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB6149 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=mfhHZ+Pr; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:fe0c::62b as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: "Storm, Christian" <christian.storm@siemens.com> Reply-To: "Storm, Christian" <christian.storm@siemens.com> Precedence: list Mailing-list: list swupdate@googlegroups.com; contact 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>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[libubootenv,RFC,v2] uboot_env: Emulate %ms in sscanf()
|
expand
|
diff --git a/src/uboot_env.c b/src/uboot_env.c index bb14cab..16480b4 100644 --- a/src/uboot_env.c +++ b/src/uboot_env.c @@ -1258,13 +1258,25 @@ int libuboot_read_config_ext(struct uboot_ctx **ctxlist, const char *config) ctx->size = 0; rewind(fp); - while (getline(&line, &bufsize, fp) != -1) { + int len; + while ((len = getline(&line, &bufsize, fp)) != -1) { /* skip comments */ if (line[0] == '#') continue; +#if defined(__FreeBSD__) + /* + * POSIX.1-2008 introduced the dynamic allocation conversion + * specifier %m which is not implemented on FreeBSD. + */ + tmp = calloc(1, len + 1); + ret = sscanf(line, "%s %lli %zx %zx %lx %d", + tmp, +#else + (void)len; ret = sscanf(line, "%ms %lli %zx %zx %lx %d", &tmp, +#endif &dev->offset, &dev->envsize, &dev->sectorsize, @@ -1274,13 +1286,16 @@ int libuboot_read_config_ext(struct uboot_ctx **ctxlist, const char *config) /* * At least name offset and size should be set */ - if (ret < 3 || !tmp) + if (ret < 3) { + free(tmp); continue; + } /* * If size is set but zero, entry is wrong */ if (!dev->envsize) { + free(tmp); retval = -EINVAL; break; }
Signed-off-by: Christian Storm <christian.storm@siemens.com> --- src/uboot_env.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)