[PATCH 2/4] Move is_number_in_set prototype to filter.h
Edgar Kaziakhmedov
edgar.kaziakhmedov at virtuozzo.com
Mon Aug 21 18:23:01 UTC 2017
________________________________________
From: Dmitry V. Levin [ldv at altlinux.org]
Sent: Monday, August 21, 2017 7:21 PM
To: strace-devel at lists.sourceforge.net
Subject: Re: [PATCH 2/4] Move is_number_in_set prototype to filter.h
On Mon, Aug 21, 2017 at 03:06:57AM +0300, Edgar Kaziakhmedov wrote:
> Since the filter.h unites set of filtering functions and defs.h contains
> superfluous and unrelated set of prototypes, is_number_in_set
> should be prototyped there. Also, other binaries included in the strace
> package requires it for filtering.
>
> Signed-off-by: Edgar Kaziakhmedov <edgar.kaziakhmedov at virtuozzo.com>
> ---
> defs.h | 2 +-
> filter.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/defs.h b/defs.h
> index dddad0c9..9aba72ff 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -54,6 +54,7 @@
> #include <sys/time.h>
>
> #include "error_prints.h"
> +#include "filter.h"
> Why do you think it should be included here?
Because it is required by strace.c and syscall.c, that in turn have already included defs.h
> #include "gcc_compat.h"
> #include "kernel_types.h"
> #include "macros.h"
> @@ -661,7 +662,6 @@ extern struct number_set read_set;
> extern struct number_set write_set;
> extern struct number_set signal_set;
>
> -extern bool is_number_in_set(unsigned int number, const struct number_set *);
> extern void qualify(const char *);
> extern unsigned int qual_flags(const unsigned int);
>
> diff --git a/filter.h b/filter.h
> index eefbd3cb..a8f605f2 100644
> --- a/filter.h
> +++ b/filter.h
> @@ -32,6 +32,7 @@
> struct number_set;
> typedef int (*string_to_uint_func)(const char *);
>
> +extern bool is_number_in_set(unsigned int number, const struct number_set *);
> void add_number_to_set(unsigned int number, struct number_set *set);
> void qualify_tokens(const char *str, struct number_set *set,
> string_to_uint_func func, const char *name);
> Looks reasonable, but as it potentially intersects with Nikolay's filtering,
> I'd like to hear from Nikolay, too.
Ok, Nikolay?
--
ldv
More information about the Strace-devel
mailing list