12 extern struct nvo_block *ugly_nvo_hack;
14 static int show_exec ( int argc, char **argv ) {
16 if ( ! ugly_nvo_hack ) {
17 printf ( "No non-volatile option storage available\n" );
21 hex_dump ( ugly_nvo_hack->options->data,
22 ugly_nvo_hack->options->len );
25 struct command show_command __command = {
28 .desc = "Show stored options",
32 static int set_exec ( int argc, char **argv ) {
34 struct dhcp_option *option;
36 if ( ! ugly_nvo_hack ) {
37 printf ( "No non-volatile option storage available\n" );
42 printf ( "Syntax: %s <option number> <option string>\n",
47 tag = strtoul ( argv[1], NULL, 0 );
48 option = set_dhcp_option ( ugly_nvo_hack->options, tag, argv[2],
51 printf ( "Could not set option %ld\n", tag );
55 if ( nvo_save ( ugly_nvo_hack ) != 0 ) {
56 printf ( "Could not save options to non-volatile storage\n" );
63 struct command set_command __command = {
65 .usage = "set <option number> <option string>\n",
66 .desc = "Set stored option",