Commit Graph

9 Commits

Author SHA1 Message Date
4646db8e4d Move definitions of xlat_type and xlat_style from defs.h to xlat.h
* defs.h (enum xlat_type, enum xlat_style, XLAT_STYLE_FORMAT_SHIFT,
XLAT_STYLE_VERBOSITY_MASK, XLAT_STYLE_FORMAT_MASK, XLAT_STYLE_SPEC_BITS,
XLAT_STYLE_MASK): Move ...
* xlat.h: ... here.
2018-05-30 20:50:29 +00:00
42ceb0fd7f Change #include guard trailing part comments
* defs.h: Change comment of the trailing part of #include guard.
* flock.h: Likewise.
* gcc_compat.h: Likewise.
* ipc_defs.h: Likewise.
* kernel_types.h: Likewise.
* mpers_type.h: Likewise.
* msghdr.h: Likewise.
* printsiginfo.h: Likewise.
* ptrace.h: Likewise.
* regs.h: Likewise.
* seccomp_fprog.h: Likewise.
* sigevent.h: Likewise.
* statfs.h: Likewise.
* xlat.h: Likewise.
2016-08-07 22:02:46 +00:00
Eugene Syromyatnikov
18907920bb Unify usage of #include guards
This commit is an attempt to unify usage of include guards (in top-level
headers, at least).  As a side note, different files with *.h extension
have different semantics: for example, printargs.h is included multiple
times in order to generate slightly varying code depending on values of
macro definitions - maybe it's better to change extension of such files
to something like *.inc.

* defs.h: Add #include guard.
* flock.h: Likewise.
* ipc_defs.h: Likewise.
* mpers_type.h: Likewise.
* printsiginfo.h: Likewise.
* ptrace.h: Likewise.
* regs.h: Likewise.
* seccomp_fprog.h: Likewise.
* gcc_compat.h: Rename the macro used for #include guard.
* msghdr.h: Likewise.
* sigevent.h: Likewise.
* kernel_types.h: Comment the trailing part of #include guard.
* xlat.h: Add missing macro definition for #include guard.
2016-08-08 09:54:01 +00:00
070fec2248 Fix typo in XLAT_TYPE_PAIR
* xlat.h (XLAT_TYPE_PAIR): Take "type" parameter.

Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2016-04-29 20:04:38 +00:00
Jeff Mahoney
9019cf4cf5 Change type of struct xlat.val to uint64_t
Some ioctls have flags fields that are 64-bit.  A 32-bit val means
these flags will never be matched or printed.

* xlat.h: Include <stdint.h>.
(struct xlat): Change type of val to uint64_t.
2016-04-29 01:12:14 +00:00
0f4982691e Introduce XLAT_TYPE and XLAT_TYPE_PAIR macros
* xlat.h (XLAT_TYPE): New macro, similar to XLAT but casts
to the specified type instead of unsigned int.
(XLAT_TYPE_PAIR): New macro, similar to XLAT_PAIR but casts
to the specified type instead of unsigned int.
2016-04-29 00:15:01 +00:00
3f25b65d63 xlat: generate xlat pairs using new XLAT_PAIR macro
Before this change there were two forms of xlat entries: those that use XLAT
or XLAT_END macros, and others verbatim entries.  This change converts
the latter to use new XLAT_PAIR macro.

This is necessary for the upcoming change of xlat.val type.

* xlat.h (XLAT_PAIR): New macro.
* xlat/gen.sh (cond_xlat, gen_header): Use it.
2016-04-29 00:15:01 +00:00
a9f956d279 Explicitly cast argument of XLAT macro to unsigned int
This is necessary for the upcoming change of xlat.val type.

* xlat.h (XLAT): Cast the argument to unsigned int.
2016-04-29 00:15:01 +00:00
0e09704e09 Move definition of struct xlat to a separate header file
Define struct xlat in a separate file so that it could be used later by
tests without inclusion of defs.h header file.

* defs.h (struct xlat, XLAT, XLAT_END): Move ...
* xlat.h: ... here.
* Makefile.am (strace_SOURCES): Add xlat.h.
2016-04-26 00:08:16 +00:00