$ git shortlog -n -s a3e75f3294 -- libnm-core/nm-errors.h
11 Dan Winship
5 Thomas Haller
2 Beniamino Galvani
Note that the header also contains code that was copied from other
files. However, that code originates from libnm itself (and thus was
already LGPL licensed).
All contributors agreed to the relicensing according to "RELICENSE.md".
$ git shortlog -n -s a3e75f3294 -- shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h src/systemd/sd-adapt-core/nm-sd-adapt-core.c src/systemd/sd-adapt/nm-sd-adapt.'[hc]' src/systemd/nm-sd-adapt.'[hc]' src/dhcp-manager/systemd-dhcp/nm-sd-adapt.'[hc]'
46 Thomas Haller
7 Beniamino Galvani
3 Lubomir Rintel
2 Dan Williams
2 Dan Winship
1 Glenn Washburn
1 Jiří Klimeš
Note that the contribution to the file by Glenn was removed in
commit e27b15c00d ('all: remove CLOCK_BOOTTIME defintions'), so
it is no longer relevant.
All other contributors agreed to the relicensing according to "RELICENSE.md".
$ git shortlog -n -s a3e75f3294 -- shared/nm-utils/nm-vpn-editor-plugin-call.h shared/nm-vpn-editor-plugin-call.h
5 Thomas Haller
All contributors agreed to the relicensing according to "RELICENSE.md".
$ git shortlog -n -s a3e75f3294 -- shared/nm-libnm-core-intern/nm-auth-subject.'[hc]' src/nm-auth-subject.'[hc]'
28 Thomas Haller
7 Dan Winship
1 Beniamino Galvani
1 Dan Williams
1 Jiří Klimeš
All contributors agreed to the relicensing according to "RELICENSE.md".
$ git shortlog -n -s a3e75f3294 -- shared/nm-glib-aux/nm-jansson.h shared/nm-utils/nm-jansson.h
7 Thomas Haller
1 Lubomir Rintel
1 Beniamino Galvani
1 Francesco Giudici
All contributors agreed to the relicensing according to "RELICENSE.md".
$ git shortlog -n -s a3e75f3294 -- shared/nm-glib-aux/nm-glib.h shared/nm-utils/nm-glib.h shared/nm-glib.h include/nm-glib.h include/nm-glib-compat.h
35 Thomas Haller
12 Dan Winship
5 Dan Williams
3 Lubomir Rintel
2 Beniamino Galvani
1 Jan Kantert
1 Thomas Bechtold
The last two contributions by Thomas and Jan are no longer present in any
form, because they were for an older version of glib which is no longer
supported. All other contributors agree to the licences change according
to "RELICENSE.md" file.
A large part of the copyright on NetworkManager belongs to Red Hat, Inc.
I talked with legal team (Scott Peterson), and they agree with the
relicensing of NetworkManager code under LGPL-2.1+ code.
On Red Hat's behalf, I hereby mark the agreement to the license change.
It is redundant. Drop it.
Also, we don't need to cancel and reschedule the idle source in
nm_manager_start(). First of all, it really shouldn't be pending.
Second, contrary to a timer, when an idle source is already pending,
then the pending one will run at the right time.
The _GET_PRIVATE() macros are all implemented based on
_NM_GET_PRIVATE(). That macro tries to be more type safe and uses
_Generic() to do the right thing. Explicitly casting is not only
unnecessary, it defeats these (static) type checks.
Don't do that.
For one, we by now require glib >= 2.34.0, so this is not used.
Also, I think G_DEFINE_QUARK() is rather ugly because it constructs
the defined function name (so you cannot grep for it). We should use
NM_CACHED_QUARK_FCN() instead.
Several macros are used to define function. They had a "_STATIC" variant,
to define the function as static.
I think those macros should not try to abstract entirely what they do.
They should not accept the function scope as argument (or have two
variants per scope). This also because it might make sense to add
additional __attribute__(()) to the function. That only works, if
the macro does not pretend to *not* define a plain function.
Instead, embrace what the function does and let the users place the
function scope as they see fit.
This also follows what is already done with
static NM_CACHED_QUARK_FCN ("autoconnect-root", autoconnect_root_quark)
When looking at nm_utils_array_find_binary_search(), we see that binary
search really isn't complicated. In nm_utils_array_find_binary_search()
it looks complicated, because that is our general purpose function which
accepts arbitrary lists, uses an opaque compare function, accepts a user
data argument, and returns the insertion position.
This is unnecessary for the narrow purpose in NM_UTILS_STRING_TABLE_LOOKUP_DEFINE*().
When we inline the binary search, it can be simplified, and the remaining
parts is simple enough to prefer this duplication of binary search over
using our general purpose function.
Also, this gives the compiler more chance for optimization. For
example, we can use "unsigned" as index type instead of gssize, because
we know (at compile time), that this type will always be large enough
for our LIST. Also, we can directly call strcmp().
The result is that the macro's implementation is also fast in the best
case (where the needle is found with only one strcmp()) and in the cases
where there is a small number of items to search.
It thus alleviates concerns that using the macro might be slower than
an optimized implementation.
The binary size of the defined function increases slightly (from 112
bytes to 192 bytes, on x86_64, GCC, -O2). But according to my tests it
is slightly and measurably faster.
In all the cases, we don't want to perform locale dependent comparison.
$ sed -i 's/\<strcasecmp\>/g_ascii_\0/g' $(git grep -w -l strcasecmp -- ':(exclude)shared/systemd/' )
We frequently have code that converts a string to number/enum.
Use a preferred implementation via the NM_UTILS_STRING_TABLE_LOOKUP_DEFINE()
macro.
Also, this does binary search, so in most cases it's (slightly) faster.