| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/Makefile.am: New file.
* src/.gitignore: Likewise.
* scno.am: Move into src subdirectory.
* scno.head: Likewise.
* strace-graph: Likewise.
* strace-log-merge: Likewise.
* linux/: Likewise.
* types/: Likewise.
* xlat/: Likewise.
* *.awk: Likewise.
* *.c: Likewise.
* *.h: Likewise.
* *.sh: Likewise.
* .gitignore: Update.
* Makefile.am: Update.
* bootstrap: Update.
* configure.ac: Update.
* debian/rules: Update.
* debian/strace-udeb.install: Update.
* debian/strace.examples: Update.
* debian/strace.install: Update.
* debian/strace64.install: Update.
* m4/gen_bpf_attr_m4.sh: Update.
* m4/mpers.m4: Update.
* tests/Makefile.am: Update.
* tests/init.sh: Update.
* tests/legacy_syscall_info.test: Update.
* tests/strace-log-merge-error.test: Update.
* tests/strace-log-merge-suffix.test: Update.
|
|
|
|
|
|
| |
As print_fields.h is going to be used by virtually every parser,
include print_fields.h from defs.h, and stop including it in all other
files except tests.
|
|
|
|
|
|
|
| |
... with tprint_struct_next()/tprint_array_next() followed by
tprint_more_data_follows().
This applies to all users of print_fields.h macros except tests.
|
|
|
|
| |
This applies to all users of print_fields.h macros except tests.
|
|
|
|
|
|
|
|
|
|
| |
* print_fields.h (PRINT_FIELD_UID, PRINT_FIELD_LEN): Remove.
(PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_ID, PRINT_FIELD_TGID):
Remove the first argument, all callers updated.
* net.c (MAYBE_PRINT_FIELD_LEN): New macro, use it instead of
PRINT_FIELD_LEN.
* tests/nlattr_smc_diag_msg.c (PRINT_FIELD_SMC_DIAG_CURSOR):
Remove the first argument, all callers updated.
|
|
|
|
|
| |
* print_fields.h (PRINT_FIELD_X): Remove the first argument,
all callers updated.
|
|
|
|
|
| |
* print_fields.h (PRINT_FIELD_FLAGS): Remove the first argument,
all callers updated.
|
|
|
|
|
| |
* print_fields.h (PRINT_FIELD_OBJ_PTR): Remove the first argument,
all callers updated.
|
|
|
|
|
|
|
| |
* quota.c (print_fs_qfilestat, print_fs_qfilestatv): New functions.
(decode_cmd_data): Use them via PRINT_FIELD_OBJ_PTR to print struct
fs_qfilestat fields of struct fs_quota_stat, and struct fs_qfilestatv
fields of struct fs_quota_statv.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* quota.c (print_qcmd): New function.
(SYS_FUNC(quotactl)): Use it to print the quotactl command.
* tests/quotactl.c (print_dqinfo, print_dqfmt): Handle XLAT_RAW
and XLAT_VERBOSE.
(QUOTA_STR, QUOTA_ID_STR, QUOTA_STR_INVALID): New macros.
(gen_quotacmd, gen_quotaid): New functions.
(main): Use them.
* tests/quotactl-Xabbrev.c: New file.
* tests/quotactl-Xraw.c: Likewise.
* tests/quotactl-Xverbose.c: Likewise.
* tests/gen_tests.in (quotactl-Xabbrev, quotactl-Xraw,
quotactl-Xverbose): New tests.
* tests/pure_executables.list: Add quotactl-Xabbrev, quotactl-Xraw,
and quotactl-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
|
|
|
|
|
|
|
|
| |
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
|
|
|
|
|
|
|
|
|
| |
* xfs_quota_stat.h: New file.
* fetch_struct_xfs_quotastat.c: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* quota.c: Include xfs_quota_stat.h
(struct fs_qfilestat, struct xfs_dqstats): Moved to xfs_quota_stat.h.
(decode_cmd_data) <case Q_XGETQSTAT>: Use fetch_struct_quotastat.
|
|
|
|
|
| |
* quota.c (decode_cmd_data) <case Q_XGETQSTAT>: Print fields
of struct xfs_dqstats in the structure order.
|
|
|
|
|
| |
Headers updated automatically using maint/update_copyright_years.sh
script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gcc_compat.h (ATTRIBUTE_FALLTHROUGH): New macro.
* block.c (block_ioctl): Use it instead of "fall through" comment.
* btrfs.c (btrfs_ioctl): Likewise.
* loop.c (loop_ioctl): Likewise.
* mtd.c (mtd_ioctl): Likewise.
* rtc.c (rtc_ioctl): Likewise.
* v4l2.c (v4l2_ioctl): Likewise.
* dm.c (dm_decode_values): Likewise.
* process.c (SYS_FUNC(ptrace)): Likewise.
* quota.c (decode_cmd_data): Likewise.
* ucopy.c (umovestr): Likewise.
* unwind.c (unwind_print_stacktrace, unwind_capture_stacktrace)):
Likewise.
* term.c (term_ioctl): Add ATTRIBUTE_FALLTHROUGH.
* ioctl.c (ioctl_decode) [ALPHA || POWERPC]: Likewise.
* m4/st_warn_cflags.m4 (gl_WARN_ADD): Add -Wimplicit-fallthrough=5.
* tests/ioctl_v4l2.c (init_v4l2_format): Reorganize the switch statement
without implicit fallthrough.
|
|
|
|
|
|
| |
Headers updated automatically with
maint/update_copyright_headers.sh -c
|
|
|
|
|
|
| |
* quota.c (struct xfs_dqblk): Change d_flags field's type from int8_t
to uint8_t.
(decode_cmd_data): Use PRINT_FIELD_FLAGS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a new header print_fields.h and move generic PRINT_FIELD_*
macros there.
* print_fields.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* netlink_sock_diag.c: Include "print_fields.h".
(PRINT_FIELD_U, PRINT_FIELD_X, PRINT_FIELD_COOKIE, PRINT_FIELD_FLAGS,
PRINT_FIELD_XVAL): Move to print_fields.h file.
* quota.c: Include "print_fields.h".
(PRINT_FIELD_D): Move to print_fields.h file.
(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* statx.c: Include "print_fields.h".
(PRINT_FIELD_U): Remove.
(SYS_FUNC(statx)): Update PRINT_FIELD_U callers.
* tests/quotactl.h: Include "print_fields.h".
* tests/quotactl-xfs.c: Update callers of PRINT_FIELD_* macros.
* tests/quotactl.c: Likewise.
(PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* tests/test_nlattr.h: Include "print_fields.h".
(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* tests/xstatx.c: Include "print_fields.h".
(PRINT_FIELD_U): Remove.
(print_stat): Update PRINT_FIELD_U callers.
* tests/tests.h [!STRACE_PRINTF] (STRACE_PRINTF): Define to printf.
|
|
|
|
| |
Reported by kernel's checkpatch.pl script.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove temporary types created for transition from long
to kernel_ulong_t.
Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'
* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Change the type of data argument
from unsigned long to kernel_ureg_t.
|
|
|
|
|
| |
* quota.c (PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): New macros.
(decode_cmd_data): Use them to print structure fields.
|
|
|
|
|
| |
* quota.c (SYS_FUNC(quotactl)): Move handling of Q_QUOTAON subcommand ...
(decode_cmd_data): ... here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support for these quota subcommands by linux kernels has been dropped
long time ago (between 2.5.16 and 2.5.17), so lets drop it in order
to minimize amount of code which should be subjected to testing and
structured conversion.
* quota.c (struct v1_dqblk, struct v2_dqblk, struct v2_dqinfo,
struct v1_dqstats, struct v2_dqstats): Remove.
(decode_cmd_data): Remove handling of Q_V1_GETQUOTA, Q_V1_SETQUOTA,
Q_V2_GETQUOTA, Q_V2_SETQUOTA, Q_V2_GETINFO, Q_V2_SETINFO, Q_V1_GETSTATS,
and Q_V2_GETSTATS subcommands.
(SYS_FUNC(quotactl)): Remove handling of Q_V1_QUOTAON subcommand.
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Add printing of d_rtb_hardlimit
and d_rtb_softlimit fields to struct xfs_dqblk printing code.
|
|
|
|
|
|
|
|
| |
Since the only difference between 32-bit and 64-bit environments
regarding this structure is its padding, lets just add packed attribute
to its definition instead of going full mpers.
* quota.c (struct if_dqblk): Add ATTRIBUTE_PACKED.
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Add Q_XQUOTARM handling to subcommand
switch.
|
|
|
|
|
|
|
|
| |
Q_XQUOTASYNC is no-op, but it does not require id/addr arguments anyway.
* quota.c (decode_cmd_data): Add Q_SYNC and Q_XQUOTASYNC to subcommand
dispatch switch since id/addr arguments for these subcommands are known
to be ignored.
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Print field names in accordance with
their definition.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As id argument is not used for Q_QUOTAOFF, Q_GETFMT, Q_V2_GETINFO,
Q_GETINFO, Q_V2_SEETINFO, Q_SETINFO, Q_SYNC, Q_XQUOTAON, Q_XQUOTAOFF,
Q_XQUOTARM, Q_XGETQSTAT, Q_XGETQSTATV, Q_XQUOTASYNC, Q_V1_GETSTATS, and
Q_V2_GETSTATS subcommands, do not print it for these subcommands.
* quota.c (decode_cmd_data): Add id argument parameter, add printing
of id argument for Q_GETQUOTA, Q_SETQUOTA, Q_GETNEXTQUOTA,
Q_V1_GETQUOTA, Q_V1_SETQUOTA, Q_V2_GETQUOTA, Q_V2_SETQUOTA,
Q_XGETQUOTA, Q_XGETNEXTQUOTA, Q_XSETQLIM, and unknown subcommands.
(SYS_FUNC(quotactl)): Remove printing of id argument, pass it
to decode_cmd_data.
|
|
|
|
|
|
| |
* quota.c (SYS_FUNC(quotactl)): Since id call argument is used for
user/group/project ID which all have special semantics for -1,
print it the same way as UIDs are printed.
|
|
|
|
|
| |
* quota.c (SYS_FUNC(quotactl)): Replace disjunction of two xlat values
(which also lacks shift of the left part) with QCMD macro call.
|
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Explicitly cast struct xfs_dqblk.d_flags
to uint8_t to avoid potential sign-extension bug when printing
invalid struct xfs_dqblk.d_flags.
|
|
|
|
|
| |
* quota.c (if_nextdqblk): New structure.
(decode_cmd_data): Handle Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA.
|
|
|
|
|
| |
* quota.c (fs_qfilestatv, fs_quota_statv): New structures.
(decode_cmd_data): Handle Q_XGETQSTATV case.
|
|
|
|
|
|
| |
* xlat/if_dqinfo_flags.in: New file.
* quota.c: Include "xlat/if_dqinfo_flags.h".
(decode_cmd_data): Print struct if_dqinfo.dqi_flags using printflags.
|
|
|
|
|
|
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Change return type to int.
Return 0 on entering Q_GETQUOTA, Q_V1_GETQUOTA, Q_V2_GETQUOTA,
Q_XGETQUOTA, Q_GETFMT, Q_GETINFO, Q_V2_GETINFO, Q_V1_GETSTATS,
Q_V2_GETSTATS, and Q_XGETQSTAT commands, return RVAL_DECODED
for any other command.
(SYS_FUNC(quotactl)): On entering, print third argument of any command.
For any command except Q_QUOTAON and Q_V1_QUOTAON, call decode_cmd_data
and forward its return value.
|
|
|
|
| |
* quota.c (SYS_FUNC(quotactl)): Print Q_QUOTAON 4th argument as a path.
|
|
|
|
|
| |
* quota.c (SYS_FUNC(quotactl)): Consistently print the third
argument using "%u" format.
|
|
|
|
| |
* quota.c (decode_cmd_data): Print xfs quota flags argument.
|
|
|
|
|
|
| |
* quota.c (decode_cmd_data): As quota format value and xfs quota flags
are in-memory constants, print it like an array of one element instead
of a structure.
|
|
|
|
|
| |
* util.c: Replace u_int{32,64} with uint{32,64}.
* quota.c: Replace u_int{8,16,32,64} with uint{8,16,32,64}.
|
|
|
|
|
|
|
|
|
|
| |
* quota.c (Q_*): Move to xlat/quotacmds.in.
(USRQUOTA, GRPQUOTA): Move to xlat/quotatypes.in.
(QFMT_VFS_OLD, QFMT_VFS_V0): Move to xlat/quota_formats.in.
(XFS_QUOTA_*): Move to xlat/xfs_quota_flags.in.
(XFS_*_QUOTA): Move to xlat/xfs_dqblk_flags.in.
(QIF_*): Move to xlat/if_dqblk_valid.in.
(IIF_*): Move to xlat/if_dqinfo_valid.in.
|
|
|
|
|
|
| |
* quota.c (decode_cmd_data): Use umove_or_printaddr.
(sys_quotactl): Do not disable the parser in verbose mode.
Decode all "set" commands on entering syscall.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce SYS_FUNC macro to declare and define all syscall parsers.
* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
|
|
|
|
| |
Suppress empty lines left after automated xlat conversion.
|
|
|
|
|
| |
Automatically convert xlat structures from *.c files to xlat/*.in files
using "./generate_xlat_in.sh *.c" command.
|
|
|
|
|
| |
Automatically update all xlat structures using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
|