register_commands_with_data() function
Register one or more commands, as register_commands(), plus specify a pointer to command private data that would be accessible through the macro CMD_DATA. The private data will not be freed when command is unregistered.
Arguments
cmd_ctx
The command_context in which to register the command.
cmd_prefix
Register this command as a child of this, or NULL to register a top-level command.
cmds
Pointer to an array of command_registration records that contains the desired command parameters. The last record must have NULL for all fields.
data
The command private data.
Return value
ERROR_OK on success; ERROR_FAIL if any registration fails.