lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191030162920.3ec8549d@hermes.lan>
Date:   Wed, 30 Oct 2019 16:29:20 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Ariel Levkovich <lariel@...lanox.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH 2/3] ip: Present the VF VLAN tagging mode

On Wed, 30 Oct 2019 19:17:32 +0000
Ariel Levkovich <lariel@...lanox.com> wrote:

> +		if (vlan_mode->mode == IFLA_VF_VLAN_MODE_TRUNK)
> +			print_string(PRINT_ANY,
> +				     "vlan-mode",
> +				      ", vlan-mode %s",
> +				      "trunk");
> +		else if (vlan_mode->mode == IFLA_VF_VLAN_MODE_VST)
> +			print_string(PRINT_ANY,
> +				     "vlan-mode",
> +				     ", vlan_mode %s",
> +				     "vst");
> +		else if (vlan_mode->mode == IFLA_VF_VLAN_MODE_VGT)
> +			print_string(PRINT_ANY,
> +				     "vlan-mode",
> +				     ", vlan-mode %s",
> +				     "vgt");

This seems like you want something like:

		print_string(PRINT_ANY, "vlan-mode", ", vlan-mode %s",
				vlan_mode_str(vlan_mode->mode);

and why the comma in the output? the convention for ip commands is that
the output format is equivalent to the command line.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ