]> rtime.felk.cvut.cz Git - socketcan-devel.git/blobdiff - test/canecho.c
Add kernel version depency for Kernel 3.1.x which extended __rtnl_register().
[socketcan-devel.git] / test / canecho.c
index b8d7503dd1fc458133f3e23045cfa53fbdf8cc6c..a51966f32f6998292eaf0ba09cadba3e0fcf0c3f 100644 (file)
@@ -12,8 +12,7 @@
  * modification, are permitted provided that the following conditions
  * are met:
  * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, the following disclaimer and
- *    the referenced file 'COPYING'.
+ *    notice, this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
@@ -23,8 +22,8 @@
  *
  * Alternatively, provided that this notice is retained in full, this
  * software may be distributed under the terms of the GNU General
- * Public License ("GPL") version 2 as distributed in the 'COPYING'
- * file from the main directory of the linux kernel source.
+ * Public License ("GPL") version 2, in which case the provisions of the
+ * GPL apply INSTEAD OF those given above.
  *
  * The provided data structures and external interfaces from this code
  * are not restricted to be used by modules with a GPL compatible license.
@@ -92,28 +91,28 @@ int main(int argc, char **argv)
 
        while ((opt = getopt(argc, argv, "f:t:p:v")) != -1) {
                switch (opt) {
-                       case 'f':
-                               family = atoi(optarg);
-                               break;
+               case 'f':
+                       family = atoi(optarg);
+                       break;
 
-                       case 't':
-                               type = atoi(optarg);
-                               break;
+               case 't':
+                       type = atoi(optarg);
+                       break;
 
-                       case 'p':
-                               proto = atoi(optarg);
-                               break;
+               case 'p':
+                       proto = atoi(optarg);
+                       break;
 
-                       case 'v':
-                               verbose = 1;
-                               break;
+               case 'v':
+                       verbose = 1;
+                       break;
 
-                       case '?':
-                               break;
+               case '?':
+                       break;
 
-                       default:
-                               fprintf(stderr, "Unknown option %c\n", opt);
-                               break;
+               default:
+                       fprintf(stderr, "Unknown option %c\n", opt);
+                       break;
                }
        }
 
@@ -123,7 +122,7 @@ int main(int argc, char **argv)
        }
        
        printf("interface = %s, family = %d, type = %d, proto = %d\n",
-                       argv[optind], family, type, proto);
+              argv[optind], family, type, proto);
        if ((s = socket(family, type, proto)) < 0) {
                perror("socket");
                return 1;