mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-04 13:19:48 +03:00
refines -F argument handling
This commit is contained in:
parent
80b1d34aa6
commit
42c61039a4
13
vere/main.c
13
vere/main.c
@ -189,20 +189,13 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
}
|
||||
|
||||
u3_Host.ops_u.who_c = strdup(u3_Host.ops_u.fak_c);
|
||||
u3_Host.ops_u.has = c3y; /* no battery hashing on fake ships. */
|
||||
u3_Host.ops_u.net = c3n; /* no networking on fake ships. */
|
||||
u3_Host.ops_u.nuu = c3y;
|
||||
}
|
||||
|
||||
c3_t imp_t = ( (0 != u3_Host.ops_u.who_c) && (4 == strlen(u3_Host.ops_u.who_c)) );
|
||||
|
||||
if ( (0 != u3_Host.ops_u.fak_c) && (c3n == u3_Host.ops_u.nuu) ) {
|
||||
fprintf(stderr, "-F only makes sense on initial boot\n");
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( 0 != u3_Host.ops_u.fak_c ) {
|
||||
u3_Host.ops_u.has = c3y; /* no battery hashing on fake ships. */
|
||||
u3_Host.ops_u.net = c3n; /* no networking on fake ships. */
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.arv_c != 0 && !imp_t ) {
|
||||
fprintf(stderr, "-A only makes sense when creating a new galaxy\n");
|
||||
return c3n;
|
||||
|
Loading…
Reference in New Issue
Block a user