summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--man/systemd-detect-virt.xml76
-rw-r--r--src/network/networkctl.c21
-rw-r--r--src/network/networkd-netdev-bond.c19
4 files changed, 62 insertions, 56 deletions
diff --git a/TODO b/TODO
index f49cf2b3f4..25900c70b8 100644
--- a/TODO
+++ b/TODO
@@ -918,8 +918,6 @@ External:
* dbus: in fedora, make /var/lib/dbus/machine-id a symlink to /etc/machine-id
-* add "# export SYSTEMD_PAGER=" to bash login
-
* /usr/bin/service should actually show the new command line
* fedora: suggest auto-restart on failure, but not on success and not on coredump. also, ask people to think about changing the start limit logic. Also point people to RestartPreventExitStatus=, SuccessExitStatus=
diff --git a/man/systemd-detect-virt.xml b/man/systemd-detect-virt.xml
index 3997e10c43..5d19322cdc 100644
--- a/man/systemd-detect-virt.xml
+++ b/man/systemd-detect-virt.xml
@@ -22,7 +22,7 @@
-->
<refentry id="systemd-detect-virt"
- xmlns:xi="http://www.w3.org/2001/XInclude">
+ xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>systemd-detect-virt</title>
@@ -81,92 +81,92 @@
<colspec colname="product" />
<thead>
<row>
- <entry>Type</entry>
- <entry>ID</entry>
- <entry>Product</entry>
+ <entry>Type</entry>
+ <entry>ID</entry>
+ <entry>Product</entry>
</row>
</thead>
<tbody>
<row>
- <entry morerows="9">VM</entry>
- <entry><varname>qemu</varname></entry>
- <entry>QEMU software virtualization</entry>
+ <entry morerows="9">VM</entry>
+ <entry><varname>qemu</varname></entry>
+ <entry>QEMU software virtualization</entry>
</row>
<row>
- <entry><varname>kvm</varname></entry>
- <entry>Linux KVM kernel virtual machine</entry>
+ <entry><varname>kvm</varname></entry>
+ <entry>Linux KVM kernel virtual machine</entry>
</row>
<row>
- <entry><varname>zvm</varname></entry>
- <entry>s390 z/VM</entry>
+ <entry><varname>zvm</varname></entry>
+ <entry>s390 z/VM</entry>
</row>
<row>
- <entry><varname>vmware</varname></entry>
- <entry>VMware Workstation or Server, and related products</entry>
+ <entry><varname>vmware</varname></entry>
+ <entry>VMware Workstation or Server, and related products</entry>
</row>
<row>
- <entry><varname>microsoft</varname></entry>
- <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
+ <entry><varname>microsoft</varname></entry>
+ <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
</row>
<row>
- <entry><varname>oracle</varname></entry>
- <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
+ <entry><varname>oracle</varname></entry>
+ <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
</row>
<row>
- <entry><varname>xen</varname></entry>
- <entry>Xen hypervisor (only domU, not dom0)</entry>
+ <entry><varname>xen</varname></entry>
+ <entry>Xen hypervisor (only domU, not dom0)</entry>
</row>
<row>
- <entry><varname>bochs</varname></entry>
- <entry>Bochs Emulator</entry>
+ <entry><varname>bochs</varname></entry>
+ <entry>Bochs Emulator</entry>
</row>
<row>
- <entry><varname>uml</varname></entry>
- <entry>User-mode Linux</entry>
+ <entry><varname>uml</varname></entry>
+ <entry>User-mode Linux</entry>
</row>
<row>
- <entry><varname>parallels</varname></entry>
- <entry>Parallels Desktop, Parallels Server</entry>
+ <entry><varname>parallels</varname></entry>
+ <entry>Parallels Desktop, Parallels Server</entry>
</row>
<row>
- <entry morerows="5">Container</entry>
- <entry><varname>openvz</varname></entry>
- <entry>OpenVZ/Virtuozzo</entry>
+ <entry morerows="5">Container</entry>
+ <entry><varname>openvz</varname></entry>
+ <entry>OpenVZ/Virtuozzo</entry>
</row>
<row>
- <entry><varname>lxc</varname></entry>
- <entry>Linux container implementation by LXC</entry>
+ <entry><varname>lxc</varname></entry>
+ <entry>Linux container implementation by LXC</entry>
</row>
<row>
- <entry><varname>lxc-libvirt</varname></entry>
- <entry>Linux container implementation by libvirt</entry>
+ <entry><varname>lxc-libvirt</varname></entry>
+ <entry>Linux container implementation by libvirt</entry>
</row>
<row>
- <entry><varname>systemd-nspawn</varname></entry>
- <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
+ <entry><varname>systemd-nspawn</varname></entry>
+ <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
</row>
<row>
- <entry><varname>docker</varname></entry>
- <entry>Docker container manager</entry>
+ <entry><varname>docker</varname></entry>
+ <entry>Docker container manager</entry>
</row>
<row>
- <entry><varname>rkt</varname></entry>
- <entry>rkt app container runtime</entry>
+ <entry><varname>rkt</varname></entry>
+ <entry>rkt app container runtime</entry>
</row>
</tbody>
</tgroup>
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index ba7e3ba74a..446b048ef1 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -910,12 +910,10 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
_cleanup_netlink_message_unref_ sd_netlink_message *req = NULL, *reply = NULL;
_cleanup_netlink_unref_ sd_netlink *rtnl = NULL;
_cleanup_free_ LinkInfo *links = NULL;
- const char *state, *word;
-
double ttl = -1;
uint32_t capability;
int i, r, c, j;
- size_t ll;
+ const char *p;
char **s;
pager_open_if_enabled();
@@ -956,14 +954,19 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
return -ENOMEM;
STRV_FOREACH(s, l) {
- FOREACH_WORD_QUOTED(word, ll, *s, state) {
- _cleanup_free_ char *t = NULL, *a = NULL, *b = NULL;
- t = strndup(word, ll);
- if (!t)
- return -ENOMEM;
+ p = *s;
+ for (;;) {
+ _cleanup_free_ char *a = NULL, *b = NULL, *word = NULL;
+
+ r = extract_first_word(&p, &word, NULL, EXTRACT_QUOTES);
+ if (r < 0)
+ return log_error_errno(r, "Failed to parse LLDP syntax \"%s\": %m", *s);
+
+ if (r == 0)
+ break;
- r = split_pair(t, "=", &a, &b);
+ r = split_pair(word, "=", &a, &b);
if (r < 0)
continue;
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index 70105b8aa0..4e4755f86f 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -340,8 +340,6 @@ int config_parse_arp_ip_target_address(const char *unit,
void *data,
void *userdata) {
Bond *b = userdata;
- const char *word, *state;
- size_t l;
int r;
assert(filename);
@@ -349,14 +347,19 @@ int config_parse_arp_ip_target_address(const char *unit,
assert(rvalue);
assert(data);
- FOREACH_WORD_QUOTED(word, l, rvalue, state) {
+ for (;;) {
_cleanup_free_ ArpIpTarget *buffer = NULL;
_cleanup_free_ char *n = NULL;
int f;
- n = strndup(word, l);
- if (!n)
- return -ENOMEM;
+ r = extract_first_word(&rvalue, &n, NULL, 0);
+ if (r < 0) {
+ log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse Bond ARP ip target address, ignoring assignment: %s", rvalue);
+ return 0;
+ }
+
+ if (r == 0)
+ break;
buffer = new0(ArpIpTarget, 1);
if (!buffer)
@@ -380,7 +383,9 @@ int config_parse_arp_ip_target_address(const char *unit,
}
if (b->n_arp_ip_targets > NETDEV_BOND_ARP_TARGETS_MAX)
- log_syntax(unit, LOG_WARNING, filename, line, 0, "More than the maximum number of kernel-supported ARP ip targets specified: %d > %d", b->n_arp_ip_targets, NETDEV_BOND_ARP_TARGETS_MAX);
+ log_syntax(unit, LOG_WARNING, filename, line, 0,
+ "More than the maximum number of kernel-supported ARP ip targets specified: %d > %d",
+ b->n_arp_ip_targets, NETDEV_BOND_ARP_TARGETS_MAX);
return 0;
}