minimal fake-key boot - galaxies only for now

This commit is contained in:
Joe Bryan 2018-09-15 01:39:13 -04:00
parent c058bae81c
commit 8fc65462b8
2 changed files with 19 additions and 5 deletions

View File

@ -375,6 +375,7 @@
# define c3__face c3_s4('f','a','c','e') # define c3__face c3_s4('f','a','c','e')
# define c3__fail c3_s4('f','a','i','l') # define c3__fail c3_s4('f','a','i','l')
# define c3__fair c3_s4('f','a','i','r') # define c3__fair c3_s4('f','a','i','r')
# define c3__fake c3_s4('f','a','k','e')
# define c3__fan c3_s3('f','a','n') # define c3__fan c3_s3('f','a','n')
# define c3__farg c3_s4('f','a','r','g') # define c3__farg c3_s4('f','a','r','g')
# define c3__fast c3_s4('f','a','s','t') # define c3__fast c3_s4('f','a','s','t')

View File

@ -1279,10 +1279,6 @@ _sist_eth_rpc(c3_c* url_c, u3_noun oct)
static u3_noun static u3_noun
_sist_dawn(void) _sist_dawn(void)
{ {
if ( c3y == u3_Host.ops_u.fak ) {
// XX generate fake keys, or use separate fake boot event
}
if ( 0 == u3_Host.ops_u.key_c ) { if ( 0 == u3_Host.ops_u.key_c ) {
// XX print nice error // XX print nice error
u3_lo_bail(); u3_lo_bail();
@ -1349,7 +1345,24 @@ u3_sist_boot(void)
// uL(fprintf(uH, "sist: booting\n")); // uL(fprintf(uH, "sist: booting\n"));
if ( c3y == u3_Host.ops_u.nuu ) { if ( c3y == u3_Host.ops_u.nuu ) {
u3_noun pig = _sist_dawn(); u3_noun pig;
if ( c3y == u3_Host.ops_u.fak ) {
// XX or who_c
u3_noun imp = u3i_string(u3_Host.ops_u.imp_c);
u3_noun whu = u3dc("slaw", 'p', u3k(imp));
if ( (u3_nul == whu) ) {
fprintf(stderr, "czar: incorrect format\r\n");
u3_lo_bail();
}
pig = u3nc(c3__fake, u3t(whu));
}
else {
pig = _sist_dawn();
}
_sist_make(pig); _sist_make(pig);
} }
else { else {