On Sat, 2017-06-24 at 18:27 +0200, Cyril Brulebois wrote: > [ Dropping #820818, which is archived. ] > > Hi Ben, > > Ben Hutchings <b...@decadent.org.uk> (2017-02-05): > > Please don't do this. The rule for Linux partition device names is > > very simple and there is no need to match specific prefixes: > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/block/partition-generic.c?h=v4.9#n35 > > > > Please instead use the following patch: > > > > --- a/lib/resize.sh > > +++ b/lib/resize.sh > > @@ -18,15 +18,12 @@ get_real_device () { > > num=$(sed 's/^[^0-9]*\([0-9]*\)[^0-9].*/\1/' > > $backupdev/$oldid/view) > > bdev=$(cat $backupdev/device) > > case $bdev in > > - */disc) > > - bdev=${bdev%/disc}/part$num > > + /dev/*[0-9]) > > + bdev=${bdev}p$num > > ;; > > - /dev/[hsv]d[a-z]|/dev/xvd[a-z]) > > + /dev/*) > > bdev=$bdev$num > > ;; > > - > > /dev/cciss/c[0-9]d[0-9]|/dev/cciss/c[0-9]d[0-9][0-9]|/dev/ida/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9][0-9]|/dev/mmcblk[0-9]) > > - bdev=${bdev}p$num > > - ;; > > *) > > log "get_real_device: strange device name $bdev" > > return > > Should I apply this patch as-is, or should anything be updated there?
I think this is still good. Ben. -- Ben Hutchings Sturgeon's Law: Ninety percent of everything is crap.
signature.asc
Description: This is a digitally signed message part