Skip to content

Commit

Permalink
Added cmdl_show proof-of-concept
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown committed Aug 11, 2006
1 parent dd9399f commit 3c35a0b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/core/settings.c
Expand Up @@ -264,3 +264,23 @@ struct config_setting basic_config_settings[] __config_setting = {
.type = &config_setting_type_ipv4,
},
};



/* Quick and dirty proof of concept */
int cmdl_show ( int argc, char **argv ) {
char buf[256];
struct config_context dummy_context = { NULL };
int rc;

if ( argc < 2 )
return -EINVAL;

if ( ( rc = show_setting ( &dummy_context, argv[1],
buf, sizeof ( buf ) ) ) != 0 )
return rc;

printf ( "%s = %s\n", argv[1], buf );
return 0;
}

0 comments on commit 3c35a0b

Please sign in to comment.