Added new build tool create_image which is now used to create and/or clear a
raw image. This fixes the problem that an existing image couldn't be resized. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30133 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -116,17 +116,15 @@ if [ $isImage ]; then
|
||||
if [ ! $updateOnly ]; then
|
||||
echo "Creating image ..."
|
||||
|
||||
ddFlags=
|
||||
imageFlags="-i${imageSize}M"
|
||||
if [ ! "$dontClearImage" ]; then
|
||||
imageFlags="$imageFlags -c"
|
||||
fi
|
||||
|
||||
if [ $isVMwareImage ]; then
|
||||
vmdkImageFlags=
|
||||
if [ ! "$dontClearImage" ]; then
|
||||
vmdkImageFlags="-c"
|
||||
fi
|
||||
$vmdkimage -h 64k -i${imageSize}M $vmdkImageFlags "$imagePath" \
|
||||
|| exit 1
|
||||
elif [ ! -e "$imagePath" -o ! "$dontClearImage" ]; then
|
||||
dd if=/dev/zero of="$imagePath" bs=1048576 count=$imageSize \
|
||||
|| exit 1
|
||||
$vmdkimage -h 64k $imageFlags "$imagePath" || exit 1
|
||||
else
|
||||
$createImage $imageFlags "$imagePath" || exit 1
|
||||
fi
|
||||
|
||||
$bfsShell --initialize $imageOffsetFlags "$imagePath" \
|
||||
|
||||
Reference in New Issue
Block a user