I've attached an updated patch.

I also noticed a whitespace inconsistency when looking at another case
statement. I've attached a patch.

Both patches are -p0 and have a ChangeLog entry (in a separate file,
which I think is the convention).

-- 
Richard
--- util/grub-install.in	2012-02-03 04:16:36.032265000 -0600
+++ util/grub-install.in	2012-02-03 05:35:50.362628000 -0600
@@ -469,7 +469,12 @@
 grub_device="`"$grub_probe" --device-map="${device_map}" --target=device "${grubdir}"`" || exit 1
 
 if ! test -f "${grubdir}"/grubenv; then
-    "$grub_editenv" "${grubdir}"/grubenv create
+    case "`"$grub_probe" --target=fs "${grubdir}"`" in
+        btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs)
+	    ;;
+        *)
+            "$grub_editenv" "${grubdir}"/grubenv create
+    esac
 fi
 
 # Create the core image. First, auto-detect the filesystem module.
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ChangeLog.zfs-no-grubenv	2012-02-03 05:49:27.977376000 -0600
@@ -0,0 +1,5 @@
+2012-02-03  Richard Laager <[email protected]>
+
+	* util/grub-install.in: Don't create a grubenv file on filesystems
+	to which GRUB cannot write.
+
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ChangeLog.grub-install-whitespace	2012-02-03 05:52:51.439942000 -0600
@@ -0,0 +1,4 @@
+2012-02-03  Richard Laager <[email protected]>
+
+	* util/grub-install.in: Fix some inconsistent whitespace.
+
--- util/grub-install.in	2012-02-03 05:53:36.039465769 -0600
+++ util/grub-install.in	2012-02-03 05:54:04.771697000 -0600
@@ -486,13 +486,13 @@
 # filesystem will be accessible).
 partmap_module=
 for x in `echo "${grub_device}" | xargs "$grub_probe" --device-map="${device_map}" --target=partmap --device 2> /dev/null`; do
-   case "$x" in
-       netbsd | openbsd) 
-	   partmap_module="$partmap_module part_bsd";;
-       "") ;;
-       *)
-	   partmap_module="$partmap_module part_$x";;
-   esac
+    case "$x" in
+        netbsd | openbsd)
+            partmap_module="$partmap_module part_bsd";;
+        "") ;;
+        *)
+            partmap_module="$partmap_module part_$x";;
+    esac
 done
 
 # Device abstraction module, if any (lvm, raid).

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

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to