changeset 1630:dd94f87b89ae

It's been long enough since "truncate" was introduced we can use that instead of "dd" to make sparse files.
author Rob Landley <rob@landley.net>
date Sat, 28 Sep 2013 13:24:34 -0500
parents 6ffd2181ac58
children 18cafed76d65
files sources/toys/make-hdb.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/toys/make-hdb.sh	Fri Sep 27 12:08:23 2013 -0500
+++ b/sources/toys/make-hdb.sh	Sat Sep 28 13:24:34 2013 -0500
@@ -6,7 +6,7 @@
     export PATH=/sbin:/usr/sbin:$PATH
   fi
 
-  dd if=/dev/zero of="$HDB" bs=1024 seek=$[$HDBMEGS*1024-1] count=1 &&
+  truncate -s ${HDBMEGS}m "$HDB" &&
   mke2fs -q -b 1024 -F "$HDB" -i 4096 &&
   tune2fs -j -c 0 -i 0 "$HDB"