aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/config/controlUnset.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/config/controlUnset.c')
-rw-r--r--hicn-light/src/hicn/config/controlUnset.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/hicn-light/src/hicn/config/controlUnset.c b/hicn-light/src/hicn/config/controlUnset.c
index 28507fbeb..e05ba2286 100644
--- a/hicn-light/src/hicn/config/controlUnset.c
+++ b/hicn-light/src/hicn/config/controlUnset.c
@@ -31,9 +31,15 @@
static void _controlUnset_Init(CommandParser *parser, CommandOps *ops);
static CommandReturn _controlUnset_Execute(CommandParser *parser,
- CommandOps *ops, PARCList *args);
+ CommandOps *ops,
+ PARCList *args,
+ char *output,
+ size_t output_size);
static CommandReturn _controlUnset_HelpExecute(CommandParser *parser,
- CommandOps *ops, PARCList *args);
+ CommandOps *ops,
+ PARCList *args,
+ char *output,
+ size_t output_size);
static const char *_commandUnset = "unset";
static const char *_commandUnsetHelp = "help unset";
@@ -60,18 +66,20 @@ static void _controlUnset_Init(CommandParser *parser, CommandOps *ops) {
static CommandReturn _controlUnset_HelpExecute(CommandParser *parser,
CommandOps *ops,
- PARCList *args) {
+ PARCList *args,
+ char *output,
+ size_t output_size) {
CommandOps *ops_help_unset_debug = controlUnsetDebug_HelpCreate(NULL);
-
- printf("Available commands:\n");
- printf(" %s\n", ops_help_unset_debug->command);
- printf("\n");
+ snprintf(output, output_size, "Available commands:\n %s\n\n", ops_help_unset_debug->command);
commandOps_Destroy(&ops_help_unset_debug);
return CommandReturn_Success;
}
static CommandReturn _controlUnset_Execute(CommandParser *parser,
- CommandOps *ops, PARCList *args) {
- return _controlUnset_HelpExecute(parser, ops, args);
+ CommandOps *ops,
+ PARCList *args,
+ char *output,
+ size_t output_size) {
+ return _controlUnset_HelpExecute(parser, ops, args, output, output_size);
}