canutils: migrate to SPDX identifier

Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2024-12-18 08:04:11 +01:00 committed by Xiang Xiao
parent e41ef49995
commit 440d69a310
47 changed files with 116 additions and 50 deletions

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/candump/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,7 @@
############################################################################
# apps/canutils/candump/Make.defs
# Adds selected applications to apps/ build
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/candump/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,9 +1,8 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
* candump.c
/****************************************************************************
* apps/canutils/candump/candump.c
*
* Copyright (c) 2002-2009 Volkswagen Group Electronic Research
* All rights reserved.
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
* SPDX-FileCopyrightText: 2002-2007 Volkswagen Group Electronic Research
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -40,7 +39,11 @@
*
* Send feedback to <linux-can@vger.kernel.org>
*
*/
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
@ -66,6 +69,10 @@
#include "terminal.h"
#include "lib.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* for hardware timestamps - since Linux 2.6.30 */
#ifndef SO_TIMESTAMPING
#define SO_TIMESTAMPING 37
@ -98,6 +105,10 @@
const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
const char col_off [] = ATTRESET;
/****************************************************************************
* Public Functions
****************************************************************************/
static __u32 dropcnt[MAXSOCK];
static __u32 last_dropcnt[MAXSOCK];
static char devname[MAXIFNAMES][IFNAMSIZ+1];

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/canlib/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/canlib/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/canlib/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_getbaud.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_getloopback.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_getsilent.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_setbaud.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_setloopback.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/canlib/canlib_setsilent.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/cansend/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,7 @@
############################################################################
# apps/canutils/cansend/Make.defs
# Adds selected applications to apps/ build
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/cansend/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,30 +1,8 @@
/****************************************************************************
* apps/canutils/cansend/cansend.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) *
*
* cansend.c - send CAN-frames via CAN_RAW sockets
*
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
* SPDX-FileCopyrightText: 2002-2007 Volkswagen Group Electronic Research
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/lely-canopen/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/lely-canopen/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/lely-canopen/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/libcanutils/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libcanutils/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libcanutils/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,9 +1,7 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
* lib.c - library for command line tools
/****************************************************************************
*
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
* SPDX-FileCopyrightText: 2002-2007 Volkswagen Group Electronic Research
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -40,7 +38,7 @@
*
* Send feedback to <linux-can@vger.kernel.org>
*
*/
****************************************************************************/
#include <stdio.h>
#include <string.h>

View file

@ -1,9 +1,7 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
* lib.h - library include for command line tools
/****************************************************************************
*
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
* SPDX-FileCopyrightText: 2002-2007 Volkswagen Group Electronic Research
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -40,7 +38,7 @@
*
* Send feedback to <linux-can@vger.kernel.org>
*
*/
****************************************************************************/
#ifndef CAN_UTILS_LIB_H
#define CAN_UTILS_LIB_H

View file

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
* All rights reserved.
/****************************************************************************
*
* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
* SPDX-FileCopyrightText: 2002-2007 Volkswagen Group Electronic Research
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -38,7 +38,7 @@
*
* Send feedback to <linux-can@vger.kernel.org>
*
*/
****************************************************************************/
#ifndef TERMINAL_H
#define TERMINAL_H

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/libdronecan/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libdronecan/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libdronecan/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/libobd2/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libobd2/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libobd2/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/libobd2/obd2.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/libobd2/obd_decodepid.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/libobd2/obd_sendrequest.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/libobd2/obd_waitresponse.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/libopencyphal/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libopencyphal/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/libopencyphal/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
# ##############################################################################
# apps/canutils/slcan/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this

View file

@ -1,6 +1,7 @@
############################################################################
# apps/canutils/slcan/Make.defs
# Adds selected applications to apps/ build
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with

View file

@ -1,6 +1,8 @@
############################################################################
# apps/canutils/slcan/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/slcan/slcan.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The

View file

@ -1,6 +1,8 @@
/****************************************************************************
* apps/canutils/slcan/slcan.h
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The