[pve-devel] applied+cleanup: [PATCH] Fix interface writer for bridge_ports and slaves.
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Jan 27 15:22:38 CET 2017
used s/[;,\s]+/ /g instead to mimic the transformations we also use for
checking and parsing in that code path (split_list + join with ' ').
the | is not necessary since this not an alternative of REs, but a
character class, and grouping is also not necessary.
On Fri, Jan 27, 2017 at 01:14:15PM +0100, Wolfgang Link wrote:
> The pve-iface-list allow to separate interfaces with [;| |,].
> But in the interface file are only whitespace allowed to separate interfaces.
> ---
> src/PVE/INotify.pm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
> index 621b555..d0c22ef 100644
> --- a/src/PVE/INotify.pm
> +++ b/src/PVE/INotify.pm
> @@ -1054,6 +1054,7 @@ sub __interface_to_string {
> # not printing out options
> } elsif ($d->{type} eq 'bridge') {
>
> + $d->{bridge_ports} =~ s/([;|,| ])+/ /g;
> my $ports = $d->{bridge_ports} || 'none';
> $raw .= "\tbridge_ports $ports\n";
> $done->{bridge_ports} = 1;
> @@ -1073,6 +1074,7 @@ sub __interface_to_string {
>
> } elsif ($d->{type} eq 'bond') {
>
> + $d->{slaves} =~ s/([;|,| ])+/ /g;
> my $slaves = $d->{slaves} || 'none';
> $raw .= "\tslaves $slaves\n";
> $done->{slaves} = 1;
> --
> 2.1.4
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list