commit 1aaf87b74f88ed55a5916fe58205c4f37cee4e97
parent 9aec972edcfe3e011e1569b19b572830952670d9
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date: Mon, 21 Jun 2010 23:24:32 +0200
memsize option in 9vx.ini, man page
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/9vx.1 b/doc/9vx.1
@@ -72,6 +72,9 @@ Run rc instead of init
.BI -t
Use tty for input/output
.TP
+.BI -m " memsize"
+Memory size
+.TP
.BI -n " [ tap ] [ device ]"
Create virtual ethernet devices. The
.I tap
@@ -108,6 +111,7 @@ pairs in a similar fasion to plan9.ini(8). Available options are
.I nogui,
.I initrc,
.I usetty,
+.I memsize,
.I net,
.I macaddr,
.I localroot
diff --git a/src/9vx/main.c b/src/9vx/main.c
@@ -57,6 +57,7 @@ static char* inifile;
static char inibuf[BOOTARGSLEN];
static char *iniline[MAXCONF];
static int bootboot; /* run /boot/boot instead of bootscript */
+static int memsize; /* memory size */
static int nofork; /* do not fork at init */
static int initrc; /* run rc instead of init */
static int nogui; /* do not start the gui */
@@ -97,7 +98,6 @@ nop(void)
int
main(int argc, char **argv)
{
- int memsize;
int vetap;
char *vedev;
char buf[1024];
@@ -405,6 +405,8 @@ iniopt(char *name, char *value)
initrc = 1;
else if(strcmp(name, "nofork") == 0)
nofork = 1;
+ else if(strcmp(name, "memsize") == 0)
+ memsize = atoi(value);
else if(strcmp(name, "localroot") == 0 && !localroot)
localroot = value;
else if(strcmp(name, "user") == 0 && !username)