]> git.ipfire.org Git - thirdparty/systemd.git/commit
coredump-context: several cleanups
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Oct 2025 00:30:33 +0000 (09:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Oct 2025 05:31:41 +0000 (14:31 +0900)
commit7df4841e9465a565d9a6b8260f86be59f89c8b4d
tree7551a873ef0bc828e4383ed4bb7c5352e5e82a77
parentd7755c9caf55da2df3969709840022619fe1d20b
coredump-context: several cleanups

- Renames Context to CoredumpContext.
- Renames enum meta_argv_t to MetadataField, and use the correct type at
  several pleaces, especially in loop.
- Parses argv (when invoked as kernel helper or with '--backtrace') or
  iov (when invoked through socket) and store values in the context.
  Previously we use the passed string as is, but let's make them in a
  type safe way.
- Stores received or built iovw in the context. Also store input fd and
  mountfs fd in the context.
- Introduces coredump_context_is_pid1() and _is_journald() helper
  functions.
- Adds COREDUMP_PIDFDID= field when the kernel passed pidfd of the
  crashed process.

No effective funtional change. Just refactoring.
src/coredump/coredump-backtrace.c
src/coredump/coredump-context.c
src/coredump/coredump-context.h
src/coredump/coredump-forward.h
src/coredump/coredump-kernel-helper.c
src/coredump/coredump-receive.c
src/coredump/coredump-send.c
src/coredump/coredump-send.h
src/coredump/coredump-submit.c
src/coredump/coredump-submit.h