|
@@ -264,3 +264,23 @@ struct config_setting basic_config_settings[] __config_setting = {
|
264
|
264
|
.type = &config_setting_type_ipv4,
|
265
|
265
|
},
|
266
|
266
|
};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+/* Quick and dirty proof of concept */
|
|
271
|
+int cmdl_show ( int argc, char **argv ) {
|
|
272
|
+ char buf[256];
|
|
273
|
+ struct config_context dummy_context = { NULL };
|
|
274
|
+ int rc;
|
|
275
|
+
|
|
276
|
+ if ( argc < 2 )
|
|
277
|
+ return -EINVAL;
|
|
278
|
+
|
|
279
|
+ if ( ( rc = show_setting ( &dummy_context, argv[1],
|
|
280
|
+ buf, sizeof ( buf ) ) ) != 0 )
|
|
281
|
+ return rc;
|
|
282
|
+
|
|
283
|
+ printf ( "%s = %s\n", argv[1], buf );
|
|
284
|
+ return 0;
|
|
285
|
+}
|
|
286
|
+
|