Skip to main content

crashlog_get_node_name

Function crashlog_get_node_name 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn crashlog_get_node_name( context: *mut CrashLogContext, node: *const Node, buffer: *mut c_uchar, buffer_size: usize, ) -> usize
Available on crate feature ffi only.
Expand description

Writes the name of the Crash Log Node in the buffer pointed by the buffer argument.

A maximum of buffer_size bytes are written into the buffer, including the trailing nul terminator.

Returns the amount of bytes required to store the full name of the register, including the nul terminator. Returns zero if an error occurred while accessing the name of the node.

ยงSafety

This must be called with a pointer to a CrashLogContext that was earlier obtained by calling the crashlog_init function.

The node pointer must be obtained using the crashlog_decode, crashlog_get_next_node_child, or the crashlog_get_node_by_path functions.

The buffer pointer must point to a writable memory region of buffer_size bytes.