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]
Date:	Mon, 14 Dec 2015 11:33:58 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Josh Poimboeuf <jpoimboe@...hat.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH v3 10/17] perf: Provide subcmd configuration at runtime

On Sun, Dec 13, 2015 at 10:18:10PM -0600, Josh Poimboeuf wrote:

SNIP

>  
>  typedef int (*config_fn_t)(const char *, const char *, void *);
>  extern int perf_default_config(const char *, const char *, void *);
> diff --git a/tools/perf/util/exec_cmd.c b/tools/perf/util/exec_cmd.c
> index 1099e92..84f9dc5 100644
> --- a/tools/perf/util/exec_cmd.c
> +++ b/tools/perf/util/exec_cmd.c
> @@ -5,19 +5,33 @@
>  #include <string.h>
>  
>  #define MAX_ARGS	32
> +#define UNDEFINED	"UNDEFINED"
>  
>  static const char *argv_exec_path;
>  static const char *argv0_path;
>  
> +static const char *cfg_exec_name	= UNDEFINED;
> +static const char *cfg_prefix		= UNDEFINED;
> +static const char *cfg_exec_path	= UNDEFINED;
> +static const char *cfg_exec_path_env	= UNDEFINED;

so instead of forcing each object to hold some subset
of cfg_* configuration, why not create global cfg
object that would carry this data.. cfg_path or so ;-)

jirka
--
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