Adds input and output arguments for each operate call
Arguments are stored in the data field on USP_LIST_OPERATE
NOTE: Dynamic operates need to be recomplied when running libbbf
with this commit, hence the op_cmd struct has changed
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
- Fix memleak of not free'd json_tokener_parse memory
- Make read-only memory const
Note that this commit changes the operation input argument from
'char *' to 'json_object *', which breaks older dynamic_operate
implementations from outisde the bbf source tree.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
This implementation uses the currently running image as image number 1.
An OS dependent implementation with multi Firmware support will be
added in the future.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
- remove unused variables
- fix coding style of most function (Indentation, Tabulation, ..)
- check the source code using cppcheck tool
- change sprintf by snprintf