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: <20160426150044.GF11033@kernel.org>
Date:	Tue, 26 Apr 2016 12:00:44 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Masami Hiramatsu <mhiramat@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Hemant Kumar <hemant@...ux.vnet.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Subject: Re: [PATCH perf/core v4 04/19] perf: Add lsdir to read a directory

Em Tue, Apr 26, 2016 at 11:52:29PM +0900, Masami Hiramatsu escreveu:
> On Tue, 26 Apr 2016 11:07:42 -0300
> Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> > Em Tue, Apr 26, 2016 at 10:40:20AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Tue, Apr 26, 2016 at 06:02:42PM +0900, Masami Hiramatsu escreveu:
> > > > From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> > > > 
> > > > As a utility function, add lsdir() which reads given
> > > > directory and store entry name into a strlist.
> > > > lsdir accepts a filter function so that user can
> > > > filter out unneeded entries.
> > > > 
> > > > Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> > > > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > > 
> > > Thanks, applied.
> > 
> > Had to fix it to build on some distros, like ubuntu 12.04:
> > 
> > alldeps-ubuntu-12.04: FAIL
> > util/util.h:228:38: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow]
> > cc1: all warnings being treated as errors
> > mv: cannot stat `/tmp/build/perf/util/.db-export.o.tmp': No such file or directory
> > make[3]: *** [/tmp/build/perf/util/db-export.o] Error 1
> > make[3]: *** Waiting for unfinished jobs....
> > make[2]: *** [util] Error 2
> > make[2]: *** [ui] Error 2
> > make[1]: *** [/tmp/build/perf/libperf-in.o] Error 
> > make: *** [install-bin] Error 2
> > 
> 
> Hmm, I didn't know that the dummy argument can shadow a global declaration.
> I might be better to rename "dirname" to "dir_name".

I used 'name', its a short function and the name (lsdir) should indicate
that name is indeed the directory name.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ