]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Remove everything from version.h except definition of RCSID().
authorthuermann <thuermann@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 18 Apr 2007 14:05:21 +0000 (14:05 +0000)
committerthuermann <thuermann@030b6a49-0b11-0410-94ab-b0dab22257f2>
Wed, 18 Apr 2007 14:05:21 +0000 (14:05 +0000)
Rename macro VERSION to CAN_VERSION, now defined in core.h.
Add macro CAN_ABI_VERSION.
Don't include version.h in kernel patches and delete usage of RCSID()
from all files generated by mkpatch.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@217 030b6a49-0b11-0410-94ab-b0dab22257f2

FILES-2.6
kernel/2.6/drivers/net/can/slcan.c
kernel/2.6/drivers/net/can/vcan.c
kernel/2.6/include/linux/can/core.h
kernel/2.6/include/linux/can/version.h
kernel/2.6/net/can/af_can.c
kernel/2.6/net/can/bcm.c
kernel/2.6/net/can/proc.c
kernel/2.6/net/can/raw.c
mkpatch

index 633083915d05d00d33fdfa6b37e3987bdc126e62..dce9819f3f1cf4e7db00180d76d334b185277452 100644 (file)
--- a/FILES-2.6
+++ b/FILES-2.6
@@ -7,7 +7,6 @@ kernel/2.6/net/can/raw.c
 kernel/2.6/net/can/bcm.c
 kernel/2.6/include/linux/can.h
 kernel/2.6/include/linux/can/core.h
-kernel/2.6/include/linux/can/version.h
 kernel/2.6/include/linux/can/error.h
 kernel/2.6/include/linux/can/raw.h
 kernel/2.6/include/linux/can/bcm.h
index 5206aed895706e44ff671e4cd0a3c76d966626d9..63b6e2d853dca44b074703f77e21804ce82a7779 100644 (file)
@@ -81,8 +81,8 @@
 
 RCSID("$Id$");
 
-static __initdata const char banner[] = KERN_INFO
-                       "CAN: serial line CAN interface " VERSION "\n"; 
+static __initdata const char banner[] =
+       KERN_INFO "CAN: serial line CAN interface " CAN_VERSION "\n";
 
 MODULE_ALIAS_LDISC(N_SLCAN);
 MODULE_DESCRIPTION("serial line CAN interface");
index 88ce077d0ddcdd3cae6d1d25c77d47cc62abd801..f7672a202b8e5c174d4fafedadde0e406a464bb4 100644 (file)
@@ -54,8 +54,8 @@
 
 RCSID("$Id$");
 
-static __initdata const char banner[] = KERN_INFO "CAN: virtual CAN "
-                                       "interface " VERSION "\n"; 
+static __initdata const char banner[] =
+       KERN_INFO "CAN: virtual CAN interface " CAN_VERSION "\n"; 
 
 MODULE_DESCRIPTION("virtual CAN interface");
 MODULE_LICENSE("Dual BSD/GPL");
index d483797c30bd9d11417b97a0e11e72a9aaf61df0..291e4e592ace919673ac67b81d516436012bf823 100644 (file)
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 
+
+#define CAN_VERSION "2.0.0-pre6"
+
+/* increment this number each time you change some user-space interface */
+#define CAN_ABI_VERSION 8
+
 #define DNAME(dev) ((dev) ? (dev)->name : "any")
 
 #define CAN_PROC_DIR "net/can" /* /proc/... */
index 30c1c5a40ee496aba073c9f9964e64ef02f8cf13..6a62680ef300358b1e4d9b0bf452a8f9e3ee5f8f 100644 (file)
 
 RCSID("$Id$");
 
-#define MAJORVERSION 2
-#define MINORVERSION 0
-#define PATCHLEVEL   0
-#define EXTRAVERSION "-pre6"
-
-#define LLCF_VERSION_CODE (((MAJORVERSION) << 16) + ((MINORVERSION) << 8) \
-                               + (PATCHLEVEL))
-
-/* stringification:  these are the usual macros to stringify with macro
-   expansion.   The str() macro does the expansion, the xstr() macro is
-   for the actual stringification.
-*/
-#define str(arg) xstr(arg)
-#define xstr(arg) #arg
-
-#define VERSION str(MAJORVERSION) "." str(MINORVERSION) "." str(PATCHLEVEL) \
-       EXTRAVERSION
-
 #endif /* CAN_VERSION_H */
index 86cd67378ec5f9eba9e4206d146161b9353e92fb..8de4c9f71e32bd40f8fc101c589898f1f3607913 100644 (file)
@@ -71,8 +71,8 @@
 RCSID("$Id$");
 
 #define IDENT "af_can"
-static __initdata const char banner[] = KERN_INFO "CAN: Controller Area "
-                                       "Network PF_CAN core " VERSION "\n"; 
+static __initdata const char banner[] =
+       KERN_INFO "CAN: Controller Area Network PF_CAN core " CAN_VERSION "\n";
 
 MODULE_DESCRIPTION("Controller Area Network PF_CAN core");
 MODULE_LICENSE("Dual BSD/GPL");
index d9a4563bd2e7202ae071cd73313ed808f5ef869f..2ace2732b12b827db630fcd4c77a7bd95b373117 100644 (file)
@@ -83,7 +83,7 @@ module_param(debug, int, S_IRUGO);
 
 #define IDENT "bcm"
 static __initdata const char banner[] = KERN_INFO
-       "CAN: broadcast manager (bcm) socket protocol " VERSION "\n"; 
+       "CAN: broadcast manager (bcm) socket protocol " CAN_VERSION "\n";
 
 MODULE_DESCRIPTION("PF_CAN bcm sockets");
 MODULE_LICENSE("Dual BSD/GPL");
index b4c004aed8a3877b029b9f31ab97474a496031c9..c05cf097ecbd169b0c6c577cf3a7ea4c5433dfce 100644 (file)
@@ -340,8 +340,8 @@ static int can_proc_read_version(char *page, char **start, off_t off,
        int len = 0;
 
        len += snprintf(page + len, PAGE_SIZE - len,
-                       "%06X [ Volkswagen Group - Low Level CAN Framework"
-                       " (LLCF) v%s ]\n", LLCF_VERSION_CODE, VERSION);
+                       "CAN version %s, ABI version %d",
+                       CAN_VERSION, CAN_ABI_VERSION);
        *eof = 1;
        return len;
 }
index dcc78a811f0a25ffd7d94213385704fa45856eaf..43c861822f46f5e5c69ca8bd49d3be14c4b1a241 100644 (file)
@@ -61,8 +61,8 @@
 RCSID("$Id$");
 
 #define IDENT "raw"
-static __initdata const char banner[] = KERN_INFO "CAN: raw socket protocol"
-                                       " " VERSION "\n"; 
+static __initdata const char banner[] =
+       KERN_INFO "CAN: raw socket protocol " CAN_VERSION "\n";
 
 MODULE_DESCRIPTION("PF_CAN raw sockets");
 MODULE_LICENSE("Dual BSD/GPL");
diff --git a/mkpatch b/mkpatch
index 26062cd39d62edf1961db729132be4b3a4c2fc13..d7dc7747594792bd6fb808e55d2bd1e534e8991f 100755 (executable)
--- a/mkpatch
+++ b/mkpatch
@@ -5,6 +5,8 @@
 # Generate a kernel patch to add socketcan to a kernel src tree.
 # The list of files to be added is read from stdin.
 
+use POSIX qw(strftime);
+
 $version = shift;
 
 if (-r "patches/$version.diff") {
@@ -43,15 +45,29 @@ sub add_file {
     open file, "./kv $version $file |" || die "open $file\n";
     @lines = <file>;
     $count = $#lines + 1;
-    use POSIX qw(strftime);
     $mtime = (stat($file))[9];
     $ts = strftime "%F %T", gmtime((stat($file))[9]);
 
+    for $i (0..$#lines) {
+       if ($lines[$i] =~ /include.*linux\/can\/version\.h/) {
+           undef($lines[$i]);
+           $count--;
+       }
+       if ($lines[$i] =~ /RCSID/) {
+           undef($lines[$i]);
+           $count--;
+           while ($lines[++$i] eq "\n") {
+               undef($lines[$i]);
+               $count--;
+           }
+       }
+    }
+
     print "--- a/$name 1970-01-01 00:00:00\n";
     print "+++ b/$name $ts\n";
     print "@@ -0,0 +1,$count @@\n";
     for (@lines) {
-       print "+$_";
+       print "+$_" if (defined($_));
     }
     close file;
 }