Control: tag -1 pending

Commenting on the patch now.

Steve Rowe <sar...@gmail.com> (2015-05-12):
> -- System Information:
> Debian Release: 8.0
>   APT prefers stable-updates
>   APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 4.0.2 (SMP w/16 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)

> --- grub-installer-1.117/grub-installer       2015-01-12 23:01:14.000000000 
> -0500
> +++ grub-installer-1.117/grub-installer.fixed 2015-05-12 15:13:49.002358498 
> -0400
> @@ -134,7 +134,7 @@
>  # This should probably be rewritten using udevadm or similar.
>  device_to_disk () {
>       echo "$1" | \
> -             sed 
> 's:\(/dev/\(cciss\|ida\|rs\)/c[0-9]d[0-9][0-9]*\|/dev/mmcblk[0-9]\|/dev/\(ad\|ada\|da\)[0-9]\+\|/dev/[hs]d[0-9]\+\|/dev/[a-z]\+\).*:\1:'
> +             sed 
> 's:\(/dev/nvme[0-9]n[0-9]\|/dev/\(cciss\|ida\|rs\)/c[0-9]d[0-9][0-9]*\|/dev/mmcblk[0-9]\|/dev/\(ad\|ada\|da\)[0-9]\+\|/dev/[hs]d[0-9]\+\|/dev/[a-z]\+\).*:\1:'

I moved the addition to the end, which makes visual inspection slightly
easier. I also made it possible to support multi-digit X and Y in
/dev/nvmeXnY (my second patch).

It seems other devices have inconsistent support for that BTW. I'm not
sure I'm going to dive into that right now though. ISTR Ben's mentioning
we might want to revisit this thing entirely at some point.

>  # Run update-grub in $ROOT
> @@ -252,7 +252,7 @@
>      /dev/mapper)
>       disc_offered_devfs="$bootfs"
>       ;;
> -    
> /dev/[hsv]d[a-z0-9]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/ad[0-9]*|/dev/da[0-9]*)
> +    
> /dev/nvme[0-9]n[0-9]|/dev/[hsv]d[a-z0-9]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/ad[0-9]*|/dev/da[0-9]*)

Same story here.

>       disc_offered_devfs="$prefix"
>       ;;
>      *)
> @@ -895,6 +895,10 @@
>       disk=
>       part=
>       case $1 in
> +                /dev/nvme*n*p*)
> +                     disk="$(echo "$1" | sed 
> 's,\(/dev/nvme[0-9]n[0-9]\).*,\1,')"
> +                     part="$(echo "$1" | sed 
> 's,/dev/nvme[0-9]n[0-9]\(.*\),\1,')"
> +                     ;;
>               /dev/[vhs]d[a-z]*)
>                       disk="$(echo "$1" | sed 's,\(/dev/[a-z]\+\).*,\1,')"
>                       part="$(echo "$1" | sed 's,/dev/[a-z]\+\(.*\),\1,')"

Moved the addition to the end of the block as well, but I mimicked the
/dev/mmcblk case a bit more closely, matching for [0-9]+ after “p”
instead of “everything”; also supporting multi-digit X and Y as above.
I also added an extra check on "$part" vs "$1" as done in the mmcblk
case.

I haven't performed any tests at all (even with a regular /dev/sda
setup) though, only pushed to master:
  https://anonscm.debian.org/cgit/d-i/grub-installer.git/commit/?id=beca4ad
  https://anonscm.debian.org/cgit/d-i/grub-installer.git/commit/?id=7046795

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature

Reply via email to