[DRBD-cvs] scripts by lars; improvement to the kernel-patch target, ...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Tue, 20 Apr 2004 18:16:55 +0200 (CEST)
DRBD CVS committal
Author : lars
Project : drbd
Module : scripts
Dir : drbd/scripts
Modified Files:
Tag: rel-0_7-branch
patch-kernel
Log Message:
improvement to the kernel-patch target, new tools target
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/scripts/Attic/patch-kernel,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- patch-kernel 20 Apr 2004 11:36:53 -0000 1.1.2.1
+++ patch-kernel 20 Apr 2004 16:16:50 -0000 1.1.2.2
@@ -2,7 +2,7 @@
#
# Create a patch against a kernel tree which adds the DRBD sources.
#
-# $Id: patch-kernel,v 1.1.2.1 2004/04/20 11:36:53 lars Exp $
+# $Id: patch-kernel,v 1.1.2.2 2004/04/20 16:16:50 lars Exp $
#
# Copyright (C) 2003 Kees Cook, OSDL
# kees@osdl.org, http://developer.osdl.org/kees/
@@ -96,8 +96,11 @@
# and the right in-kernel-tree Makefile
cp -a $DRBD/drbd/Makefile-2.$KDIR_PATCHLEVEL $DRBD_SUB/Makefile
-# remove mempool backport if 2.6 # currently allways :)
+# remove some backports
test "$KDIR_PATCHLEVEL" = 6 && rm $DRBD_SUB/mempool*
+grep "HLIST_HEAD_INIT" $KERNEL/include/linux/list.h >/dev/null &&
+ rm $DRBD_SUB/hlist.h
+
# remove __arch_um__ to_virt() hack
sed -e '/^#ifdef __arch_um__/,/^#endif/d' \
< $DRBD/drbd/drbd_receiver.c > $DRBD_SUB/drbd_receiver.c
@@ -110,7 +113,7 @@
cp -a $KERNEL/drivers/block/drbd/{*.[ch],Makefile,Kconfig} \
$KERNEL_BASE/drivers/block/drbd/
# remove dangling drbd.mod.c, if it hangs around
- test -e $KERNEL_BASE/drivers/block/drbd/drbd.mod.c
+ rm -f $KERNEL_BASE/drivers/block/drbd/drbd.mod.c
fi
# Bring over the current kernel Kconfig and Makefile