ref: 3b3c0cd02a24e834336f2b11bcd02a49274cfc02
parent: 6756c09c6110f6601c65f48fdfc375bbe52f93ce
author: Michael Forney <mforney@mforney.org>
date: Wed Apr 20 17:12:41 EDT 2022
tweak options for compatibility with 9front boot scripts Rename -s to -n, since we need -s for 9p over stdio. Use -f instead of non-option dev operand.
--- a/main.c
+++ b/main.c
@@ -14,6 +14,7 @@
int nproc;
char *forceuser;
char *srvname = "gefs";
+char *dev;
int cachesz = 512*MiB;
vlong
@@ -105,7 +106,7 @@
static void
usage(void)
{
- fprint(2, "usage: %s [-rA] [-m mem] [-s srv] [-u usr] [-a net]... dev\n", argv0);
+ fprint(2, "usage: %s [-rA] [-m mem] [-n srv] [-u usr] [-a net]... -f dev\n", argv0);
exits("usage");
}
@@ -131,7 +132,7 @@
case 'd':
debug++;
break;
- case 's':
+ case 'n':
srvname = EARGF(usage());
break;
case 'A':
@@ -140,11 +141,14 @@
case 'u':
forceuser = EARGF(usage());
break;
+ case 'f':
+ dev = EARGF(usage());
+ break;
default:
usage();
break;
}ARGEND;
- if(argc == 0)
+ if(dev == nil)
usage();
/*
@@ -172,11 +176,11 @@
if(nproc > nelem(fs->active))
nproc = nelem(fs->active);
if(ream){
- reamfs(argv[0]);
+ reamfs(dev);
exits(nil);
}
- loadfs(argv[0]);
+ loadfs(dev);
fs->syncrz.l = &fs->synclk;
fs->rdchan = mkchan(32);