Commit a38ed6a0 authored by Gary Wong's avatar Gary Wong

Two fixes for geni_all.

Don't quote results in a couple of places where quotes are not
necessary.

Omit results from subcommands which report an error.
parent f3050960
......@@ -11986,22 +11986,24 @@ COMMAND_PROTOTYPE(dogeniall)
{ "manifest", getgenimanifest, 1 },
{ "control_mac", getgenicontrolmac, 1 },
{ "version", getgeniversion, 1 },
{ "getversion", getgenigetversion, 1 },
{ "sliverstatus", getgenisliverstatus, 1 }
{ "getversion", getgenigetversion, 0 },
{ "sliverstatus", getgenisliverstatus, 0 }
};
int i;
p = geni_append( buf, buf + sizeof buf, "{" );
for( i = 0; i < sizeof work / sizeof *work; i++ ) {
char *val;
char *val = work[ i ].func( reqp );
if( !val )
continue;
if( i )
p = geni_append( p, buf + sizeof buf, "," );
p = geni_quote( p, buf + sizeof buf, work[ i ].tag );
p = geni_append( p, buf + sizeof buf, ":" );
val = work[ i ].func( reqp );
p = ( work[ i ].quote ? geni_quote : geni_append )( p, buf + sizeof
buf, val );
free( val );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment