[systemd-devel] [PATCH] build-sys: use more generic regular expression to generate syscall-list.txt correctly

Lennart Poettering lennart at poettering.net
Wed Aug 8 13:47:03 PDT 2012


On Thu, 09.08.12 04:04, Huang Hang (seakage2h at gmail.com) wrote:

> Currently MIPS and ARM define syscall numbers for multiple ABI in one
> <asm/unistd.h>. The #define statements for each syscall are formated as:
> 
>  #define __NR_sc_name (BASE_OFFSET + sc_number)
> 
> Thus we need a more generic regular expression to match these in awk.
> 
> Signed-off-by: Huang Hang <seakage2h at gmail.com>
> ---
>  Makefile.am |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 278da18..2191f78 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1030,7 +1030,7 @@ BUILT_SOURCES += \
> 
>  src/core/syscall-list.txt: Makefile
>  	$(AM_V_at)$(MKDIR_P) $(dir $@)
> -	$(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include
> sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[
> \t]+[0-9]/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
> +	$(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include
> sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[
> \t]+\(?.*[0-9]+.*\)?/ { sub(/__NR_/, "", $$2); print $$2; }' > $@
> 
>  src/core/syscall-from-name.gperf: src/core/syscall-list.txt Makefile
>  	$(AM_V_at)$(MKDIR_P) $(dir $@)

This patch got corrupted due to linebreaks. Please resend without broken
lines! Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list