On Fri, 2016-06-17 at 18:42 +0100, Steve McIntyre wrote:
> On Fri, Jun 17, 2016 at 11:51:09AM +0200, Michael Hartung wrote:
> > 
> > 
> > Same problem for me. 
> > The following patch helps for me: 
> > 
> > --- partman-partitioning/lib/resize.sh2016-05-19 09:51:59.000000000 +0200 
> > +++ ./resize.sh2016-06-17 11:43:11.126906220 +0200 
> > @@ -24,7 +24,7 @@ 
> >     /dev/[hsv]d[a-z]|/dev/xvd[a-z]) 
> > 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])
> >  
> > +    
> > /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]|/dev/nvme[0-9]n[0-9])
> >  
> > bdev=${bdev}p$num 
> > ;; 
> >     *) 
> 
> Thanks for checking that!
> 
> Looking in the code, there are *lots* of places where we have this
> kind of check and I think it would make sense to pull them together
> into one place so we don't miss things...

Also, all the pattern matching can be replaced by (for Linux):

/dev/*[0-9])
        bdev=${dev}p$num
        ;;
/dev/*)
        bdev=$dev$num
        ;;

The rule is really that simple.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert
Camus

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to