Thomas Haller
977ea352a0
all: update deprecated SPDX license identifiers
...
These SPDX license identifiers are deprecated ([1]). Update them.
[1] https://spdx.org/licenses/
sed \
-e '1 s%^/\* SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+ \*/$%/* SPDX-License-Identifier: \1-or-later */%' \
-e '1,2 s%^\(--\|#\|//\) SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+$%\1 SPDX-License-Identifier: \2-or-later%' \
-i \
$(git grep -l SPDX-License-Identifier -- \
':(exclude)shared/c-*/' \
':(exclude)shared/n-*/' \
':(exclude)shared/systemd/src' \
':(exclude)src/systemd/src')
2021-01-05 09:46:21 +01:00
Thomas Haller
88071abb43
all: unify comment style for SPDX-License-Identifier tag
...
Our coding style recommends C style comments (/* */) instead of C++
(//). Also, systemd (which we partly fork) uses C style comments for
the SPDX-License-Identifier.
Unify the style.
$ sed -i '1 s#// SPDX-License-Identifier: \([^ ]\+\)$#/* SPDX-License-Identifier: \1 */#' -- $(git ls-files -- '*.[hc]' '*.[hc]pp')
2020-09-29 16:50:53 +02:00
Antonio Cardace
328fb90f3e
all: reformat all with new clang-format style
...
Run:
./contrib/scripts/nm-code-format.sh -i
./contrib/scripts/nm-code-format.sh -i
Yes, it needs to run twice because the first run doesn't yet produce the
final result.
Signed-off-by: Antonio Cardace <acardace@redhat.com >
2020-09-28 16:07:51 +02:00
Thomas Haller
3b69f02164
all: unify format of our Copyright source code comments
...
```bash
readarray -d '' FILES < <(
git ls-files -z \
':(exclude)po' \
':(exclude)shared/c-rbtree' \
':(exclude)shared/c-list' \
':(exclude)shared/c-siphash' \
':(exclude)shared/c-stdaux' \
':(exclude)shared/n-acd' \
':(exclude)shared/n-dhcp4' \
':(exclude)src/systemd/src' \
':(exclude)shared/systemd/src' \
':(exclude)m4' \
':(exclude)COPYING*'
)
sed \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[-–] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C1pyright#\5 - \7#\9/' \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[,] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C2pyright#\5, \7#\9/' \
-e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C3pyright#\5#\7/' \
-e 's/^Copyright \(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/C4pyright#\1#\3/' \
-i \
"${FILES[@]}"
echo ">>> untouched Copyright lines"
git grep Copyright "${FILES[@]}"
echo ">>> Copyright lines with unusual extra"
git grep '\<C[0-9]pyright#' "${FILES[@]}" | grep -i reserved
sed \
-e 's/\<C[0-9]pyright#\([^#]*\)#\(.*\)$/Copyright (C) \1 \2/' \
-i \
"${FILES[@]}"
```
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/298
2019-10-02 17:03:52 +02:00
Lubomir Rintel
24028a2246
all: SPDX header conversion
...
$ find * -type f |xargs perl contrib/scripts/spdx.pl
$ git rm contrib/scripts/spdx.pl
2019-09-10 11:19:56 +02:00
Thomas Haller
6ea499ac40
libnm: don't return deep-copied strv array from nm_tc_qdisc_get_attribute_names()
...
Most of the caller won't require a deep-clone of the attribute
names. Likely, the fetch the name, so they can lookup the attributes.
In that common case, there is no need to clone the strings themself.
(cherry picked from commit 01e7cb11bf
)
2019-04-20 08:56:29 +02:00
Lubomir Rintel
65831ee84c
core/qdisc: add support for attributes
2019-04-12 18:04:04 +02:00
Beniamino Galvani
1b5925ce88
all: remove consecutive empty lines
...
Normalize coding style by removing consecutive empty lines from C
sources and headers.
https://github.com/NetworkManager/NetworkManager/pull/108
2018-04-30 16:24:52 +02:00
Lubomir Rintel
685cb5c88b
libnm-core/tc-config: remove deprecation guards from typedefs
...
They're triggered by the prototypes in header file inclusion, even
though no routines or variables that use the type are actually used.
2017-12-18 13:29:32 +01:00
Lubomir Rintel
e035cb7be0
libnm-core: add traffic filter support to NMSettingTCConfig
2017-12-11 11:02:04 +01:00
Lubomir Rintel
7c8ce778fb
libnm-core: add action support to NMSettingTCConfig
...
The actions are not too useful my themselves, but it will be possible to
embed them into traffic filters in subsequent commits.
2017-12-11 10:52:23 +01:00
Lubomir Rintel
da13c7a1a4
libnm-core: add NMSettingTCConfig with qdisc support
...
Currently is only able to hold the queueing disciplines.
2017-12-11 10:52:22 +01:00