* [PATCH] Remove GRUBFS
@ 2013-12-06 13:38 Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; only message in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-12-06 13:38 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
It seems that in our codebase we have both GRUBFS and GRUB_FS both referring to the same thing: FS of /. Merge them
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 016ee82..7b85c88 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -139,6 +139,10 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_u
# choosing Hurd filesystem module.
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
+if [ x"$GRUB_FS" = xunknown ]; then
+ GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
+fi
+
if test -f ${sysconfdir}/default/grub ; then
. ${sysconfdir}/default/grub
fi
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index e27d6f7..00d1931 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -51,13 +51,7 @@ else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
-GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
-
-if [ x"$GRUBFS" = x ]; then
- GRUBFS="$(stat -f --printf=%T / || true)"
-fi
-
-case x"$GRUBFS" in
+case x"$GRUB_FS" in
xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index f12f059..a608435 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -59,13 +59,7 @@ if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
fi
-GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
-
-if [ x"$GRUBFS" = x ]; then
- GRUBFS="$(stat -f --printf=%T /)"
-fi
-
-case x"$GRUBFS" in
+case x"$GRUB_FS" in
xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-06 13:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 13:38 [PATCH] Remove GRUBFS Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).