[PATCH 7/9] Atari Linux: Add -vfat option to atari-hd-image

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


While TOS works (better) with plain FAT, long filenames coming with
VFAT are better for Atari Linux disk images.

VFAT doesn't support symlinks or access rights though, so ext2-ext4
are still much better file system alternatives.
---
 tools/atari-hd-image.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/atari-hd-image.sh b/tools/atari-hd-image.sh
index 4b6a6d13..54009aad 100755
--- a/tools/atari-hd-image.sh
+++ b/tools/atari-hd-image.sh
@@ -10,7 +10,7 @@ partname=DOS      # partition name
 if [ $# -lt 1 ] || [ \! -z "$(echo $1|tr -d 0-9)" ]; then
 	name=${0##*/}
 	echo
-	echo "usage: $name <size> [filename] [partition name] [directory]"
+	echo "usage: $name <size> [-vfat] [filename] [partition name] [directory]"
 	echo
 	echo "Create an ACSI/IDE harddisk image for Hatari with a single Atari"
 	echo "compatible DOS partition.  Arguments are (defaults in parenthesis):"
@@ -49,6 +49,12 @@ if [ $disksize -gt 512 ]; then
 	exit 1
 fi
 
+no_vfat=1
+if [ $2 = "-vfat" ]; then
+	no_vfat=""
+	shift
+fi
+
 # check optional arguments
 if [ \! -z $2 ]; then
 	diskfile=$2
@@ -272,8 +278,8 @@ if [ \! -z $contentdir ]; then
 	step=$(($step+1))
 	# copy contents of given directory to the new partition
 	echo "$step) Copy the initial content to the partition..."
-	echo "MTOOLS_NO_VFAT=1 mcopy -i $tmppart -spmv $convertdir/* ::"
-	MTOOLS_NO_VFAT=1 mcopy -i $tmppart -spmv $convertdir/* ::
+	echo "MTOOLS_NO_VFAT=$no_vfat mcopy -i $tmppart -spmv $convertdir/* ::"
+	MTOOLS_NO_VFAT=$no_vfat mcopy -i $tmppart -spmv $convertdir/* ::
 	if [ $? -ne 0 ]; then
 		error="mcopy failed."
 		exit 2
-- 
2.11.0


--------------A9B4B3CBBE16AB6BBACAF517
Content-Type: text/x-patch;
 name="0006-Linux-loader-use-separate-FastRAM-options-for-kernel.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0006-Linux-loader-use-separate-FastRAM-options-for-kernel.pa";
 filename*1="tch"



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/