]> git.ipfire.org Git - thirdparty/systemd.git/commit
networkctl: return error or warning when interfaces are not matched
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 12 Jan 2020 11:14:31 +0000 (12:14 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 Jan 2020 12:09:46 +0000 (13:09 +0100)
commit0ef84b80c59b6d15c344b96e3040b2ee367e33ac
treee7e9fce4475cf518c800dc243e5f4bb7086bd32e
parent0e05be8405132fb392bc0bd01ea520e58d447467
networkctl: return error or warning when interfaces are not matched

We'd just print nothing and exit with 0. If the user gave an explicit
name, we should fail. If a pattern didn't match, we should at least warn.

$ networkctl status enx54ee75cb1dc0a* --no-pager && echo $?
No interfaces matched.
0

$ networkctl status enx54ee75cb1dc0a --no-pager
Interface "enx54ee75cb1dc0a" not found.
1
src/basic/strv.c
src/basic/strv.h
src/network/networkctl.c
src/test/test-strv.c