vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 742d96ae0c9c985bb036f647dcb4c56479d992a9
parent 77feb8a7e49369856eb1fac75f402e7a2173d4ac
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Wed,  1 Sep 2010 23:39:53 +0200

-c option to start as a cpu server

Diffstat:
doc/9vx.1 | 8+++++++-
src/9vx/bootboot.ed | 1+
src/9vx/bootcode.9 | 0
src/9vx/conf.c | 6+++---
src/9vx/main.c | 3+++
5 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/9vx.1 b/doc/9vx.1 @@ -67,6 +67,12 @@ is not specified, the current user in the host operating system will be used. Other options are: .nr xx \w'\fL-m\f2name\ \ ' .TP \n(xxu +.BI -c +Start as a cpu(1) server (sets +.I init=/386/init -c +, see init(8) +) +.TP .BI -f Do not fork at init .TP @@ -74,7 +80,7 @@ Do not fork at init Do not start the gui .TP .BI -i -Run rc instead of init (sets +Run rc(1) instead of init (sets .I init=#Z/386/bin/rc ) .TP diff --git a/src/9vx/bootboot.ed b/src/9vx/bootboot.ed @@ -5,6 +5,7 @@ diff -e plan9/sys/src/9//boot/aux.c 9vx/sys/src/9//boot/aux.c diff -e plan9/sys/src/9//boot/boot.c 9vx/sys/src/9//boot/boot.c 154a Init: + cpuflag = (strcmp(getenv("service"), "cpu") == 0); . 92a if(localroot){ diff --git a/src/9vx/bootcode.9 b/src/9vx/bootcode.9 Binary files differ. diff --git a/src/9vx/conf.c b/src/9vx/conf.c @@ -176,9 +176,9 @@ printconfig(char *argv0){ print(argv0); if(inifile) print(" -p %s", inifile); - if(nofork | nogui | initrc | usetty) - print(" -%s%s%s%s", nofork ? "f " : "", nogui ? "g" : "", - initrc ? "i " : "", usetty ? "t " : ""); + if(cpuserver | nofork | nogui | initrc | usetty) + print(" -%s%s%s%s%s", cpuserver ? "c " : "", nofork ? "f " : "", + nogui ? "g" : "",initrc ? "i " : "", usetty ? "t " : ""); if(cpulimit != 0) print(" -l %d", cpulimit); if(memmb != 0) diff --git a/src/9vx/main.c b/src/9vx/main.c @@ -136,6 +136,9 @@ main(int argc, char **argv) case 'a': setmac(EARGF(usage())); break; + case 'c': + cpuserver = 1; + break; case 'f': nofork = 1; break;