Page MenuHomeFreeBSD

D57872.1796007273.diff
No OneTemporary

Authored By
Unknown
Size
941 B
Referenced Files
None
Subscribers
None

D57872.1796007273.diff

diff --git a/sys/tools/fdt/embed_dtb.sh b/sys/tools/fdt/embed_dtb.sh
--- a/sys/tools/fdt/embed_dtb.sh
+++ b/sys/tools/fdt/embed_dtb.sh
@@ -32,13 +32,13 @@
# $1: kernel filename
# $2: device tree blob filename
-dtbsize=`ls -l $2 | awk '{print $5}'`
-obs=`strings -at d $1 | grep "Device Tree Blob STARTS here" | awk '{print $1}'`
-eol=`strings -at d $1 | grep "Device Tree Blob STOPS here" | awk '{print $1}'`
+dtbsize=$(stat -f%z "$2")
+obs=$(strings -at d "$1" | grep "Device Tree Blob STARTS here" | awk '{print $1}')
+eol=$(strings -at d "$1" | grep "Device Tree Blob STOPS here" | awk '{print $1}')
sz=$((eol - obs));
-if [ $sz -lt $dtbsize ]
+if [ $sz -lt "$dtbsize" ]
then
echo "Selected blob is too big to reembed. Please rebuild the kernel."
exit
fi
-dd if=$2 ibs=${dtbsize} of=$1 obs=${obs} oseek=1 conv=notrunc 2> /dev/null
+dd if="$2" ibs="${dtbsize}" of="$1" obs="${obs}" oseek=1 conv=notrunc 2> /dev/null

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 30, 2:54 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42099615
Default Alt Text
D57872.1796007273.diff (941 B)

Event Timeline