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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m34oa6t0e4.fsf@gmail.com>
Date:	Wed, 22 Dec 2010 14:14:43 +0100
From:	Franck Bui-Huu <vagabon.xyz@...il.com>
To:	mingo@...hat.com
Cc:	hpa@...or.com, linux-kernel@...r.kernel.org, acme@...hat.com,
	masami.hiramatsu.pt@...achi.com, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf probe: Don't always consider EOF as an error when listing source code

tip-bot for Franck Bui-Huu <fbuihuu@...il.com> writes:


[...]

> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 3ba9c53..80cc0bc 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -287,7 +287,7 @@ static int get_real_path(const char *raw_path, const char *comp_dir,
>  #define LINEBUF_SIZE 256
>  #define NR_ADDITIONAL_LINES 2
>  
> -static int show_one_line(FILE *fp, int l, bool skip, bool show_num)
> +static int __show_one_line(FILE *fp, int l, bool skip, bool show_num)
>  {
>  	char buf[LINEBUF_SIZE];
>  	const char *color = show_num ? "" : PERF_COLOR_BLUE;
> @@ -306,16 +306,30 @@ static int show_one_line(FILE *fp, int l, bool skip, bool show_num)
>  
>  	} while (strchr(buf, '\n') == NULL);
>  
> -	return 0;
> +	return 1;
>  error:
> -	if (feof(fp))
> +	if (ferror(fp)) {
>  		pr_warning("Source file is shorter than expected.\n");
> -	else
> -		pr_warning("File read error: %s\n", strerror(errno));
> +		return -1;

Argh, something wrong here.

The warning left here, is the wrong one, I should have left the other
one.

Sorry for the mistake.

Should I send a patch to fix that ?
-- 
		Franck
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ