]> git.ipfire.org Git - thirdparty/util-linux.git/commit
getino: split operation type and namespace type
authorKarel Zak <kzak@redhat.com>
Tue, 26 May 2026 08:57:09 +0000 (10:57 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 27 May 2026 12:11:34 +0000 (14:11 +0200)
commit9e9c1ff84cf40ddf046205cc039b7d5ecc3a8628
tree829d2fd22fdb6996e1c8b68afffb0a34aead34ae
parentc906dbb72ed5fd8718beda367de883b41bc7ae1c
getino: split operation type and namespace type

Separate the single GETINO_* enum into two levels: a basic operation
type (GETINO_OP_PIDFS vs GETINO_OP_NAMESPACE) and a namespace sub-type
that directly indexes the ns_info[] array starting at 0.

This eliminates the IS_NAMESPACE_OP() macro, the get_pidfd_ns_ioctl()
and pidfd_get_nsfd_or_err() helper functions, and the unused pidfd_ioctl
field from getino_context. The dispatch in print_inode() now uses a
clean switch on ctx->op.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/getino.c