mtd/patches patchin.sh,1.8,1.9
gleixner at infradead.org
gleixner at infradead.org
Sat Nov 30 18:48:42 EST 2002
Update of /home/cvs/mtd/patches
In directory phoenix.infradead.org:/tmp/cvs-serv26726
Modified Files:
patchin.sh
Log Message:
be aware of crc32 for 2.4 kernels
Index: patchin.sh
===================================================================
RCS file: /home/cvs/mtd/patches/patchin.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- patchin.sh 27 Nov 2002 01:21:27 -0000 1.8
+++ patchin.sh 30 Nov 2002 23:48:39 -0000 1.9
@@ -102,7 +102,7 @@
# 2.4 below 2.4.20 zlib headers are neccecary
if test $SUBLEVEL -lt 20
then
- JFFS2_H="$HDIR/jffs2*.h $HDIR/workqueue.h $HDIR/z*.h $HDIR/rb*.h $TOPDIR/fs/jffs2/crc32.h"
+ JFFS2_H="$HDIR/jffs2*.h $HDIR/workqueue.h $HDIR/z*.h $HDIR/rb*.h"
else
JFFS2_H="$HDIR/jffs2*.h $HDIR/workqueue.h $HDIR/rb*.h"
fi
@@ -170,6 +170,24 @@
cat $TOPDIR/fs/Config.in >>Config.tmp
sed 1,"$CRAMFS"d fs/Config.in >>Config.tmp
mv -f Config.tmp fs/Config.in
+
+ if [ -f include/linux/crc32.h ]
+ then
+ # check, if it is already defined there
+ CRC32=`grep -sm 1 'crc32(' include/linux/crc32.h`
+ if [ "$CRC32" = "" ]
+ then
+ # patch in header form fs/jffs2
+ LASTLINE=`grep -nm1 '#endif' include/linux/crc32.h | sed s/:.*//`
+ let LASTLINE=LASTLINE-1
+ sed "$LASTLINE"q include/linux/crc32.h >Crc32.tmp
+ cat fs/jffs2/crc32.h >>Crc32.tmp
+ echo "#endif" >>Crc32.tmp
+ mv -f Crc32.tmp include/linux/crc32.h
+ fi
+ else
+ ln -sf $TOPDIR/fs/jffs2/crc32.h include/linux
+ fi
fi
fi
fi
More information about the linux-mtd-cvs
mailing list