mtd/patches patchin.sh,1.31,1.32

Artem Bityuckiy dedekind at infradead.org
Sat Dec 11 12:16:14 EST 2004


Update of /home/cvs/mtd/patches
In directory phoenix.infradead.org:/tmp/cvs-serv28792

Modified Files:
	patchin.sh 
Log Message:
Additional clean-ups


Index: patchin.sh
===================================================================
RCS file: /home/cvs/mtd/patches/patchin.sh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- patchin.sh	11 Dec 2004 17:06:49 -0000	1.31
+++ patchin.sh	11 Dec 2004 17:16:11 -0000	1.32
@@ -36,8 +36,9 @@
 # 
 # Finds the first and last lines numbers of block of Kconfig file entries
 # containing pattern $2. $1 contains the file name where to search for.
+# Helper function for patch_Kconfig();
 #
-# Returns the result in FIRSLINE and LASTLINE variables.
+# Returns the result in FIRSTLINE and LASTLINE variables.
 #
 function find_lines () {
 	# find the line number of the first and the last $2 entries
@@ -57,13 +58,13 @@
 }
 
 #
-# Patch the Kconfig file. Helper function for patch_Kconfig ().
+# Patch the Kconfig file. Helper function for patch_Kconfig().
 # 
 # Function requires the following positional parameters:
 # 
-# $1:	the path to the input Kconfig file from which the function
+# $1:	the path of the input Kconfig file from which the function
 #	should fetch new the Kconfig entries;
-# $2:	the path to the target linux Kconfig file which should be
+# $2:	the path of the target linux Kconfig file which should be
 #	patched; if the parameter value is '', just insert to the end of
 #	the target Kconfig file;
 # $3:	the line number of the first entry in the in the input file;
@@ -108,17 +109,17 @@
 }
 
 #
-# Patch the Kconfig file. This function assubes that there is some input Kconfig file
-# (on placed in mtd) containing, among other, a block of continguous entries for
-# some subsystem # (JFFS2, etc). Function reads this block and inserts it to the
+# Patch the Kconfig file. This function assumes that there is some input Kconfig file
+# (one placed in mtd) containing (among other) a block of continguous entries for
+# some subsystem (e.g, JFFS2). Function reads this block and inserts it to the
 # target Kconfig file (in Linux sources). Before inserting it removes older entries
 # from the target Kconfig.
 #
 # Input positional parameters:
 # 
-# $1:	the path to the input Kconfig file from which the function
+# $1:	the path of the input Kconfig file from which the function
 #	should fetch new the Kconfig entries;
-# $2:	the path to the target linux Kconfig file which should be
+# $2:	the path of the target linux Kconfig file which should be
 #	patched; if the parameter value is '', just insert to the end of
 #	the target Kconfig file;
 # $3:	The patched subsystem name;
@@ -155,7 +156,7 @@
 	fi;
 	
 	# remove older PATTERN-related entries from Kconfig
-	TMPFILE=$OUTFILE.$$;
+	local TMPFILE=$OUTFILE.$$;
 	if [ $LASTLINE -ne "0" ]; then
 		cat $OUTFILE | sed -n -e "$FIRSTLINE,$LASTLINE ! p" > $TMPFILE;
 		mv $TMPFILE $OUTFILE;
@@ -219,7 +220,7 @@
 # Display usage of this script
 #
 usage () {
-	echo "usage:  $0 [-c] [-j] kernelpath"
+	echo "usage:  $0 [-c] [-j] [-2] [-3] [-b] kernelpath"
 	echo "   -c  -- copy files to kernel tree instead of building links"
 	echo "   -j  -- include JFFS2 file system (depricated option)" 
 	echo "   -2  -- include JFFS2 file system"





More information about the linux-mtd-cvs mailing list