From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6836626675367673856 X-Received: by 2002:a2e:8002:: with SMTP id j2mr1753717ljg.158.1591794234223; Wed, 10 Jun 2020 06:03:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:3a02:: with SMTP id h2ls3086374lja.6.gmail; Wed, 10 Jun 2020 06:03:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLklzxZCJnyHeh/YUFg67DodcwkqpAKg/AnNHZ6J4irziXKq5rdL/CH30tfwoYTtajWgSd X-Received: by 2002:a2e:b889:: with SMTP id r9mr1801331ljp.92.1591794233351; Wed, 10 Jun 2020 06:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591794233; cv=none; d=google.com; s=arc-20160816; b=JHxN3jlf37yIzbFRj37VVJuJQuRbd6RyTX084c+GfCJVP5gWuIE8mnUXkcfZLfqW1Y HsnOY8I9NdZ33343rE6Wm2Wqe2qsfR4dIaPQhgHIjGpFLVTL+Iqwmo1VQTB5JXtdtciu aGiHkhkp3vMPe1QQ9DZcb53VqRepMkvQLLMsyZmN7YqhBuUwWJ79SSkZ7eYVmrNc4sTc 9+Wul0W0Bnj3oTyv8j1/RziGgU51xVcJTnWQLALCAbmkAoWnoe+qxBcEe5wqU7muOzM0 rmNCa/dWPLBmvcGP/7cMByI7ovTgiTO6QTbCkdL6skQsdmYWC/LPt21e2gs/rBL9c1ep F6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date; bh=e29mMdE1Nqd3a0se+rdSBOUeylMhrpqq0tbj2Tvcrro=; b=ac8fCGmq04OzdMlqjN6OnQNqdcaP5Xk1rcCXMnYXzaXIyZtvvvBqtDeb6HaG6ctU/A SLjNBYaSIYsBusaxvON4cD/tDzx1XelnFEvrzYbtsSy0px5RMbW/1UITsea1ZH3LMQrw W2k7JI7yHMoqa3MjYaenUe+bD8gdZ2UJxLo6wGldTMbW2XwkmYBbcFf+8Hmq3i0WORx6 p8RtmRZwn1WlcS9A7J9XW9dkfTNRwsst1zu8xbj6e9WzQyin7+eJrOsaNMq3FJcSxZCx uOGkoo+04j/Zg6D2YjYQK+uKrGR6c4fEXcEAHm2/GVhuVexndcXfH8ana/SsBMcZyJOp aDcw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id u23si833102ljg.7.2020.06.10.06.03.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jun 2020 06:03:53 -0700 (PDT) Received-SPF: neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id 05AD3nP3020059 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Jun 2020 15:03:52 +0200 Date: Wed, 10 Jun 2020 15:03:49 +0200 From: Baurzhan Ismagulov To: isar-users Subject: Re: [PATCH] expand-on-first-boot: Allow expanding extended MBR partitions Message-ID: <20200610130349.GO5077@yssyq.m.ilbers.de> Mail-Followup-To: isar-users References: <20200610080247.385697-1-hws@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: AwGojKRAlZmu On Wed, Jun 10, 2020 at 02:50:40PM +0200, Jan Kiszka wrote: > > While probably a very uncommon layout, I am not sure how this > > would behave when the EBR is not the last partition, but > > somewhere in between. I am a bit worried it would silently wreak > > havoc ... > > We should probably throw some test patterns at that. Could be done > against a disk image file as well, I suppose. That would be great. > > sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -v last-lba | \ > > - sed 's|\('"${LAST_PART}"' .*, \)size=[^,]*, |\1|' | \ > > + sed 's|^\(.*, \)size=[^,]*, type=[f5]$|\1type=5|' | \ > > + sed 's|^\('"${LAST_PART}"' .*, \)size=[^,]*, |\1|' | \ > > Would it make things worse or better to combine both sed expressions > into the same sed call? >>From the performance PoV, yes. However, they tend to become less readable. Perhaps we could assign them to three vars and use those... or anything else without sacrificing any of both. With kind regards, Baurzhan.