]> git.ipfire.org Git - thirdparty/systemd.git/commit
link-config: unentangle the renaming logic and add logging
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Jan 2019 13:08:02 +0000 (14:08 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Jan 2019 21:20:04 +0000 (22:20 +0100)
commit0b189e8fa72a06ada15096c9b363bddc501c01fa
tree7498f3f98ec535231983e521205941563099c120
parent29cf0ff82386587e010ae2d417ff903da7537494
link-config: unentangle the renaming logic and add logging

What policy we dicide to use it rather important, but this bit of information
wasn't logged. Let's always do that.

The code was also written in a confusing way, which probably contributed to the
unintended effects of 55b6530baacf4658a183b15b010a8cf3483fde08 and other commits.
We would loop over all policies, and note if "kernel" was specified, and then
possibly unset the result at the end. Let's immediately log the result and cut
to the end if we can figure out the answer.

No functional change intended, except for the new log lines.
Using goto is not very elegant, but we can't use break because of the switch,
and there are multiple conditions to break the loop, so using goto is cleanest.
src/udev/net/link-config.c