[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH 1 of 2 v3] build: dd if='/dev/zero' ... ist zu langsam
- Date: Sun, 15 Aug 2010 21:13:33 +0200
- From: Andreas Freimuth <m.nemo@xxxxxxx>
- To: tyndur-devel@xxxxxxxxxx
- Subject: [tyndur-devel] [PATCH 1 of 2 v3] build: dd if='/dev/zero' ... ist zu langsam
- Message-id: <5d16af296e6eb57fc4e9.1281899613@laptop>
- In-reply-to: <patchbomb.1281899612@laptop>
* Beim Erstellen von leeren Images nicht Tausende Null-Bytes kopieren
Signed-off-by: Andreas Freimuth <m.nemo@xxxxxxx>
---
build/scripts/image_cdrom | 2 +-
build/scripts/image_floppy | 2 +-
build/scripts/image_hd | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/build/scripts/image_cdrom b/build/scripts/image_cdrom
--- a/build/scripts/image_cdrom
+++ b/build/scripts/image_cdrom
@@ -96,7 +96,7 @@ EOF
NEW=0
if ! [ -f $FLOPPY_IMAGE_PATH ]; then
# Leeres Image erstellen und formatieren
- dd if=/dev/zero of=$FLOPPY_IMAGE_PATH bs=1024 count=1440
+ dd of=$FLOPPY_IMAGE_PATH bs=1024 seek=1440 count=0
mformat l:
NEW=1
fi
diff --git a/build/scripts/image_floppy b/build/scripts/image_floppy
--- a/build/scripts/image_floppy
+++ b/build/scripts/image_floppy
@@ -58,7 +58,7 @@ EOF
NEW=0
if ! [ -f $IMAGE_PATH ]; then
# Leeres Image erstellen und formatieren
- dd if=/dev/zero of=$IMAGE_PATH bs=1024 count=1440
+ dd of=$IMAGE_PATH bs=1024 seek=1440 count=0
mformat l:
NEW=1
fi
diff --git a/build/scripts/image_hd b/build/scripts/image_hd
--- a/build/scripts/image_hd
+++ b/build/scripts/image_hd
@@ -57,7 +57,7 @@ die()
NEW=0
if ! [ -f $IMAGE_PATH ]; then
# Leeres Image erstellen und formatieren
- dd if=/dev/zero of=$IMAGE_PATH bs=$((1024*1024)) count=$IMAGE_SIZE 2> /dev/null
+ dd of=$IMAGE_PATH bs=$((1024 * 1024)) seek=$IMAGE_SIZE count=0
build/scripts/create_partition $IMAGE_PATH
NEW=1
fi
@@ -70,7 +70,7 @@ PART_SIZE=`echo $PARTITIONS | awk '{prin
if [ $NEW -ne 0 ]; then
PART_IMAGE=`mktemp`
- dd if=$IMAGE_PATH of=$PART_IMAGE bs=512 skip=$PART_START count=$PART_SIZE
+ dd of=$PART_IMAGE bs=512 seek=$PART_SIZE count=0
# Dateisystem erstellen
$LOST_TOOLS_MKE2FS -F -q $PART_IMAGE || die "Dateisystem konnte nicht erstellt werden"