license issues of can-utils
Subsystems (3)
Hello,
I started to create a Debian package for can-utils and while looking through the source files to collect their copyright and license information, I noticed two things that probably need fixing before a can-utils package can enter Debian.
a) slcand.c claims to be licensed under both GPL and GFDL-NIV. These two licenses are not compatible though (according to some Debian people in #debian-ftp) and so are not distributable.
Obvious solutions are:
- rm slcand.c (and optionally rewrite it); or
- find out which parts are affected by GFDL-NIV and just substitute these; or
- look at the wikipedia template and judge it to be that little creative to allow dropping GFDL-NIV (IANAL, but I guess that is hardly possible, looking at
https://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&oldid=280005270#Sample_Program_in_C_on_Linux)
b) several headers below include/socketcan/can have a copyright but no license. I think the best approach here (as also suggested by Marc in a private discussion) is to fix the original headers in the kernel and then copy these back into can-utils. I assume the standard boilerplate with BSD-3-Clause + GPL-2 is the desired addition? If yes I can prepare a patch.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Marc Kleine-Budde
maintainerQuoted 4 lines · Uwe Kleine-König
I started to create a Debian package for can-utils and while looking through the source files to collect their copyright and license information, I noticed two things that probably need fixing before a can-utils package can enter Debian.
[...]
Quoted 6 lines
b) several headers below
include/socketcan/canhave a copyright but no license. I think the best approach here (as also suggested by Marc in a private discussion) is to fix the original headers in the kernel and then copy these back into can-utils. I assume the standard boilerplate with BSD-3-Clause + GPL-2 is the desired addition? If yes I can prepare a patch.
tl;dr IANAL: netlink.h GPL, all others DUAL BSD/GPL.
Marc
We're talking about the uapi can headers which are:
include/uapi/linux/can/error.h added with initial code which is Dual BSD/GPL
Copyright by VW, Author Oliver.
include/uapi/linux/can.h added with initial code which is Dual BSD/GPLinclude/uapi/linux/can/raw.h added with initial code which is Dual BSD/GPL
Both copyright by VW, Author Oliver and Urs.
include/uapi/linux/can/bcm.h bcm.c has MODULE_LICENSE("Dual BSD/GPL");include/uapi/linux/can/gw.h gw.c has MODULE_LICENSE("Dual BSD/GPL")
Both copyright by VW, Author Oliver.
include/uapi/linux/can/netlink.h was added by Wolfgang Grandegger:
39549ee can: CAN Network device driver and Netlink interfacedev.c holds the netlink parsing code which has MODULE_LICENSE("GPL v2");
Copyright by Wolfgang.
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Oliver Hartkopp
maintainerQuoted 6 lines · Marc Kleine-Budde
Quoted 4 lines · Uwe Kleine-König
I started to create a Debian package for can-utils and while looking through the source files to collect their copyright and license information, I noticed two things that probably need fixing before a can-utils package can enter Debian.
Which is a good idea :-)
Quoted 9 lines
Quoted 7 lines
b) several headers below
include/socketcan/canhave a copyright but no license. I think the best approach here (as also suggested by Marc in a private discussion) is to fix the original headers in the kernel and then copy these back into can-utils. I assume the standard boilerplate with BSD-3-Clause + GPL-2 is the desired addition? If yes I can prepare a patch.tl;dr IANAL:
netlink.hGPL, all others DUAL BSD/GPL.
Yep.
When intentionally putting the 'missing license' in the header files we just oriented to other header files, where a more detailed license was only provided in the C files.
Btw. when reworking the license information in the header files I would suggest to take the version which was checked by our lawyer - which is e.g. in linux/net/can/raw.c
It has parts of BSD and alternatively refers to GPLv2. And it's not too long.
Does this fit the Debian requirements?
Tnx & brest regards,
Oliver
Quoted 26 lines
We're talking about the uapi can headers which are:
include/uapi/linux/can/error.hadded with initial code which is Dual BSD/GPLCopyright by VW, Author Oliver.
include/uapi/linux/can.hadded with initial code which is Dual BSD/GPLinclude/uapi/linux/can/raw.hadded with initial code which is Dual BSD/GPLBoth copyright by VW, Author Oliver and Urs.
include/uapi/linux/can/bcm.hbcm.chasMODULE_LICENSE("Dual BSD/GPL");include/uapi/linux/can/gw.hgw.chasMODULE_LICENSE("Dual BSD/GPL")Both copyright by VW, Author Oliver.
include/uapi/linux/can/netlink.hwas added by Wolfgang Grandegger:
39549ee can: CAN Network device driver and Netlink interfacedev.cholds the netlink parsing code which hasMODULE_LICENSE("GPL v2");Copyright by Wolfgang.
cover License cleanup
In reply to Uwe Kleine-KönigHello,
this series fixes all license issues I identified back in August last year and so opens the possibility to create a Debian package for can-utils.
Uwe Kleine-König (3):
Update license information for some header files ioctl.h: drop unused header
slcand: remove program as it is undistributable
.gitignore | 1 - Android.mk | 14 -- GNUmakefile.am | 2 - Makefile | 2 +- include/socketcan/can/bcm.h | 32 +++ include/socketcan/can/error.h | 32 +++ include/socketcan/can/gw.h | 32 +++ include/socketcan/can/ioctl.h | 99 -------- include/socketcan/can/netlink.h | 8 + include/socketcan/can/raw.h | 32 +++ slcand.c | 503 ---------------------------------------- 11 files changed, 137 insertions(+), 620 deletions(-) delete mode 100644 include/socketcan/can/ioctl.h delete mode 100644 slcand.c
Signature · 1 line
1.8.5.2
PATCH 1/3 Update license information for some header files
This corresponds to Linux commits
2485602f1af2 (can: add explicit copyrights to can headers) 1c2da13c21a1 (can: add explicit copyrights to can's netlink header)
---
Hello,
I would have expected to just need to do something like:
cd $path_to_canutils
rm -r include/socketcan/can
cd $path_to_linux
git archive --format=tar --prefix=socketcan/can/ v3.13-rc7:include/uapi/linux/can | tar xC $path_to_canutils/include git cat-file blob v3.13-rc7:include/uapi/linux/can.h > $path_to_canutils/include/socketcan/can.h
to sync the header files. I didn't test but some changes introduced by the above sequence seem to be uncompilable so I choosed to only cherry-pick the two Linux commits. IMHO this is a bug (in Linux or can-utils or maybe both).
Best regards
Uwe
include/socketcan/can/bcm.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/error.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/gw.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/netlink.h | 8 ++++++++ include/socketcan/can/raw.h | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+)
include/socketcan/can/bcm.h +32 -0
@@ -7,6 +7,38 @@* Copyright (c) 2002-2007 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_BCM_H
include/socketcan/can/error.h +32 -0
@@ -7,6 +7,38 @@* Copyright (c) 2002-2007 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_ERROR_H
include/socketcan/can/gw.h +32 -0
@@ -7,6 +7,38 @@* Copyright (c) 2011 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_GW_H
include/socketcan/can/netlink.h +8 -0
@@ -5,6 +5,14 @@* * Copyright (c) 2009 Wolfgang Grandegger <[email protected]> * +* This program is free software; you can redistribute it and/or modify +* it under the terms of the version 2 of the GNU General Public License +* as published by the Free Software Foundation +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. */ #ifndef CAN_NETLINK_H
include/socketcan/can/raw.h +32 -0
@@ -8,6 +8,38 @@* Copyright (c) 2002-2007 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_RAW_H
Signature · 1 line
1.8.5.2
PATCH 2/3 ioctl.h: drop unused header
In reply to Uwe Kleine-KönigThis header doesn't exist in the Linux tree and it's unused by can-utils, so drop it. As a side effect this fixes the last file not specifying any license and/or copyright information.
--- GNUmakefile.am | 1 - include/socketcan/can/ioctl.h | 99 ------------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 include/socketcan/can/ioctl.h
GNUmakefile.am +0 -1
@@ -23,7 +23,6 @@ noinst_HEADERS = \ include/socketcan/can/error.h \ include/socketcan/can/gw.h \ include/socketcan/can.h \ - include/socketcan/can/ioctl.h \ include/socketcan/can/isotp.h \ include/socketcan/can/netlink.h \ include/socketcan/can/raw.h
include/socketcan/can/ioctl.h deleted +0 -99
99 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH 3/3 slcand: remove program as it is undistributable
In reply to Uwe Kleine-KönigThe source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
--- .gitignore | 1 - Android.mk | 14 -- GNUmakefile.am | 1 - Makefile | 2 +- slcand.c | 503 --------------------------------------------------------- 5 files changed, 1 insertion(+), 520 deletions(-) delete mode 100644 slcand.c
.gitignore +0 -1
@@ -42,7 +42,6 @@ GNUmakefile.in /log2asc /log2long /slcan_attach -/slcand /slcanpty /can-utils-*.tar.bz2
Android.mk +0 -14
@@ -307,20 +307,6 @@ LOCAL_CFLAGS := $(PRIVATE_LOCAL_CFLAGS) include $(BUILD_EXECUTABLE) # -# slcand -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := slcand.c -LOCAL_MODULE := slcand -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/ -LOCAL_CFLAGS := $(PRIVATE_LOCAL_CFLAGS) - -include $(BUILD_EXECUTABLE) - -# # slcanpty #
GNUmakefile.am +0 -1
@@ -57,7 +57,6 @@ bin_PROGRAMS = \ log2asc \ log2long \ slcan_attach \ - slcand \ slcanpty EXTRA_DIST = \
Makefile +1 -1
@@ -51,7 +51,7 @@ CFLAGS = -O2 -Wall -Wno-parentheses -Iinclude \ PROGRAMS_ISOTP = isotpdump isotprecv isotpsend isotpsniffer isotptun isotpserver PROGRAMS_CANGW = cangw -PROGRAMS_SLCAN = slcan_attach slcand +PROGRAMS_SLCAN = slcan_attach PROGRAMS = can-calc-bit-timing candump cansniffer cansend canplayer cangen canbusload\ log2long log2asc asc2log\ canlogserver bcmserver\
slcand.c deleted +0 -503
503 lines not on this page · raw message
Signature · 1 line
1.8.5.2
Re: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
Quoted 4 lines · Uwe Kleine-König
The source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
There is need for this daemon. I'm using it in production tests.
Yegor
Quoted 587 lines
--- .gitignore | 1 - Android.mk | 14 -- GNUmakefile.am | 1 - Makefile | 2 +- slcand.c | 503 --------------------------------------------------------- 5 files changed, 1 insertion(+), 520 deletions(-) delete mode 100644 slcand.c.gitignore +0
-1@@ -42,7 +42,6 @@ GNUmakefile.in /log2asc /log2long /slcan_attach -/slcand /slcanpty /can-utils-*.tar.bz2Android.mk +0
-14@@ -307,20 +307,6 @@ LOCAL_CFLAGS := $(PRIVATE_LOCAL_CFLAGS) include $(BUILD_EXECUTABLE) # -# slcand -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := slcand.c -LOCAL_MODULE := slcand -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/ -LOCAL_CFLAGS := $(PRIVATE_LOCAL_CFLAGS) - -include $(BUILD_EXECUTABLE) - -# # slcanpty #GNUmakefile.am +0
-1@@ -57,7 +57,6 @@ bin_PROGRAMS = \ log2asc \ log2long \ slcan_attach \ - slcand \ slcanpty EXTRA_DIST = \Makefile +1
-1@@ -51,7 +51,7 @@ CFLAGS = -O2 -Wall -Wno-parentheses -Iinclude \ PROGRAMS_ISOTP = isotpdump isotprecv isotpsend isotpsniffer isotptun isotpserver PROGRAMS_CANGW = cangw -PROGRAMS_SLCAN = slcan_attach slcand +PROGRAMS_SLCAN = slcan_attach PROGRAMS = can-calc-bit-timing candump cansniffer cansend canplayer cangen canbusload\ log2long log2asc asc2log\ canlogserver bcmserver\slcand.c deleted +0
-504@@ -1,503 +0,0 @@ -/* -* slcand.c - userspace daemon for serial line CAN interface driver SLCAN -* -* Copyright (c) 2009 Robert Haddon <[email protected]> -* Copyright (c) 2009 Verari Systems Inc. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* This code is derived from an example daemon code from -* -* http://en.wikipedia.org/wiki/Daemon_(computer_software)#Sample_Program_in_C_on_Linux -* (accessed 2009-05-05) -* -* So it is additionally licensed under the GNU Free Documentation License: -* -* Permission is granted to copy, distribute and/or modify this document -* under the terms of the GNU Free Documentation License, Version 1.2 -* or any later version published by the Free Software Foundation; -* with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -* A copy of the license is included in the section entitled "GNU -* Free Documentation License". -* -* Send feedback to <[email protected]> -* -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <syslog.h> -#include <errno.h> -#include <pwd.h> -#include <signal.h> -#include <sys/ioctl.h> -#include <net/if.h> -#include <termios.h> - -/* default slcan line discipline since Kernel 2.6.25 */ -#define LDISC_N_SLCAN 17 - -/* Change this to whatever your daemon is called */ -#define DAEMON_NAME "slcand" - -/* Change this to the user under which to run */ -#define RUN_AS_USER "root" - -/* The length of ttypath buffer */ -#define TTYPATH_LENGTH 64 - -/* The length of pidfile name buffer */ -#define PIDFILE_LENGTH 64 - -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 - -void print_usage (char *prg) -{ -fprintf (stderr,"\nUsage: %s [options] <tty> [canif-name]\n\n" , prg); -fprintf (stderr,"Options: -o (send open command 'O\\r')\n" ); -fprintf (stderr," -c (send close command 'C\\r')\n" ); -fprintf (stderr," -f (read status flags with 'F\\r' to reset error states)\n" ); -fprintf (stderr," -s <speed> (set CAN speed 0..8)\n" ); -fprintf (stderr," -S <speed> (set UART speed in baud)\n" ); -fprintf (stderr," -b <btr> (set bit time register value)\n" ); -fprintf (stderr," -F (stay in foreground; no daemonize)\n" ); -fprintf (stderr," -h (show this help page)\n" ); -fprintf (stderr,"\nExamples:\n" ); -fprintf (stderr,"slcand -o -c -f -s6 ttyslcan0\n" ); -fprintf (stderr,"slcand -o -c -f -s6 ttyslcan0 can0\n" ); -fprintf (stderr,"\n" ); -exit (EXIT_FAILURE ); -} - -static int slcand_running; -static int exit_code; -static char ttypath[TTYPATH_LENGTH ]; -static char pidfile[PIDFILE_LENGTH ]; - -static void child_handler (int signum) -{ -switch (signum) { - -case SIGUSR1 : -/* exit parent */ -exit (EXIT_SUCCESS ); -break ; -case SIGALRM : -case SIGCHLD : -syslog (LOG_NOTICE ,"received signal %i on %s" , signum, ttypath); - exit_code =EXIT_FAILURE ; - slcand_running =0 ; -break ; -case SIGINT : -case SIGTERM : -syslog (LOG_NOTICE ,"received signal %i on %s" , signum, ttypath); - exit_code =EXIT_SUCCESS ; - slcand_running =0 ; -break ; - } -} - -static int look_up_uart_speed (long int s) -{ -switch (s) { - -case 9600 : -return B9600 ; -case 19200 : -return B19200 ; -case 38400 : -return B38400 ; -case 57600 : -return B57600 ; -case 115200 : -return B115200 ; -case 230400 : -return B230400 ; -case 460800 : -return B460800 ; -case 500000 : -return B500000 ; -case 576000 : -return B576000 ; -case 921600 : -return B921600 ; -case 1000000 : -return B1000000 ; -case 1152000 : -return B1152000 ; -case 1500000 : -return B1500000 ; -case 2000000 : -return B2000000 ; -#ifdef B2500000 -case 2500000 : -return B2500000 ; -#endif -#ifdef B3000000 -case 3000000 : -return B3000000 ; -#endif -#ifdef B3500000 -case 3500000 : -return B3500000 ; -#endif -#ifdef B3710000 - case 3710000 - return B3710000; -#endif -#ifdef B4000000 -case 4000000 : -return B4000000 ; -#endif -default : -return -1 ; - } -} - -static pid_t daemonize (const char *lockfile,char *tty,char *name) -{ -pid_t pid, sid, parent; -int lfp =-1 ; -FILE *pFile; -char const *pidprefix ="/var/run/" ; -char const *pidsuffix =".pid" ; - -snprintf (pidfile,PIDFILE_LENGTH ,"%s%s-%s%s" , pidprefix,DAEMON_NAME , tty, pidsuffix); - -/* already a daemon */ -if (getppid () ==1 ) -return 0 ; - -/* Create the lock file as the current user */ -if (lockfile && lockfile[0 ]) { - - lfp =open (lockfile,O_RDWR |O_CREAT ,0640 ); -if (lfp <0 ) - { -syslog (LOG_ERR ,"unable to create lock file %s, code=%d (%s)" , - lockfile, errno,strerror (errno)); -exit (EXIT_FAILURE ); - } - } - -/* Drop user if there is one, and we were run as root */ -if (getuid () ==0 ||geteuid () ==0 ) { -struct passwd *pw =getpwnam (RUN_AS_USER ); - -if (pw) - { -/* syslog(LOG_NOTICE, "setting user to " RUN_AS_USER); */ -setuid (pw->pw_uid); - } - } - -/* Trap signals that we expect to receive */ -signal (SIGINT , child_handler); -signal (SIGTERM , child_handler); -signal (SIGCHLD , child_handler); -signal (SIGUSR1 , child_handler); -signal (SIGALRM , child_handler); - -/* Fork off the parent process */ - pid =fork (); -if (pid <0 ) { -syslog (LOG_ERR ,"unable to fork daemon, code=%d (%s)" , - errno,strerror (errno)); -exit (EXIT_FAILURE ); - } - -/* If we got a good PID, then we can exit the parent process. */ -if (pid >0 ) { -/* Wait for confirmation from the child via SIGTERM or SIGCHLD, or -for five seconds to elapse (SIGALRM). pause() should not return. */ -alarm (5 ); -pause (); -exit (EXIT_FAILURE ); - } - -/* At this point we are executing as the child process */ - parent =getppid (); - -/* Cancel certain signals */ -signal (SIGCHLD ,SIG_DFL );/* A child process dies */ -signal (SIGTSTP ,SIG_IGN );/* Various TTY signals */ -signal (SIGTTOU ,SIG_IGN ); -signal (SIGTTIN ,SIG_IGN ); -signal (SIGHUP ,SIG_IGN );/* Ignore hangup signal */ -signal (SIGINT , child_handler); -signal (SIGTERM , child_handler); - -/* Change the file mode mask */ -umask (0 ); - -/* Create a new SID for the child process */ - sid =setsid (); -if (sid <0 ) { -syslog (LOG_ERR ,"unable to create a new session, code %d (%s)" , - errno,strerror (errno)); -exit (EXIT_FAILURE ); - } - - pFile =fopen (pidfile,"w" ); -if (NULL == pFile) { -syslog (LOG_ERR ,"unable to create pid file %s, code=%d (%s)" , - pidfile, errno,strerror (errno)); -exit (EXIT_FAILURE ); - } -fprintf (pFile,"%d\n" , sid); -fclose (pFile); - -/* Change the current working directory. This prevents the current -directory from being locked; hence not being able to remove it. */ -if (chdir ("/" ) <0 ) { -syslog (LOG_ERR ,"unable to change directory to %s, code %d (%s)" , -"/" , errno,strerror (errno)); -exit (EXIT_FAILURE ); - } - -/* Redirect standard files to /dev/null */ - pFile =freopen ("/dev/null" ,"r" , stdin); - pFile =freopen ("/dev/null" ,"w" , stdout); - pFile =freopen ("/dev/null" ,"w" , stderr); - -/* Tell the parent process that we are A-okay */ -/* kill(parent, SIGUSR1); */ -return parent; -} - -int main (int argc,char *argv[]) -{ -char *tty =NULL ; -char const *devprefix ="/dev/" ; -char *name =NULL ; -char buf[IFNAMSIZ +1 ]; -struct termios tios; -speed_t old_ispeed; -speed_t old_ospeed; - -int opt; -int send_open =0 ; -int send_close =0 ; -int send_read_status_flags =0 ; -char *speed =NULL ; -char *uart_speed_str =NULL ; -long int uart_speed =0 ; -char *btr =NULL ; -int run_as_daemon =1 ; -pid_t parent_pid =0 ; -char *pch; -int ldisc =LDISC_N_SLCAN ; -int fd; - - ttypath[0 ] ='\0' ; - -while ((opt =getopt (argc, argv,"ocfs:S:b:?hF" )) !=-1 ) { -switch (opt) { -case 'o' : - send_open =1 ; -break ; -case 'c' : - send_close =1 ; -break ; -case 'f' : - send_read_status_flags =1 ; -break ; -case 's' : - speed = optarg; -if (strlen (speed) >1 ) -print_usage (argv[0 ]); -break ; -case 'S' : - uart_speed_str = optarg; - errno =0 ; - uart_speed =strtol (uart_speed_str,NULL ,10 ); -if (errno) -print_usage (argv[0 ]); -if (look_up_uart_speed (uart_speed) ==-1 ) { -fprintf (stderr,"Unsupported UART speed (%lu)\n" , uart_speed); -exit (EXIT_FAILURE ); - } -break ; -case 'b' : - btr = optarg; -if (strlen (btr) >6 ) -print_usage (argv[0 ]); -break ; -case 'F' : - run_as_daemon =0 ; -break ; -case 'h' : -case '?' : -default : -print_usage (argv[0 ]); -break ; - } - } - -/* Initialize the logging interface */ -openlog (DAEMON_NAME ,LOG_PID ,LOG_LOCAL5 ); - -/* Parse serial device name and optional can interface name */ - tty = argv[optind]; -if (NULL == tty) -print_usage (argv[0 ]); - - name = argv[optind +1 ]; - -/* Prepare the tty device name string */ - pch =strstr (tty, devprefix); -if (pch == tty) -print_usage (argv[0 ]); - -snprintf (ttypath,TTYPATH_LENGTH ,"%s%s" , devprefix, tty); -syslog (LOG_INFO ,"starting on TTY device %s" , ttypath); - -/* Daemonize */ -if (run_as_daemon) - parent_pid =daemonize ("/var/lock/" DAEMON_NAME , tty, name); -else { -/* Trap signals that we expect to receive */ -signal (SIGINT , child_handler); -signal (SIGTERM , child_handler); - } - -/* */ - slcand_running =1 ; - -/* Now we are a daemon -- do the work for which we were paid */ - fd =open (ttypath,O_RDWR |O_NONBLOCK |O_NOCTTY ); -if (fd <0 ) { -syslog (LOG_NOTICE ,"failed to open TTY device %s\n" , ttypath); -perror (ttypath); -exit (EXIT_FAILURE ); - } - -/* Configure baud rate */ -memset (&tios,0 ,sizeof (struct termios )); -if (tcgetattr (fd, &tios) <0 ) { -syslog (LOG_NOTICE ,"failed to get attributes for TTY device %s: %s\n" , ttypath,strerror (errno)); -exit (EXIT_FAILURE ); - } - -/* Get old values for later restore */ - old_ispeed =cfgetispeed (&tios); - old_ospeed =cfgetospeed (&tios); - -/* Baud Rate */ -cfsetispeed (&tios,look_up_uart_speed (uart_speed)); -cfsetospeed (&tios,look_up_uart_speed (uart_speed)); - -/* apply changes */ -if (tcsetattr (fd,TCSADRAIN , &tios) <0 ) -syslog (LOG_NOTICE ,"Cannot set attributes for device \"%s\": %s!\n" , ttypath,strerror (errno)); - -if (speed) { -sprintf (buf,"C\rS%s\r" , speed); -write (fd, buf,strlen (buf)); - } - -if (btr) { -sprintf (buf,"C\rs%s\r" , btr); -write (fd, buf,strlen (buf)); - } - -if (send_read_status_flags) { -sprintf (buf,"F\r" ); -write (fd, buf,strlen (buf)); - } - -if (send_open) { -sprintf (buf,"O\r" ); -write (fd, buf,strlen (buf)); - } - -/* set slcan like discipline on given tty */ -if (ioctl (fd,TIOCSETD , &ldisc) <0 ) { -perror ("ioctl TIOCSETD" ); -exit (1 ); - } - -/* retrieve the name of the created CAN netdevice */ -if (ioctl (fd,SIOCGIFNAME , buf) <0 ) { -perror ("ioctl SIOCGIFNAME" ); -exit (1 ); - } - -syslog (LOG_NOTICE ,"attached TTY %s to netdevice %s\n" , ttypath, buf); - -/* try to rename the created netdevice */ -if (name) { -struct ifreq ifr; -int s =socket (PF_INET ,SOCK_DGRAM ,0 ); - -if (s <0 ) -perror ("socket for interface rename" ); -else { -strncpy (ifr.ifr_name, buf,IFNAMSIZ ); -strncpy (ifr.ifr_newname, name,IFNAMSIZ ); - -if (ioctl (s,SIOCSIFNAME , &ifr) <0 ) { -syslog (LOG_NOTICE ,"netdevice %s rename to %s failed\n" , buf, name); -perror ("ioctl SIOCSIFNAME rename" ); -exit (1 ); - }else -syslog (LOG_NOTICE ,"netdevice %s renamed to %s\n" , buf, name); - -close (s); - } - } -if (parent_pid >0 ) -kill (parent_pid,SIGUSR1 ); - -/* The Big Loop */ -while (slcand_running) -sleep (1 );/* wait 1 second */ - -/* Reset line discipline */ -syslog (LOG_INFO ,"stopping on TTY device %s" , ttypath); - ldisc =N_TTY ; -if (ioctl (fd,TIOCSETD , &ldisc) <0 ) { -perror ("ioctl TIOCSETD" ); -exit (EXIT_FAILURE ); - } - -if (send_close) { -sprintf (buf,"C\r" ); -write (fd, buf,strlen (buf)); - } - -/* Reset old rates */ -cfsetispeed (&tios, old_ispeed); -cfsetospeed (&tios, old_ospeed); - -/* apply changes */ -if (tcsetattr (fd,TCSADRAIN , &tios) <0 ) -syslog (LOG_NOTICE ,"Cannot set attributes for device \"%s\": %s!\n" , ttypath,strerror (errno)); - -/* Remove pidfile */ -if (run_as_daemon) -unlink (pidfile); - -/* Finish up */ -syslog (LOG_NOTICE ,"terminated on %s" , ttypath); -closelog (); -return exit_code; -} --1.8.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-can" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Oliver Hartkopp
maintainerRe: [PATCH can-utils 1/3] Update license information for some header files
In reply to Uwe Kleine-KönigQuoted 22 lines · Uwe Kleine-König
This corresponds to Linux commits
2485602f1af2(can: add explicit copyrights to can headers)1c2da13c21a1(can: add explicit copyrights to can's netlink header)
---
Hello,I would have expected to just need to do something like:
cd $path_to_canutils
rm -rinclude/socketcan/can
cd $path_to_linux
git archive --format=tar --prefix=socketcan/can/ v3.13-rc7:include/uapi/linux/can | tar xC $path_to_canutils/include git cat-file blob v3.13-rc7:include/uapi/linux/can.h >$path_to_canutils/include/socketcan/can.hto sync the header files. I didn't test but some changes introduced by the above sequence seem to be uncompilable so I choosed to only cherry-pick the two Linux commits. IMHO this is a bug (in Linux or can-utils or maybe both).
Best regards
Uwe
Quoted 6 lines
include/socketcan/can/bcm.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/error.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/gw.h | 32 ++++++++++++++++++++++++++++++++ include/socketcan/can/netlink.h | 8 ++++++++ include/socketcan/can/raw.h | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+)
Hello Uwe,
thanks for the effort.
Btw.
- include/socketcan/can.h
- include/socketcan/can/isotp.h
are both missing in this process.
Unfortunately we missed linux/include/uapi/linux/can.h in commit 2485602f1af2 (can: add explicit copyrights to can headers).
Would you like to pick this update of your original commit too?
Best regards,
Oliver
Re: [PATCH can-utils 2/3] ioctl.h: drop unused header
In reply to Uwe Kleine-KönigThis is a relict from the first implementation of a CAN driver configuration interface from 2006.
As the current can-utils do not reference them nor the ioctl interface has any relevance removing this file is a good idea :-)
Tnx Uwe!
Quoted 127 lines · Uwe Kleine-König
This header doesn't exist in the Linux tree and it's unused by can-utils, so drop it. As a side effect this fixes the last file not specifying any license and/or copyright information.
--- GNUmakefile.am | 1 - include/socketcan/can/ioctl.h | 99 ------------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 include/socketcan/can/ioctl.hGNUmakefile.am +0
-1@@ -23,7 +23,6 @@ noinst_HEADERS = \ include/socketcan/can/error.h \ include/socketcan/can/gw.h \ include/socketcan/can.h \ - include/socketcan/can/ioctl.h \ include/socketcan/can/isotp.h \ include/socketcan/can/netlink.h \ include/socketcan/can/raw.hinclude/socketcan/can/ioctl.h deleted +0
-99@@ -1,99 +0,0 @@ - -/* -* socketcan/can/ioctl.h -* -* Definitions for CAN controller setup (work in progress) -* -* $Id$ -* -* Send feedback to <[email protected]> -* -*/ - -#ifndef CAN_IOCTL_H -#define CAN_IOCTL_H - -#include <linux/sockios.h> - -/* -* CAN bitrate -*/ -#define CAN_BITRATE_UNCONFIGURED ((__u32) 0xFFFFFFFFU) -#define CAN_BITRATE_UNKNOWN 0 -#define CAN_BITRATE_DEFAULT 500000 - -/* -* CAN custom bit time -*/ -enum can_bittimes { -CAN_BITTIME_STD , -CAN_BITTIME_BTR -}; - -/* TSEG1 of controllers usually is a sum of synch_seg (always 1), -* prop_seg and phase_seg1, TSEG2 = phase_seg2 */ - -struct can_bittime_std { -__u32 brp;/* baud rate prescaler */ -__u8 prop_seg;/* from 1 to 8 */ -__u8 phase_seg1;/* from 1 to 8 */ -__u8 phase_seg2;/* from 1 to 8 */ -__u8 sjw:7 ;/* from 1 to 4 */ -__u8 sam:1 ;/* 1 - enable triple sampling */ -}; - -struct can_bittime_btr { -__u8 btr0; -__u8 btr1; -}; - -struct can_bittime { -enum can_bittimes type; -union { -struct can_bittime_std std; -struct can_bittime_btr btr; - }; -}; - -/* -* CAN mode -*/ -enum can_mode { -CAN_MODE_STOP =0 , -CAN_MODE_START , -CAN_MODE_SLEEP -}; - -/* -* CAN controller mode -*/ -#define CAN_CTRLMODE_LOOPBACK 0x1 -#define CAN_CTRLMODE_LISTENONLY 0x2 - -/* -* CAN operational and error states -*/ -enum can_state { -CAN_STATE_ACTIVE =0 , -CAN_STATE_BUS_WARNING , -CAN_STATE_BUS_PASSIVE , -CAN_STATE_BUS_OFF , -CAN_STATE_STOPPED , -CAN_STATE_SLEEPING -}; - -/* -* CAN device statistics -*/ -struct can_device_stats { -int error_warning; -int data_overrun; -int wakeup; -int bus_error; -int error_passive; -int arbitration_lost; -int restarts; -int bus_error_at_init; -}; - -#endif /* CAN_IOCTL_H */
Oliver Hartkopp
maintainerRe: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
In reply to Yegor YefremovQuoted 9 lines · Yegor Yefremov
Quoted 4 lines · Uwe Kleine-König
The source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
There is need for this daemon. I'm using it in production tests.
Oh, yes. There was so much effort put into this slcand. We should better look how we might fix the license issues.
The original thread where slcand comes from was here:
http://socket-can.996257.n3.nabble.com/slcan-attach-and-resetting-line-disciplines-td1396.html
And here was the original commit to the SVN:
http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/slcand.c?rev=973&peg=973
The code has been removed from Wikipedia in October 2009
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=321383226&oldid=320644717
(not a textbook. these examples are completely opaque to non-experts)
And it has been added here (wihout any license information):
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=273831207&oldid=273016660
I assume we need to rewrite the daemon-specific code, e.g. use the other reference in Wikipedia:
http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize
which is public domain - and I assume this to be the original source ...
Oh well :-(
Regards,
Oliver
Re: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
Quoted 30 lines · Oliver Hartkopp
Quoted 9 lines · Yegor Yefremov
Quoted 4 lines · Uwe Kleine-König
The source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
There is need for this daemon. I'm using it in production tests.
Oh, yes. There was so much effort put into this slcand. We should better look how we might fix the license issues.
The original thread where slcand comes from was here:
http://socket-can.996257.n3.nabble.com/slcan-attach-and-resetting-line-disciplines-td1396.html
And here was the original commit to the SVN:
http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/slcand.c?rev=973&peg=973The code has been removed from Wikipedia in October 2009
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=321383226&oldid=320644717
(not a textbook. these examples are completely opaque to non-experts)And it has been added here (wihout any license information):
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=273831207&oldid=273016660
Quoted 6 lines
I assume we need to rewrite the daemon-specific code, e.g. use the other reference in Wikipedia:
http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize
which is public domain - and I assume this to be the original source ...
Would this call do the job: http://man7.org/linux/man-pages/man3/daemon.3.html?
Yegor
Oliver Hartkopp
maintainerRe: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
Quoted 32 lines · Yegor Yefremov
Quoted 30 lines · Oliver Hartkopp
Quoted 9 lines · Yegor Yefremov
Quoted 4 lines · Uwe Kleine-König
The source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
There is need for this daemon. I'm using it in production tests.
Oh, yes. There was so much effort put into this slcand. We should better look how we might fix the license issues.
The original thread where slcand comes from was here:
http://socket-can.996257.n3.nabble.com/slcan-attach-and-resetting-line-disciplines-td1396.html
And here was the original commit to the SVN:
http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/slcand.c?rev=973&peg=973The code has been removed from Wikipedia in October 2009
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=321383226&oldid=320644717
(not a textbook. these examples are completely opaque to non-experts)And it has been added here (wihout any license information):
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=273831207&oldid=273016660
Quoted 8 lines
Quoted 6 lines
I assume we need to rewrite the daemon-specific code, e.g. use the other reference in Wikipedia:
http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize
which is public domain - and I assume this to be the original source ...
Would this call do the job: http://man7.org/linux/man-pages/man3/daemon.3.html?
Yes, I think so.
Here's a uClibc code for daemon()
https://github.com/hwoarang/uClibc/blob/master-metag/libc/unistd/daemon.c
As we do not need any 'specialties' for slcand (e.g. file i/o, logging, etc) this could shorten the slcand a lot.
There are also some examples out there that could be adopted without getting into a licensing issue again:
https://www.google.de/#q=linux+daemon+unistd
Regards,
Oliver
PATCH 1/1 can: add explicit copyrights to can userspace header
In reply to Oliver HartkoppThis is in the spirit of commit 2485602f1af2 (can: add explicit copyrights to can headers). It seems I have missed can.h back then.
---
Hello,
Quoted 11 lines · Oliver Hartkopp
Btw.
-
include/socketcan/can.h
-include/socketcan/can/isotp.hare both missing in this process.
Unfortunately we missed
linux/include/uapi/linux/can.hin commit2485602f1af2(can: add explicit copyrights to can headers).Would you like to pick this update of your original commit too?
yeah, here it comes.
isotp.h isn't a kernel header, so it needs only an update in can-utils alone.
Best regards
Uwe
include/uapi/linux/can.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
include/uapi/linux/can.h +32 -0
@@ -8,6 +8,38 @@* Copyright (c) 2002-2007 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_H
Signature · 1 line
1.8.5.2
Re: [PATCH] can: add explicit copyrights to can userspace header
Quoted 15 lines · Uwe Kleine-König
This is in the spirit of commit
2485602f1af2(can: add explicit copyrights to can headers). It seems I have missedcan.hback then.Signed-off-by Uwe Kleine-König <[email protected]>---
Hello,Quoted 7 lines · Oliver Hartkopp
Btw.
-
include/socketcan/can.h
-include/socketcan/can/isotp.hare both missing in this process.
Quoted 8 lines
Quoted 4 lines
Unfortunately we missed
linux/include/uapi/linux/can.hin commit2485602f1af2(can: add explicit copyrights to can headers).Would you like to pick this update of your original commit too?
yeah, here it comes.
isotp.hisn't a kernel header, so it needs only an update in can-utils alone.
Correct.
Tnx Uwe!
Quoted 51 lines
Best regards
Uweinclude/uapi/linux/can.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)include/uapi/linux/can.h +32
-0@@ -8,6 +8,38 @@* Copyright (c) 2002-2007 Volkswagen Group Electronic Research * All rights reserved. * +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. */ #ifndef CAN_H
Re: [PATCH can-utils 1/3] Update license information for some header files
In reply to Oliver HartkoppHello,
Quoted 15 lines · Oliver Hartkopp
Quoted 14 lines · Uwe Kleine-König
This corresponds to Linux commits
2485602f1af2(can: add explicit copyrights to can headers)1c2da13c21a1(can: add explicit copyrights to can's netlink header)
---
Hello,I would have expected to just need to do something like:
cd $path_to_canutils
rm -rinclude/socketcan/can
cd $path_to_linux
git archive --format=tar --prefix=socketcan/can/ v3.13-rc7:include/uapi/linux/can | tar xC $path_to_canutils/include git cat-file blob v3.13-rc7:include/uapi/linux/can.h >$path_to_canutils/include/socketcan/can.h
Quoted 4 lines
Quoted 4 lines
to sync the header files. I didn't test but some changes introduced by the above sequence seem to be uncompilable so I choosed to only cherry-pick the two Linux commits. IMHO this is a bug (in Linux or can-utils or maybe both).
That is actually easy to resolve. Please don't pick up this patch, I will send a better one shortly.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
In reply to Oliver HartkoppQuoted 49 lines · Oliver Hartkopp
Quoted 32 lines · Yegor Yefremov
Quoted 30 lines · Oliver Hartkopp
Quoted 9 lines · Yegor Yefremov
Quoted 4 lines · Uwe Kleine-König
The source file specifies slcand to be licensed under both GPL-2+ and GFDL. These two licenses are incompatible which makes this file undistributable. The clean way to fix this is to remove the file and reimplement its functionality under a valid license when need arises.
There is need for this daemon. I'm using it in production tests.
Oh, yes. There was so much effort put into this slcand. We should better look how we might fix the license issues.
The original thread where slcand comes from was here:
http://socket-can.996257.n3.nabble.com/slcan-attach-and-resetting-line-disciplines-td1396.html
And here was the original commit to the SVN:
http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/slcand.c?rev=973&peg=973The code has been removed from Wikipedia in October 2009
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=321383226&oldid=320644717
(not a textbook. these examples are completely opaque to non-experts)And it has been added here (wihout any license information):
http://en.wikipedia.org/w/index.php?title=Daemon_%28computing%29&diff=273831207&oldid=273016660Quoted 8 lines
Quoted 6 lines
I assume we need to rewrite the daemon-specific code, e.g. use the other reference in Wikipedia:
http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize
which is public domain - and I assume this to be the original source ...
Would this call do the job: http://man7.org/linux/man-pages/man3/daemon.3.html?
Yes, I think so.
Here's a uClibc code for
daemon()
https://github.com/hwoarang/uClibc/blob/master-metag/libc/unistd/daemon.c
Quoted 6 lines
As we do not need any 'specialties' for slcand (e.g. file i/o, logging, etc) this could shorten the slcand a lot.
There are also some examples out there that could be adopted without getting into a licensing issue again:
https://www.google.de/#q=linux+daemon+unistd
Would it be sufficient to submit a patch, that reimplements daemonize() and fixes license? Instead of removing the file and readding it?
Yegor
Oliver Hartkopp
maintainerRe: [PATCH can-utils 3/3] slcand: remove program as it is undistributable
Quoted 4 lines · Yegor Yefremov
Quoted 4 lines
Quoted 1 line
Would this call do the job: http://man7.org/linux/man-pages/man3/daemon.3.html?
Yes, I think so.
(..)
Quoted 5 lines
Would it be sufficient to submit a patch, that reimplements
daemonize()and fixes license? Instead of removing the file and readding it?
Yes. Fixing this with a patch should be appropriate.
There's so many slcan specific code in slcand (of course) that pointing at this special issue is the right thing to do IMO.
Regards,
Oliver
v2 cover License cleanup
In reply to Uwe Kleine-KönigThis is v2 of my effort to clean up the license stuff of can-utils to make it fit for packaging for Debian.
Changes since (implicit) v1, Message-Id:
[email protected]:
- drop patch "slcand: remove program as it is undistributable". I hope that Yegor and Oliver are resolving the issue I fixed by dropping the program.
- new patch that adds license information to isotp.h
- amend the kernel header sync with a cleanup to only have kernel headers below include/linux.
Best regards
Uwe
Uwe Kleine-König (3):
headers: use include/linux only for Linux kernel headers ioctl.h: drop unused header
isotp.h: add explicit license information
GNUmakefile.am | 14 +-- include/linux/can.h | 195 +++++++++++++++++++++++++++++++++++++- include/linux/can/bcm.h | 99 ++++++++++++++++++- include/linux/can/core.h | 1 - include/linux/can/dev.h | 1 - include/linux/can/error.h | 124 +++++++++++++++++++++++- include/linux/can/gw.h | 204 +++++++++++++++++++++++++++++++++++++++- include/linux/can/isotp.h | 1 - include/linux/can/netlink.h | 131 +++++++++++++++++++++++++- include/linux/can/raw.h | 63 ++++++++++++- include/socketcan/can.h | 167 -------------------------------- include/socketcan/can/bcm.h | 66 ------------- include/socketcan/can/error.h | 91 ------------------ include/socketcan/can/gw.h | 171 --------------------------------- include/socketcan/can/ioctl.h | 99 ------------------- include/socketcan/can/isotp.h | 110 ---------------------- include/socketcan/can/netlink.h | 122 ------------------------ include/socketcan/can/raw.h | 30 ------ isotp.h | 140 +++++++++++++++++++++++++++ isotprecv.c | 2 +- isotpsend.c | 2 +- isotpserver.c | 2 +- isotpsniffer.c | 2 +- isotptun.c | 2 +- 24 files changed, 957 insertions(+), 882 deletions(-) delete mode 100644 include/linux/can/core.h delete mode 100644 include/linux/can/dev.h delete mode 100644 include/linux/can/isotp.h delete mode 100644 include/socketcan/can.h delete mode 100644 include/socketcan/can/bcm.h delete mode 100644 include/socketcan/can/error.h delete mode 100644 include/socketcan/can/gw.h delete mode 100644 include/socketcan/can/ioctl.h delete mode 100644 include/socketcan/can/isotp.h delete mode 100644 include/socketcan/can/netlink.h delete mode 100644 include/socketcan/can/raw.h create mode 100644 isotp.h
Signature · 1 line
1.8.5.2
PATCH v2 1/3 headers: use include/linux only for Linux kernel headers
Put headers from the Linux kernel (and only these) under include/linux. Move the only remaining header into the project root and fix all users.
This cleanup makes syncing the headers from Linux easier:
cd $path_to_linux_repo make headers_install rsync -a --delete usr/include/linux/can* $path_to_can-utils/include/linux
This also syncs the Linux headers from v3.13-rc7 + commit "can: add explicit copyrights to can userspace header" (which isn't applied yet); the effective changes are:
- add license to can.h, can/bcm.h, can/error.h, can/gw.h, can/netlink.h and can/raw.h
- path adaptions: s;socketcan;linux; for include files
- add #include <linux/version.h> (reason?)
- use __kernel_sa_family_t instead of sa_family_t which requires <linux/socket.h from Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) typedef unsigned short __kernel_sa_family_t; #endif (Note, the comment in the old include/socketcan/can.h that 6602a4baf4d1 (net: Make userland include of netlink.h more sane.) was introduced in Linux 3.2 is wrong, it hit mainline for 3.1-rc2.) - fix a small difference in a comment in can/gw.h introduced between ad7f44095ac3 (cangw: add an option for the per rule limitation of frame hops) in can-utils and 391ac1282dd7 (can: gw: add a per rule limitation of frame hops) in the Linux kernel. - remove two unused header files that #included non-existing headers. --- GNUmakefile.am | 13 +-- include/linux/can.h | 195 +++++++++++++++++++++++++++++++++++++- include/linux/can/bcm.h | 99 ++++++++++++++++++- include/linux/can/core.h | 1 - include/linux/can/dev.h | 1 - include/linux/can/error.h | 124 +++++++++++++++++++++++- include/linux/can/gw.h | 204 +++++++++++++++++++++++++++++++++++++++- include/linux/can/isotp.h | 1 - include/linux/can/netlink.h | 131 +++++++++++++++++++++++++- include/linux/can/raw.h | 63 ++++++++++++- include/socketcan/can.h | 167 -------------------------------- include/socketcan/can/bcm.h | 66 ------------- include/socketcan/can/error.h | 91 ------------------ include/socketcan/can/gw.h | 171 --------------------------------- include/socketcan/can/isotp.h | 110 ---------------------- include/socketcan/can/netlink.h | 122 ------------------------ include/socketcan/can/raw.h | 30 ------ isotp.h | 110 ++++++++++++++++++++++ isotprecv.c | 2 +- isotpsend.c | 2 +- isotpserver.c | 2 +- isotpsniffer.c | 2 +- isotptun.c | 2 +- 23 files changed, 927 insertions(+), 782 deletions(-) delete mode 100644 include/linux/can/core.h delete mode 100644 include/linux/can/dev.h delete mode 100644 include/linux/can/isotp.h delete mode 100644 include/socketcan/can.h delete mode 100644 include/socketcan/can/bcm.h delete mode 100644 include/socketcan/can/error.h delete mode 100644 include/socketcan/can/gw.h delete mode 100644 include/socketcan/can/isotp.h delete mode 100644 include/socketcan/can/netlink.h delete mode 100644 include/socketcan/can/raw.h create mode 100644 isotp.h
GNUmakefile.am +2 -11
@@ -8,25 +8,16 @@ LDADD = \ libcan.la noinst_HEADERS = \ + isotp.h \ lib.h \ terminal.h \ + include/linux/can.h \ include/linux/can/bcm.h \ - include/linux/can/core.h \ - include/linux/can/dev.h \ include/linux/can/error.h \ include/linux/can/gw.h \ - include/linux/can.h \ - include/linux/can/isotp.h \ include/linux/can/netlink.h \ include/linux/can/raw.h \ - include/socketcan/can/bcm.h \ - include/socketcan/can/error.h \ - include/socketcan/can/gw.h \ - include/socketcan/can.h \ include/socketcan/can/ioctl.h \ - include/socketcan/can/isotp.h \ - include/socketcan/can/netlink.h \ - include/socketcan/can/raw.h noinst_LTLIBRARIES = \
include/linux/can.h +194 -1
195 lines not on this page · raw message
include/linux/can/bcm.h +98 -1
99 lines not on this page · raw message
include/linux/can/core.h deleted +0 -1
@@ -1 +0,0 @@ -#include <socketcan/can/core.h>
include/linux/can/dev.h deleted +0 -1
@@ -1 +0,0 @@ -#include <socketcan/can/dev.h>
include/linux/can/error.h +123 -1
124 lines not on this page · raw message
include/linux/can/gw.h +203 -1
204 lines not on this page · raw message
include/linux/can/isotp.h deleted +0 -1
@@ -1 +0,0 @@ -#include <socketcan/can/isotp.h>
include/linux/can/netlink.h +130 -1
131 lines not on this page · raw message
include/linux/can/raw.h +62 -1
63 lines not on this page · raw message
include/socketcan/can.h deleted +0 -167
167 lines not on this page · raw message
include/socketcan/can/bcm.h deleted +0 -66
66 lines not on this page · raw message
include/socketcan/can/error.h deleted +0 -91
91 lines not on this page · raw message
include/socketcan/can/gw.h deleted +0 -171
171 lines not on this page · raw message
include/socketcan/can/isotp.h deleted +0 -110
110 lines not on this page · raw message
include/socketcan/can/netlink.h deleted +0 -122
122 lines not on this page · raw message
include/socketcan/can/raw.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* socketcan/can/raw.h -* -* Definitions for raw CAN sockets -* -* Authors: Oliver Hartkopp <[email protected]> -* Urs Thuermann <[email protected]> -* Copyright (c) 2002-2007 Volkswagen Group Electronic Research -* All rights reserved. -* -*/ - -#ifndef CAN_RAW_H -#define CAN_RAW_H - -#include <socketcan/can.h> - -#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) - -/* for socket options affecting the socket (not the global system) */ - -enum { -CAN_RAW_FILTER =1 ,/* set 0 .. n can_filter(s) */ -CAN_RAW_ERR_FILTER ,/* set filter for error frames */ -CAN_RAW_LOOPBACK ,/* local loopback (default:on) */ -CAN_RAW_RECV_OWN_MSGS ,/* receive my own msgs (default:off) */ -CAN_RAW_FD_FRAMES ,/* allow CAN FD frames (default:off) */ -}; - -#endif
isotp.h new file +110 -0
110 lines not on this page · raw message
isotprecv.c +1 -1
@@ -53,7 +53,7 @@#include <sys/ioctl.h> #include <linux/can.h> -#include <linux/can/isotp.h> +#include "isotp.h" #define NO_CAN_ID 0xFFFFFFFFU
isotpsend.c +1 -1
@@ -53,7 +53,7 @@#include <sys/ioctl.h> #include <linux/can.h> -#include <linux/can/isotp.h> +#include "isotp.h" #define NO_CAN_ID 0xFFFFFFFFU
isotpserver.c +1 -1
@@ -73,7 +73,7 @@#include <netinet/in.h> #include <linux/can.h> -#include <linux/can/isotp.h> +#include "isotp.h" #define NO_CAN_ID 0xFFFFFFFFU
isotpsniffer.c +1 -1
@@ -54,7 +54,7 @@#include <sys/ioctl.h> #include <linux/can.h> -#include <linux/can/isotp.h> +#include "isotp.h" #include "terminal.h" #define NO_CAN_ID 0xFFFFFFFFU
isotptun.c +1 -1
@@ -62,7 +62,7 @@#include <sys/ioctl.h> #include <linux/can.h> -#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> #define NO_CAN_ID 0xFFFFFFFFU
Signature · 1 line
1.8.5.2
PATCH v2 2/3 ioctl.h: drop unused header
In reply to Uwe Kleine-KönigThis header doesn't exist in the Linux tree and it's unused by can-utils, so drop it. As a side effect this fixes the last file not specifying any license and/or copyright information.
--- GNUmakefile.am | 1 - include/socketcan/can/ioctl.h | 99 ------------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 include/socketcan/can/ioctl.h
GNUmakefile.am +0 -1
@@ -17,7 +17,6 @@ noinst_HEADERS = \ include/linux/can/gw.h \ include/linux/can/netlink.h \ include/linux/can/raw.h \ - include/socketcan/can/ioctl.h \ noinst_LTLIBRARIES = \
include/socketcan/can/ioctl.h deleted +0 -99
99 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH v2 3/3 isotp.h: add explicit license information
In reply to Uwe Kleine-KönigIt seems this file was originally part of the Linux kernel as it was created by commit 77de10356fe0 (include: import kernel header files into tree) but I couldn't find it in the git history of the kernel. Anyhow the copyright suggests to use the license used by the other files created by Volkswagen.
--- isotp.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)
isotp.h +33 -3
@@ -3,14 +3,44 @@* * Definitions for isotp CAN sockets * -* $Id$ -* * Author: Oliver Hartkopp <[email protected]> * Copyright (c) 2008 Volkswagen Group Electronic Research * All rights reserved. * -* Send feedback to <[email protected]> +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Send feedback to <[email protected]> */ #ifndef CAN_ISOTP_H
Signature · 1 line
1.8.5.2
Oliver Hartkopp
maintainerRe: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
In reply to Uwe Kleine-KönigHello Uwe,
Quoted 4 lines · Uwe Kleine-König
- use
__kernel_sa_family_tinstead ofsa_family_twhich requires <linux/socket.hfrom Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:
This was exactly the idea to have a separate set of include files to make sure the 'newest and greatest' tools can be build even on 2.6.24 environments where there was no SocketCAN in mainline Linux.
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h>
should be avoided too.
Please only fix the copyright information in this patch.
The wrong 3.1 -> 3.2 comparison should be fixed in a separate patch too.
But reorder the includes in a way you suggest needs at least some more discussion (see requirements above).
Regards,
Oliver
Re: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Hello Oliver,
Quoted 10 lines · Oliver Hartkopp
Quoted 4 lines · Uwe Kleine-König
- use
__kernel_sa_family_tinstead ofsa_family_twhich requires <linux/socket.hfrom Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:This was exactly the idea to have a separate set of include files to make sure the 'newest and greatest' tools can be build even on 2.6.24 environments where there was no SocketCAN in mainline Linux.
Hmm, the newest and greatest tools are unusable if your kernel doesn't also include the newest and greatest SocketCAN stuff. And then it is easy to also have updated kernel headers, isn't it? Well, anyhow I just found a system here at pengutronix with old enough kernel headers, so I will do a fix.
Quoted 8 lines
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> should be avoided too.
Why?
Quoted 1 line
Please only fix the copyright information in this patch.
OK, will split the patch accordingly.
Quoted 4 lines
The wrong 3.1 -> 3.2 comparison should be fixed in a separate patch too.
But reorder the includes in a way you suggest needs at least some more discussion (see requirements above).
I'm not aware what needs discussion here (apart from the "build with old kernel headers" requirement maybe). I will prepare a new series and then we can discuss.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Oliver Hartkopp
maintainerRe: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Quoted 10 lines · Uwe Kleine-König
Hello Oliver,
Quoted 7 lines · Oliver Hartkopp
Quoted 4 lines · Uwe Kleine-König
- use
__kernel_sa_family_tinstead ofsa_family_twhich requires <linux/socket.hfrom Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:
Quoted 5 lines
Quoted 3 lines
This was exactly the idea to have a separate set of include files to make sure the 'newest and greatest' tools can be build even on 2.6.24 environments where there was no SocketCAN in mainline Linux.
Hmm, the newest and greatest tools are unusable if your kernel doesn't also include the newest and greatest SocketCAN stuff.
Features that are not available in the kernel come back with an error. But there's no reason not to have the latest can-utils with bug fixes and functional enhancements for older kernels, right?
Quoted 4 lines
And then it is
easy to also have updated kernel headers, isn't it? Well, anyhow I just found a system here at pengutronix with old enough kernel headers, so I will do a fix.
ok. tnx.
Quoted 10 lines
Quoted 9 lines
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> should be avoided too.
Why?
When isotp hits the kernel, there's no need to adapt all userland programs.
I don't think the current idea was that bad.
AFAIK the iproute2 package has a similar approach and contains always updated kernel headers to be able to build even on older systems.
Best regards,
Oliver
Re: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Hello Oliver,
Quoted 37 lines · Oliver Hartkopp
Quoted 10 lines · Uwe Kleine-König
Hello Oliver,
Quoted 7 lines · Oliver Hartkopp
Quoted 4 lines · Uwe Kleine-König
- use
__kernel_sa_family_tinstead ofsa_family_twhich requires <linux/socket.hfrom Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:Quoted 5 lines
Quoted 3 lines
This was exactly the idea to have a separate set of include files to make sure the 'newest and greatest' tools can be build even on 2.6.24 environments where there was no SocketCAN in mainline Linux.
Hmm, the newest and greatest tools are unusable if your kernel doesn't also include the newest and greatest SocketCAN stuff.
Features that are not available in the kernel come back with an error. But there's no reason not to have the latest can-utils with bug fixes and functional enhancements for older kernels, right?
Quoted 4 lines
And then it is
easy to also have updated kernel headers, isn't it? Well, anyhow I just found a system here at pengutronix with old enough kernel headers, so I will do a fix.ok. tnx.
Quoted 9 lines
Quoted 9 lines
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> should be avoided too.
Quoted 3 lines
Quoted 1 line
Why?
When isotp hits the kernel, there's no need to adapt all userland programs.
ah, didn't know that isotp targets the kernel. There is nothing in next yet. I wonder if it's sensible to put it into can-utils' copy of the kernel headers then. If you ask me keep isotp.h in / until it hits the kernel, then sync the headers and switch the programs explicitly. Only my 0.02 €.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Oliver Hartkopp
maintainerRe: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Quoted 40 lines · Uwe Kleine-König
Hello Oliver,
Quoted 37 lines · Oliver Hartkopp
Quoted 10 lines · Uwe Kleine-König
Hello Oliver,
Quoted 7 lines · Oliver Hartkopp
Quoted 4 lines · Uwe Kleine-König
- use
__kernel_sa_family_tinstead ofsa_family_twhich requires <linux/socket.hfrom Linux 3.1 or later. Unfortunately this makes can-utils FTBFS on e.g. Debian squeeze. If this is an issue this could be fixed by adding something like:Quoted 5 lines
Quoted 3 lines
This was exactly the idea to have a separate set of include files to make sure the 'newest and greatest' tools can be build even on 2.6.24 environments where there was no SocketCAN in mainline Linux.
Hmm, the newest and greatest tools are unusable if your kernel doesn't also include the newest and greatest SocketCAN stuff.
Features that are not available in the kernel come back with an error. But there's no reason not to have the latest can-utils with bug fixes and functional enhancements for older kernels, right?
Quoted 4 lines
And then it is
easy to also have updated kernel headers, isn't it? Well, anyhow I just found a system here at pengutronix with old enough kernel headers, so I will do a fix.ok. tnx.
Quoted 9 lines
Quoted 9 lines
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> should be avoided too.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Why?
When isotp hits the kernel, there's no need to adapt all userland programs.
ah, didn't know that isotp targets the kernel. There is nothing in next yet. I wonder if it's sensible to put it into can-utils' copy of the kernel headers then. If you ask me keep
isotp.hin / until it hits the kernel, then sync the headers and switch the programs explicitly. Only my 0.02 €.
What's the benefit of moving it to root and then moving it back to the includes?
Please let it stay in the current place.
Tnx,
Oliver
Re: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Hello Oliver,
Quoted 12 lines · Oliver Hartkopp
Quoted 11 lines · Uwe Kleine-König
Quoted 10 lines · Oliver Hartkopp
Quoted 9 lines · Uwe Kleine-König
Quoted 8 lines · Oliver Hartkopp
And e.g. this
isotptun.c line 66
Quoted 4 lines
#include <
linux/can.h>isotptun.c +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h> should be avoided too.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Why?
When isotp hits the kernel, there's no need to adapt all userland programs.
To be honest, it's not that hard to update all userland programs. I did it with:
perl -p -i -e 's,^#include <whatever/can/isotp.h>$,#include "isotp.h",' isotp*
(well, plus some reformatting, but meh).
Quoted 7 lines
Quoted 5 lines
ah, didn't know that isotp targets the kernel. There is nothing in next yet. I wonder if it's sensible to put it into can-utils' copy of the kernel headers then. If you ask me keep
isotp.hin / until it hits the kernel, then sync the headers and switch the programs explicitly. Only my 0.02 €.What's the benefit of moving it to root and then moving it back to the includes?
The benefit is that there is less chance for surprises. Updating the kernel header copy still has a manual component when there are files in can-utils that are not existing in the kernel. Also I like changes to be explicit. When isotp.h is now kept in can-utils/include/linux and later hits the kernel there is no explicit commit that marks the start of using the kernel header and changing the procedure how to sync kernel headers. YMMV
Quoted 1 line
Please let it stay in the current place.
To late for v3, only read your mail when I sent it out.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Oliver Hartkopp
maintainerRe: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Quoted 40 lines · Uwe Kleine-König
Hello Oliver,
Quoted 12 lines · Oliver Hartkopp
Quoted 11 lines · Uwe Kleine-König
Quoted 10 lines · Oliver Hartkopp
Quoted 9 lines · Uwe Kleine-König
Quoted 8 lines · Oliver Hartkopp
And e.g. this
Review
Quoted 4 lines
#include <
linux/can.h>(quoted diff) +1
-1-#include <linux/can/isotp.h> +#include "isotp.h" #include <linux/if_tun.h>should be avoided too.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Why?
When isotp hits the kernel, there's no need to adapt all userland programs.
To be honest, it's not that hard to update all userland programs. I did it with:
perl -p -i -e 's,^#include <whatever/can/isotp.h>$,#include "isotp.h",' isotp*(well, plus some reformatting, but meh).
Quoted 7 lines
Quoted 5 lines
ah, didn't know that isotp targets the kernel. There is nothing in next yet. I wonder if it's sensible to put it into can-utils' copy of the kernel headers then. If you ask me keep
isotp.hin / until it hits the kernel, then sync the headers and switch the programs explicitly. Only my 0.02 €.What's the benefit of moving it to root and then moving it back to the includes?
The benefit is that there is less chance for surprises. Updating the kernel header copy still has a manual component when there are files in can-utils that are not existing in the kernel. Also I like changes to be explicit. When
isotp.his now kept in can-utils/include/linux and later hits the kernel there is no explicit commit that marks the start of using the kernel header and changing the procedure how to sync kernel headers. YMMV
Quoted 3 lines
Quoted 1 line
Please let it stay in the current place.
To late for v3, only read your mail when I sent it out.
Sorry that I did not was faster.
But it's never too late for my NACK for the "[PATCH can-utils v3 2/5] Move isotp.h into the project root" :-)
To all the other stuff you may add my Acked-by: in the next attempt.
Btw. did you test the stuff on the 'old' system as you mentioned?
Regards,
Oliver
Re: [PATCH can-utils v2 1/3] headers: use include/linux only for Linux kernel headers
Hello Oliver,
Quoted 4 lines · Oliver Hartkopp
Quoted 3 lines
Quoted 1 line
Please let it stay in the current place.
To late for v3, only read your mail when I sent it out.
Quoted 8 lines
Sorry that I did not was faster.
But it's never too late for my NACK for the "[PATCH can-utils v3 2/5] Move
isotp.hinto the project root" :-)To all the other stuff you may add my Acked-by: in the next attempt.
Btw. did you test the stuff on the 'old' system as you mentioned?
No, but I didn't sync the kernel headers, so everything should still work. I will drop patch 2 as you insist and I don't care much. Then I can test on the old system.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
v4 cover License cleanup
In reply to Oliver HartkoppHello,
compared to v3 I dropped the patch to move isotp.h to the project root and did the necessary follow-up changes. Builds fine on a system that has installed kernel headers from 2.6.32.
Best regards
Uwe
Uwe Kleine-König (4):
Remove two unused header files
Move includes copied from the Linux kernel into include/linux ioctl.h: drop unused header
isotp.h: add explicit license information
GNUmakefile.am | 11 +-- include/linux/can.h | 168 ++++++++++++++++++++++++++++++++++++++- include/linux/can/bcm.h | 67 +++++++++++++++- include/linux/can/core.h | 1 - include/linux/can/dev.h | 1 - include/linux/can/error.h | 92 ++++++++++++++++++++- include/linux/can/gw.h | 172 +++++++++++++++++++++++++++++++++++++++- include/linux/can/netlink.h | 123 +++++++++++++++++++++++++++- include/linux/can/raw.h | 31 +++++++- include/socketcan/can.h | 167 -------------------------------------- include/socketcan/can/bcm.h | 66 --------------- include/socketcan/can/error.h | 91 --------------------- include/socketcan/can/gw.h | 171 --------------------------------------- include/socketcan/can/ioctl.h | 99 ----------------------- include/socketcan/can/isotp.h | 38 ++++++++- include/socketcan/can/netlink.h | 122 ---------------------------- include/socketcan/can/raw.h | 30 ------- 17 files changed, 682 insertions(+), 768 deletions(-) delete mode 100644 include/linux/can/core.h delete mode 100644 include/linux/can/dev.h delete mode 100644 include/socketcan/can.h delete mode 100644 include/socketcan/can/bcm.h delete mode 100644 include/socketcan/can/error.h delete mode 100644 include/socketcan/can/gw.h delete mode 100644 include/socketcan/can/ioctl.h delete mode 100644 include/socketcan/can/netlink.h delete mode 100644 include/socketcan/can/raw.h
Signature · 1 line
1.8.5.2
PATCH v4 1/4 Remove two unused header files
These seem to have never been used. They entered can-utils in commit 77de10356fe0 (include: import kernel header files into tree) and already back then only consisted in an #include of a non-existing file.
--- GNUmakefile.am | 2 -- include/linux/can/core.h | 1 - include/linux/can/dev.h | 1 - 3 files changed, 4 deletions(-) delete mode 100644 include/linux/can/core.h delete mode 100644 include/linux/can/dev.h
GNUmakefile.am +0 -2
@@ -11,8 +11,6 @@ noinst_HEADERS = \ lib.h \ terminal.h \ include/linux/can/bcm.h \ - include/linux/can/core.h \ - include/linux/can/dev.h \ include/linux/can/error.h \ include/linux/can/gw.h \ include/linux/can.h \
include/linux/can/core.h deleted +0 -1
@@ -1 +0,0 @@ -#include <socketcan/can/core.h>
include/linux/can/dev.h deleted +0 -1
@@ -1 +0,0 @@ -#include <socketcan/can/dev.h>
Signature · 1 line
1.8.5.2
PATCH v4 2/4 Move includes copied from the Linux kernel into include/linux
In reply to Uwe Kleine-KönigThis makes it possible to update the copies more easily, e.g.:
cd $path_to_linux_repo make headers_install rsync -a --delete --exclude .\* usr/include/linux/can* $path_to_can_utils/include/linux
Also fix the few users that made explicit use of the wrong location (linux/can/{bcm,gw,raw}.h and isotp.h).
--- GNUmakefile.am | 8 +- include/linux/can.h | 168 ++++++++++++++++++++++++++++++++++++++- include/linux/can/bcm.h | 67 +++++++++++++++- include/linux/can/error.h | 92 ++++++++++++++++++++- include/linux/can/gw.h | 172 +++++++++++++++++++++++++++++++++++++++- include/linux/can/netlink.h | 123 +++++++++++++++++++++++++++- include/linux/can/raw.h | 31 +++++++- include/socketcan/can.h | 167 -------------------------------------- include/socketcan/can/bcm.h | 66 --------------- include/socketcan/can/error.h | 91 --------------------- include/socketcan/can/gw.h | 171 --------------------------------------- include/socketcan/can/isotp.h | 2 +- include/socketcan/can/netlink.h | 122 ---------------------------- include/socketcan/can/raw.h | 30 ------- 14 files changed, 649 insertions(+), 661 deletions(-) delete mode 100644 include/socketcan/can.h delete mode 100644 include/socketcan/can/bcm.h delete mode 100644 include/socketcan/can/error.h delete mode 100644 include/socketcan/can/gw.h delete mode 100644 include/socketcan/can/netlink.h delete mode 100644 include/socketcan/can/raw.h
GNUmakefile.am +1 -7
@@ -10,21 +10,15 @@ LDADD = \ noinst_HEADERS = \ lib.h \ terminal.h \ + include/linux/can.h \ include/linux/can/bcm.h \ include/linux/can/error.h \ include/linux/can/gw.h \ - include/linux/can.h \ include/linux/can/isotp.h \ include/linux/can/netlink.h \ include/linux/can/raw.h \ - include/socketcan/can/bcm.h \ - include/socketcan/can/error.h \ - include/socketcan/can/gw.h \ - include/socketcan/can.h \ include/socketcan/can/ioctl.h \ include/socketcan/can/isotp.h \ - include/socketcan/can/netlink.h \ - include/socketcan/can/raw.h noinst_LTLIBRARIES = \
include/linux/can.h +167 -1
168 lines not on this page · raw message
include/linux/can/bcm.h +66 -1
67 lines not on this page · raw message
include/linux/can/error.h +91 -1
92 lines not on this page · raw message
include/linux/can/gw.h +171 -1
172 lines not on this page · raw message
include/linux/can/netlink.h +122 -1
123 lines not on this page · raw message
include/linux/can/raw.h +30 -1
@@ -1 +1,30 @@ -#include <socketcan/can/raw.h> +/* +* socketcan/can/raw.h +* +* Definitions for raw CAN sockets +* +* Authors: Oliver Hartkopp <[email protected]> +* Urs Thuermann <[email protected]> +* Copyright (c) 2002-2007 Volkswagen Group Electronic Research +* All rights reserved. +* +*/ + +#ifndef CAN_RAW_H +#define CAN_RAW_H + +#include <linux/can.h> + +#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) + +/* for socket options affecting the socket (not the global system) */ + +enum { +CAN_RAW_FILTER =1 ,/* set 0 .. n can_filter(s) */ +CAN_RAW_ERR_FILTER ,/* set filter for error frames */ +CAN_RAW_LOOPBACK ,/* local loopback (default:on) */ +CAN_RAW_RECV_OWN_MSGS ,/* receive my own msgs (default:off) */ +CAN_RAW_FD_FRAMES ,/* allow CAN FD frames (default:off) */ +}; + +#endif
include/socketcan/can.h deleted +0 -167
167 lines not on this page · raw message
include/socketcan/can/bcm.h deleted +0 -66
66 lines not on this page · raw message
include/socketcan/can/error.h deleted +0 -91
91 lines not on this page · raw message
include/socketcan/can/gw.h deleted +0 -171
171 lines not on this page · raw message
include/socketcan/can/isotp.h +1 -1
@@ -16,7 +16,7 @@#ifndef CAN_ISOTP_H #define CAN_ISOTP_H -#include <socketcan/can.h> +#include <linux/can.h> #define SOL_CAN_ISOTP (SOL_CAN_BASE + CAN_ISOTP)
include/socketcan/can/netlink.h deleted +0 -122
122 lines not on this page · raw message
include/socketcan/can/raw.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* socketcan/can/raw.h -* -* Definitions for raw CAN sockets -* -* Authors: Oliver Hartkopp <[email protected]> -* Urs Thuermann <[email protected]> -* Copyright (c) 2002-2007 Volkswagen Group Electronic Research -* All rights reserved. -* -*/ - -#ifndef CAN_RAW_H -#define CAN_RAW_H - -#include <socketcan/can.h> - -#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) - -/* for socket options affecting the socket (not the global system) */ - -enum { -CAN_RAW_FILTER =1 ,/* set 0 .. n can_filter(s) */ -CAN_RAW_ERR_FILTER ,/* set filter for error frames */ -CAN_RAW_LOOPBACK ,/* local loopback (default:on) */ -CAN_RAW_RECV_OWN_MSGS ,/* receive my own msgs (default:off) */ -CAN_RAW_FD_FRAMES ,/* allow CAN FD frames (default:off) */ -}; - -#endif
Signature · 1 line
1.8.5.2
PATCH v4 3/4 ioctl.h: drop unused header
In reply to Uwe Kleine-KönigThis header doesn't exist in the Linux tree and it's unused by can-utils, so drop it. As a side effect this fixes the last file not specifying any license and/or copyright information.
--- GNUmakefile.am | 1 - include/socketcan/can/ioctl.h | 99 ------------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 include/socketcan/can/ioctl.h
GNUmakefile.am +0 -1
@@ -17,7 +17,6 @@ noinst_HEADERS = \ include/linux/can/isotp.h \ include/linux/can/netlink.h \ include/linux/can/raw.h \ - include/socketcan/can/ioctl.h \ include/socketcan/can/isotp.h \
include/socketcan/can/ioctl.h deleted +0 -99
99 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH v4 4/4 isotp.h: add explicit license information
In reply to Uwe Kleine-KönigIt seems this file was originally part of the Linux kernel as it was created by commit 77de10356fe0 (include: import kernel header files into tree) but I couldn't find it in the git history of the kernel. Anyhow the copyright suggests to use the license used by the other files created by Volkswagen.
--- include/socketcan/can/isotp.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)
include/socketcan/can/isotp.h +33 -3
@@ -3,14 +3,44 @@* * Definitions for isotp CAN sockets * -* $Id$ -* * Author: Oliver Hartkopp <[email protected]> * Copyright (c) 2008 Volkswagen Group Electronic Research * All rights reserved. * -* Send feedback to <[email protected]> +* Redistribution and use in source and binary forms, with or without +* 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 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. +* 3. Neither the name of Volkswagen nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. +* +* 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, 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. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +* DAMAGE. +* +* Send feedback to <[email protected]> */ #ifndef CAN_ISOTP_H
Signature · 1 line
1.8.5.2
Oliver Hartkopp
maintainerRe: [PATCH can-utils v4 4/4] isotp.h: add explicit license information
Hi Uwe,
Quoted 3 lines · Uwe Kleine-König
It seems this file was originally part of the Linux kernel as it was created by commit
77de10356fe0(include: import kernel header files into tree) but I couldn't find it in the git history of the kernel.
This comes from the original development process in the BerliOS SVN. The fact that these files are kernel header files does not necessarily mean they have been imported from the kernel source tree :-)
Quoted 2 lines
Anyhow the copyright
suggests to use the license used by the other files created by Volkswagen.
Indeed.
include/socketcan/can/isotp.h
Quoted 7 lines
Acked-by Oliver Hartkopp <[email protected]>--- include/socketcan/can/isotp.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)include/socketcan/can/isotp.h +0
-0
Is this the only file in include/socketcan now?
I thought you wanted to get rid of this construct and move everything over to the include/linux directory to finally remove include/socketecan ??
Regards,
Oliver
Re: [PATCH can-utils v4 4/4] isotp.h: add explicit license information
Hey Oliver,
Quoted 8 lines · Oliver Hartkopp
Quoted 3 lines · Uwe Kleine-König
It seems this file was originally part of the Linux kernel as it was created by commit
77de10356fe0(include: import kernel header files into tree) but I couldn't find it in the git history of the kernel.This comes from the original development process in the BerliOS SVN. The fact that these files are kernel header files does not necessarily mean they have been imported from the kernel source tree :-)
Strange concept. Either you need some additional Userspace API in the kernel for your isotp programs or you don't. In the first case there must be a header in the kernel providing that API (if not in mainline that at least in some can tree). In the latter case where everything works with the kernel as is, you shouldn't declare something to be a kernel header that doesn't need to.
Quoted 11 lines
Quoted 2 lines
Anyhow the copyright
suggests to use the license used by the other files created by Volkswagen.Indeed.
Quoted 6 lines
Acked-by Oliver Hartkopp <[email protected]>--- include/socketcan/can/isotp.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)
Quoted 5 lines
include/socketcan/can/isotp.h
Quoted 1 line
include/socketcan/can/isotp.h +0
-0Is this the only file in
include/socketcannow?
I thought you wanted to get rid of this construct and move everything over to theinclude/linuxdirectory to finally removeinclude/socketecan??
You said:
Please let it stay in the current place.
So did I. :-)
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Oliver Hartkopp
maintainerRe: [PATCH can-utils v4 4/4] isotp.h: add explicit license information
Quoted 7 lines · Uwe Kleine-König
Quoted 3 lines
Is this the only file in
include/socketcannow?
I thought you wanted to get rid of this construct and move everything over to theinclude/linuxdirectory to finally removeinclude/socketecan??You said:
Please let it stay in the current place.So did I. :-)
Sigh. You are kidding me.
Please make your choice:
[ ] Please let it stay in the current place with all the other includes [ ] Do not put it to a different place away from the other includes
We obviously need to work on our communication :-(
As you moved *all* the includes to a new place I was not able to imagine that you would even think about leaving *only* isotp.h in include/socketcan.
Regards,
Oliver
Marc Kleine-Budde
maintainerRe: [PATCH] can: add explicit copyrights to can userspace header
In reply to Uwe Kleine-KönigQuoted 4 lines · Uwe Kleine-König
This is in the spirit of commit
2485602f1af2(can: add explicit copyrights to can headers). It seems I have missedcan.hback then.Signed-off-by Uwe Kleine-König <[email protected]>
Tnx, applied to can-next.
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Re: [PATCH can-utils v4 4/4] isotp.h: add explicit license information
In reply to Uwe Kleine-KönigHey Oliver,
Quoted 9 lines · Uwe Kleine-König
Quoted 8 lines · Oliver Hartkopp
Quoted 3 lines · Uwe Kleine-König
It seems this file was originally part of the Linux kernel as it was created by commit
77de10356fe0(include: import kernel header files into tree) but I couldn't find it in the git history of the kernel.This comes from the original development process in the BerliOS SVN. The fact that these files are kernel header files does not necessarily mean they have been imported from the kernel source tree :-)
Quoted 6 lines
Strange concept. Either you need some additional Userspace API in the kernel for your isotp programs or you don't. In the first case there must be a header in the kernel providing that API (if not in mainline that at least in some can tree). In the latter case where everything works with the kernel as is, you shouldn't declare something to be a kernel header that doesn't need to.
Looking a bit into the isotp*.c files it seems the isotp header falls into the first category, i.e. you need kernel support to use these. Is that correct? Is there an up-to-date kernel tree somewhere that holds the necessary patches? If yes, I suggest to document that tree somewhere in can-utils to be the source for the kernel headers.
Quoted 16 lines
Quoted 11 lines
Quoted 2 lines
Anyhow the copyright
suggests to use the license used by the other files created by Volkswagen.Indeed.
Quoted 6 lines
Acked-by Oliver Hartkopp <[email protected]>--- include/socketcan/can/isotp.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)Quoted 5 lines
include/socketcan/can/isotp.h
Quoted 1 line
include/socketcan/can/isotp.h +0
-0Is this the only file in
include/socketcannow?
I thought you wanted to get rid of this construct and move everything over to theinclude/linuxdirectory to finally removeinclude/socketecan??
Quoted 4 lines
You said:
Please let it stay in the current place.So did I. :-)
I didn't intend to get on your nerves here. When I send out the series I noticed that isotp.h stayed alone there just when patches 1-3 were already send out and I was too tired to resolve that. I admit being guilty not to address that when I was back at my computer the next day. Anyhow, what I wrote above still applies, and before that isn't resolved it feels wrong (at least to me) to include isotp.h in the move.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |
Marc Kleine-Budde
maintainerRe: [PATCH can-utils v4 4/4] isotp.h: add explicit license information
Quoted 16 lines · Uwe Kleine-König
Quoted 9 lines · Oliver Hartkopp
Quoted 8 lines · Uwe Kleine-König
Quoted 3 lines
It seems this file was originally part of the Linux kernel as it was created by commit
77de10356fe0(include: import kernel header files into tree) but I couldn't find it in the git history of the kernel.This comes from the original development process in the BerliOS SVN. The fact that these files are kernel header files does not necessarily mean they have been imported from the kernel source tree :-)
Quoted 6 lines
Strange concept. Either you need some additional Userspace API in the kernel for your isotp programs or you don't. In the first case there must be a header in the kernel providing that API (if not in mainline that at least in some can tree). In the latter case where everything works with the kernel as is, you shouldn't declare something to be a kernel header that doesn't need to.
Quoted 5 lines
Looking a bit into the isotp*.c files it seems the isotp header falls into the first category, i.e. you need kernel support to use these. Is that correct? Is there an up-to-date kernel tree somewhere that holds the necessary patches? If yes, I suggest to document that tree somewhere in can-utils to be the source for the kernel headers.
Isotp is an external Kernel module.
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |