mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 10:02:32 +03:00
Merge pull request #1070 from urbit/remove-obsolete-arguments
removes obsolete CLI arguments
This commit is contained in:
commit
f89b02f8a1
@ -580,39 +580,37 @@
|
||||
*/
|
||||
typedef struct _u3_opts {
|
||||
c3_c* arv_c; // -A, initial sync from
|
||||
c3_c* dns_c; // -H, ames bootstrap domain
|
||||
c3_c* gen_c; // -G, czar generator
|
||||
c3_c* nam_c; // -n, unix hostname
|
||||
c3_o abo; // -a, abort aggressively
|
||||
c3_c* pil_c; // -B, bootstrap from
|
||||
c3_c* raf_c; // -r, raft flotilla
|
||||
c3_c* url_c; // -u, pill url
|
||||
c3_c* who_c; // -w, begin with ticket
|
||||
c3_c* key_c; // -K, private key file
|
||||
c3_o abo; // -a
|
||||
c3_o bat; // -b, batch create
|
||||
c3_o dem; // -d, daemon
|
||||
c3_o dry; // -D, dry compute
|
||||
c3_c* eth_c; // -e, ethereum node url
|
||||
c3_o etn; // -t, use snapshot exclusively to boot
|
||||
c3_c* ets_c; // -E, eth snapshot
|
||||
c3_c* fak_c; // -F, fake ship
|
||||
c3_o fog; // -X, skip last event
|
||||
c3_o gab; // -g, run with garbage collector
|
||||
c3_o has; // -S, Skip battery hashes
|
||||
c3_o git; // -s, pill url from arvo git hash
|
||||
c3_o mem; // -M, memory madness
|
||||
c3_o net; // -N, remote networking in -F mode
|
||||
c3_o nuu; // -c, new pier
|
||||
c3_o dry; // -D, dry compute, no checkpoint
|
||||
c3_o dem; // -d, daemon
|
||||
c3_c* ets_c; // -E, eth snapshot
|
||||
c3_c* eth_c; // -e, ethereum node url
|
||||
c3_c* fak_c; // -F, fake ship
|
||||
c3_w fuz_w; // -f, fuzz testing
|
||||
c3_c* gen_c; // -G, czar generator
|
||||
c3_o gab; // -g, test garbage collection
|
||||
c3_c* dns_c; // -H, ames bootstrap domain
|
||||
c3_w kno_w; // -K, kernel version
|
||||
c3_c* key_c; // -k, private key file
|
||||
c3_o net; // -L, local-only networking
|
||||
c3_s rop_s; // -l, raft port
|
||||
c3_c* nam_c; // -n, unix hostname
|
||||
c3_o pro; // -P, profile
|
||||
c3_s por_s; // -p, ames port
|
||||
c3_o qui; // -q, quiet
|
||||
c3_o rep; // -R, report build info
|
||||
c3_o tex; // -x, exit after loading
|
||||
c3_o veb; // -v, verbose (inverse of -q)
|
||||
c3_c* raf_c; // -r, raft flotilla
|
||||
c3_o has; // -S, Skip battery hashes
|
||||
c3_o git; // -s, pill url from arvo git hash
|
||||
c3_o etn; // -t, use snapshot exclusively to boot
|
||||
c3_c* url_c; // -u, pill url
|
||||
c3_o vno; // -V, replay without reboots
|
||||
c3_s por_s; // -p, ames port
|
||||
c3_s rop_s; // -l, raft port
|
||||
c3_w fuz_w; // -f, fuzz testing
|
||||
c3_w kno_w; // -k, kernel version
|
||||
c3_o veb; // -v, verbose (inverse of -q)
|
||||
c3_c* who_c; // -w, begin with ticket
|
||||
c3_o tex; // -x, exit after loading
|
||||
} u3_opts;
|
||||
|
||||
/* u3_host: entire host.
|
||||
|
74
vere/main.c
74
vere/main.c
@ -78,12 +78,10 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.dem = c3n;
|
||||
u3_Host.ops_u.dry = c3n;
|
||||
u3_Host.ops_u.etn = c3n;
|
||||
u3_Host.ops_u.fog = c3n;
|
||||
u3_Host.ops_u.gab = c3n;
|
||||
u3_Host.ops_u.git = c3n;
|
||||
u3_Host.ops_u.has = c3n;
|
||||
u3_Host.ops_u.net = c3n;
|
||||
u3_Host.ops_u.mem = c3n;
|
||||
u3_Host.ops_u.net = c3y;
|
||||
u3_Host.ops_u.nuu = c3n;
|
||||
u3_Host.ops_u.pro = c3n;
|
||||
u3_Host.ops_u.qui = c3n;
|
||||
@ -92,12 +90,12 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.veb = c3n;
|
||||
u3_Host.ops_u.kno_w = DefaultKernel;
|
||||
|
||||
while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:l:n:p:r:NabcdgqstvxMPDXRS")) != -1 ) {
|
||||
u3_Host.ops_u.rop_s = 0;
|
||||
u3_Host.ops_u.raf_c = 0;
|
||||
u3_Host.ops_u.nam_c = 0;
|
||||
|
||||
while ( (ch_i=getopt(argc, argv,"G:B:K:A:H:w:u:e:E:f:F:k:p:LabcdgqstvxPDRS")) != -1 ) {
|
||||
switch ( ch_i ) {
|
||||
case 'M': {
|
||||
u3_Host.ops_u.mem = c3y;
|
||||
break;
|
||||
}
|
||||
case 'B': {
|
||||
u3_Host.ops_u.pil_c = strdup(optarg);
|
||||
break;
|
||||
@ -139,10 +137,6 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.tex = c3y;
|
||||
break;
|
||||
}
|
||||
case 'X': {
|
||||
u3_Host.ops_u.fog = c3y;
|
||||
break;
|
||||
}
|
||||
case 'f': {
|
||||
if ( c3n == _main_readw(optarg, 100, &u3_Host.ops_u.fuz_w) ) {
|
||||
return c3n;
|
||||
@ -159,31 +153,17 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
u3_Host.ops_u.key_c = strdup(optarg);
|
||||
break;
|
||||
}
|
||||
case 'l': {
|
||||
if ( c3n == _main_readw(optarg, 65536, &arg_w) ) {
|
||||
return c3n;
|
||||
} else u3_Host.ops_u.rop_s = arg_w;
|
||||
break;
|
||||
}
|
||||
case 'n': {
|
||||
u3_Host.ops_u.nam_c = strdup(optarg);
|
||||
break;
|
||||
}
|
||||
case 'p': {
|
||||
if ( c3n == _main_readw(optarg, 65536, &arg_w) ) {
|
||||
return c3n;
|
||||
} else u3_Host.ops_u.por_s = arg_w;
|
||||
break;
|
||||
}
|
||||
case 'r': {
|
||||
u3_Host.ops_u.raf_c = strdup(optarg);
|
||||
break;
|
||||
}
|
||||
case 'R': {
|
||||
u3_Host.ops_u.rep = c3y;
|
||||
return c3y;
|
||||
}
|
||||
case 'N': { u3_Host.ops_u.net = c3y; break; }
|
||||
case 'L': { u3_Host.ops_u.net = c3n; break; }
|
||||
case 'a': { u3_Host.ops_u.abo = c3y; break; }
|
||||
case 'b': { u3_Host.ops_u.bat = c3y; break; }
|
||||
case 'c': { u3_Host.ops_u.nuu = c3y; break; }
|
||||
@ -209,27 +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;
|
||||
}
|
||||
|
||||
// XX revisit
|
||||
if ( (0 == u3_Host.ops_u.fak_c) && (c3y == u3_Host.ops_u.net) ) {
|
||||
// fprintf(stderr, "-N only makes sense with -F\n");
|
||||
u3_Host.ops_u.net = c3n;
|
||||
} else if ( (0 == u3_Host.ops_u.fak_c) && (c3n == u3_Host.ops_u.net) ) {
|
||||
u3_Host.ops_u.net = c3y; /* remote networking is always on in real mode. */
|
||||
}
|
||||
|
||||
if ( 0 != u3_Host.ops_u.fak_c ) {
|
||||
u3_Host.ops_u.has = c3y; /* no battery hashing 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;
|
||||
@ -258,11 +224,6 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.rop_s == 0 && u3_Host.ops_u.raf_c != 0 ) {
|
||||
fprintf(stderr, "The -r flag requires -l.\n");
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( c3y == u3_Host.ops_u.bat ) {
|
||||
u3_Host.ops_u.dem = c3y;
|
||||
u3_Host.ops_u.nuu = c3y;
|
||||
@ -365,33 +326,28 @@ u3_ve_usage(c3_i argc, c3_c** argv)
|
||||
"without the leading '~', and options is some subset of the following:\n",
|
||||
"\n",
|
||||
"-A dir Use dir for initial galaxy sync\n",
|
||||
"-b Batch create\n",
|
||||
"-B pill Bootstrap from this pill\n",
|
||||
"-b Batch create\n",
|
||||
"-c pier Create a new urbit in pier/\n",
|
||||
"-d Daemon mode\n",
|
||||
"-D Recompute from events\n",
|
||||
"-d Daemon mode\n",
|
||||
"-e url Ethereum gateway\n",
|
||||
"-F ship Fake keys; also disables networking\n",
|
||||
"-f Fuzz testing\n",
|
||||
"-g Set GC flag\n",
|
||||
"-K stage Start at Hoon kernel version stage\n",
|
||||
"-k keys Private key file\n",
|
||||
"-l port Initial peer port\n",
|
||||
"-M Memory madness\n",
|
||||
"-n host Set unix hostname\n",
|
||||
"-N Enable networking in fake mode (-F)\n",
|
||||
"-p ames_port Set the ames port to bind to\n",
|
||||
"-L local networking only\n",
|
||||
"-P Profiling\n",
|
||||
"-p ames_port Set the ames port to bind to\n",
|
||||
"-q Quiet\n",
|
||||
"-r host Initial peer address\n",
|
||||
"-R Report urbit build info\n",
|
||||
"-s Pill URL from arvo git hash\n",
|
||||
"-S Disable battery hashing\n",
|
||||
"-s Pill URL from arvo git hash\n",
|
||||
"-u url URL from which to download pill\n",
|
||||
"-v Verbose\n",
|
||||
"-w name Boot as ~name\n",
|
||||
"-x Exit immediately\n",
|
||||
"-Xwtf Skip last event\n",
|
||||
"\n",
|
||||
"Development Usage:\n",
|
||||
" To create a development ship, use a fakezod:\n",
|
||||
|
@ -1026,10 +1026,6 @@ _sist_rest()
|
||||
{
|
||||
fprintf(stderr, "replay: skipped veer\n");
|
||||
}
|
||||
else if ( c3y == u3_Host.ops_u.fog &&
|
||||
u3_nul == t_roe ) {
|
||||
fprintf(stderr, "replay: -Xwtf, skipped last event\n");
|
||||
}
|
||||
else {
|
||||
_sist_sing(u3k(ovo));
|
||||
fputc('.', stderr);
|
||||
|
Loading…
Reference in New Issue
Block a user