Control requests
system_ctrl_alloc_reply_data - Control requests
Allocates or frees the reply data buffer. This function acts as realloc(), i.e. it changes the size of an already allocated buffer, or frees it if size is set to 0.
int system_ctrl_alloc_reply_data(ctrl_request* req, size_t size, void* reserved);
reqis the request passed toctrl_request_custom_handlersizeis the number of byes to allocatereservedmust be set tonullptr(0)
The return value is a system error constant; 0 if successful.
If the allocation is successful, fill in req->reply_data with the data to reply with.