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] [day] [month] [year] [list]
Date:   Mon, 28 Jan 2019 09:53:14 -0700
From:   David Ahern <dsahern@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next 1/2] tc: replace print_string with fprintf
 for error messages

On 1/24/19 1:30 PM, Stephen Hemminger wrote:
> diff --git a/tc/m_connmark.c b/tc/m_connmark.c
> index 45e2d05f1a91..34d80b1a27c0 100644
> --- a/tc/m_connmark.c
> +++ b/tc/m_connmark.c
> @@ -114,7 +114,7 @@ static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg)
>  
>  	parse_rtattr_nested(tb, TCA_CONNMARK_MAX, arg);
>  	if (tb[TCA_CONNMARK_PARMS] == NULL) {
> -		print_string(PRINT_FP, NULL, "%s", "[NULL connmark parameters]");
> +		fprintf(stderr, "NULL connmark parameters\n");
>  		return -1;
>  	}
>  
> diff --git a/tc/m_csum.c b/tc/m_csum.c
> index 752269d1d020..450f2b557b44 100644
> --- a/tc/m_csum.c
> +++ b/tc/m_csum.c
> @@ -172,7 +172,7 @@ print_csum(struct action_util *au, FILE *f, struct rtattr *arg)
>  	parse_rtattr_nested(tb, TCA_CSUM_MAX, arg);
>  
>  	if (tb[TCA_CSUM_PARMS] == NULL) {
> -		fprintf(f, "[NULL csum parameters]");
> +		fprintf(stderr, "missing csum parameters\n");
>  		return -1;
>  	}
>  	sel = RTA_DATA(tb[TCA_CSUM_PARMS]);
> diff --git a/tc/m_gact.c b/tc/m_gact.c
> index a0a3c33d23da..342927bc2ed7 100644
> --- a/tc/m_gact.c
> +++ b/tc/m_gact.c
> @@ -174,7 +174,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg)
>  	parse_rtattr_nested(tb, TCA_GACT_MAX, arg);
>  
>  	if (tb[TCA_GACT_PARMS] == NULL) {
> -		print_string(PRINT_FP, NULL, "%s", "[NULL gact parameters]");
> +		fprintf(stderr, "[NULL gact parameters]\n");

We should be consistent and not showing the the '[]'. You have several
error messages with those included.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ