mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 00:33:30 +00:00
release: Support GNU stat in mkisoimages.sh
BSD stat and GNU stat differ significantly when it comes to using a custom format string, both in the option name and in the format string itself. Handle both here (assuming Linux means GNU stat rather than BSD stat). Reviewed by: brooks, gjb Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D35814
This commit is contained in:
parent
fcf1208158
commit
cefe58791b
@ -112,7 +112,11 @@ if [ "$bootable" != "" ]; then
|
||||
|
||||
# Create a GPT image containing the partitions we need for hybrid boot.
|
||||
hybridfilename=$(mktemp /tmp/hybrid.img.XXXXXX)
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
imgsize=`stat -c %s "$NAME"`
|
||||
else
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
fi
|
||||
$MKIMG -s gpt \
|
||||
--capacity $imgsize \
|
||||
-b "$BASEBITSDIR/boot/pmbr" \
|
||||
|
@ -107,7 +107,11 @@ if [ "$bootable" != "" ]; then
|
||||
|
||||
# Create a GPT image containing the EFI partition.
|
||||
efifilename=$(mktemp /tmp/efi.img.XXXXXX)
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
imgsize=`stat -c %s "$NAME"`
|
||||
else
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
fi
|
||||
$MKIMG -s gpt \
|
||||
--capacity $imgsize \
|
||||
$espparam \
|
||||
|
@ -107,7 +107,11 @@ if [ "$bootable" != "" ]; then
|
||||
|
||||
# Create a GPT image containing the EFI partition.
|
||||
efifilename=$(mktemp /tmp/efi.img.XXXXXX)
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
imgsize=`stat -c %s "$NAME"`
|
||||
else
|
||||
imgsize=`stat -f %z "$NAME"`
|
||||
fi
|
||||
$MKIMG -s gpt \
|
||||
--capacity $imgsize \
|
||||
$espparam \
|
||||
|
Loading…
Reference in New Issue
Block a user