Skip to content

Commit

Permalink
canutils: migrate to SPDX identifier
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jerpelea committed Dec 18, 2024
1 parent 87d7726 commit 1d37300
Show file tree
Hide file tree
Showing 47 changed files with 116 additions and 50 deletions.
2 changes: 2 additions & 0 deletions canutils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/candump/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion canutils/candump/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/candump/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
23 changes: 17 additions & 6 deletions canutils/candump/candump.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -40,7 +39,11 @@
*
* Send feedback to <[email protected]>
*
*/
****************************************************************************/

/****************************************************************************
* Included Files
****************************************************************************/

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -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
Expand Down Expand Up @@ -98,6 +105,10 @@
const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};

Check failure on line 105 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Multiple data definitions

Check failure on line 105 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Left bracket not on separate line

Check failure on line 105 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Right bracket not on separate line

Check failure on line 105 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Blank line precedes right brace at line
const char col_off [] = ATTRESET;

/****************************************************************************
* Public Functions
****************************************************************************/

static __u32 dropcnt[MAXSOCK];
static __u32 last_dropcnt[MAXSOCK];
static char devname[MAXIFNAMES][IFNAMSIZ+1];

Check failure on line 114 in canutils/candump/candump.c

View workflow job for this annotation

GitHub Actions / check

Operator/assignment must be preceded with whitespace
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_getbaud.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_getloopback.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_getsilent.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_setbaud.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_setloopback.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/canlib/canlib_setsilent.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/cansend/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion canutils/cansend/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/cansend/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 2 additions & 24 deletions canutils/cansend/cansend.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/lely-canopen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/lely-canopen/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/lely-canopen/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libcanutils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libcanutils/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libcanutils/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 4 additions & 6 deletions canutils/libcanutils/lib.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -40,7 +38,7 @@
*
* Send feedback to <[email protected]>
*
*/
****************************************************************************/

#include <stdio.h>

Check warning on line 43 in canutils/libcanutils/lib.c

View workflow job for this annotation

GitHub Actions / check

#include outside of 'Included Files' section
#include <string.h>

Check warning on line 44 in canutils/libcanutils/lib.c

View workflow job for this annotation

GitHub Actions / check

#include outside of 'Included Files' section
Expand Down
10 changes: 4 additions & 6 deletions canutils/libcanutils/lib.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -40,7 +38,7 @@
*
* Send feedback to <[email protected]>
*
*/
****************************************************************************/

#ifndef CAN_UTILS_LIB_H
#define CAN_UTILS_LIB_H
Expand Down
10 changes: 5 additions & 5 deletions canutils/libcanutils/terminal.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -38,7 +38,7 @@
*
* Send feedback to <[email protected]>
*
*/
****************************************************************************/

#ifndef TERMINAL_H
#define TERMINAL_H
Expand Down
2 changes: 2 additions & 0 deletions canutils/libdronecan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libdronecan/Make.defs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libdronecan/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions canutils/libobd2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit 1d37300

Please sign in to comment.