[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] grub-mkconfig: Use -c instead of --printf for stat

From: Ovidiu Panait
Subject: [PATCH] grub-mkconfig: Use -c instead of --printf for stat
Date: Tue, 14 May 2019 11:40:55 +0300

"--printf" only works with the stat variant provided by coreutils.

With busybox, stat will fail with the following error:
stat: unrecognized option '--printf=%T'

Usage: stat [OPTIONS] FILE...

Signed-off-by: Ovidiu Panait <address@hidden>
 util/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/ b/util/
index 33332360e..9f477ff05 100644
--- a/util/
+++ b/util/
@@ -145,7 +145,7 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device 
${GRUB_DEVICE_BOOT} --target=fs_u
 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)"
+    GRUB_FS="$(stat -f -c %T / || echo unknown)"
 # Provide a default set of stock linux early initrd images.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]