libtracefs: Add tracefs_mapped_is_supported() API

Add tracefs_mapped_is_supported() which returns true if tracefs mapping is
supported and false if it is not or an error occurred.

This is useful so that an application can decide to do things differently if
mapping is supported or not.

Link: https://lore.kernel.org/linux-trace-devel/20240110030116.81837-7-rostedt@goodmis.org

Cc: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
4 files changed