http://git.etherboot.org
/
people
/
mcb30
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd9399f
)
Added cmdl_show proof-of-concept
author
Michael Brown
<mcb30@etherboot.org>
Fri, 11 Aug 2006 18:40:27 +0000
(18:40 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Fri, 11 Aug 2006 18:40:27 +0000
(18:40 +0000)
src/core/settings.c
patch
|
blob
|
history
diff --git
a/src/core/settings.c
b/src/core/settings.c
index
20247dc
..
a7a708a
100644
(file)
--- a/
src/core/settings.c
+++ b/
src/core/settings.c
@@
-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;
+}
+