[K42-discussion] [PATCH] Fix kfsimage for filenames with whitespaces
Livio Soares
livio at eecg.toronto.edu
Thu Oct 6 02:48:49 EST 2005
Howdy!
While trying out systemsim970 (aka mambo-gpul) here at Toronto, I found a bug
in the 'kfsimage' script that builds KFS images. It doesn't handle filenames
with whitespaces. The fix was to set IFS to <newline> instead of the default
value (which I _think_ is <space><newline><tab>). Anyways, patch is below.
Thanks,
Livio
-------------- next part --------------
Index: tools/misc/kfsimage.sh
===================================================================
RCS file: /u/kitchawa/cvsroot/kitch-core/tools/misc/kfsimage.sh,v
retrieving revision 1.3
diff -p -u -r1.3 kfsimage.sh
--- tools/misc/kfsimage.sh 7 Mar 2004 00:43:19 -0000 1.3
+++ tools/misc/kfsimage.sh 5 Oct 2005 14:04:48 -0000
@@ -73,6 +73,10 @@ echo "Creating disk " $DISK
mkfs.kfs -d $diskname || exit
echo "Disk " $diskname "created"
+# set IFS to newline to allow for filename with whitespaces
+IFS="
+"
+
#copy files
for file in `find $srcdir -type f -o -type l`; do
dest=${file##$srcdir}
@@ -80,7 +84,3 @@ for file in `find $srcdir -type f -o -ty
done
echo "Creation of KFS image (file $diskname) has finished."
-
-
-
-
More information about the K42-discussion
mailing list