add debug flag to command line and fix launcher script
This commit is contained in:
parent
66241ad354
commit
df0c7b0219
2 changed files with 18 additions and 5 deletions
|
@ -2,18 +2,25 @@
|
||||||
|
|
||||||
PORT=5460
|
PORT=5460
|
||||||
|
|
||||||
if [ -z "${DISPLAY}"]; then
|
if [ -z "${DISPLAY}" ]; then
|
||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
seat=$(echo ${DISPLAY} | awk -F. '{print $1}')
|
||||||
|
|
||||||
|
debug=""
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
./xrxs -s xrxs & sleep 1
|
if [ "$2" = "-d" ]; then
|
||||||
9pserve -c unix!/tmp/ns.$(whoami).${DISPLAY}/xrxs tcp!0.0.0.0!${PORT} &
|
debug="-d"
|
||||||
|
fi
|
||||||
|
./xrxs -s xrxs ${debug} & sleep 1
|
||||||
|
9pserve -c unix!/tmp/ns.$(whoami).${seat}/xrxs tcp!0.0.0.0!${PORT} &
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
killall xrxs
|
killall xrxs
|
||||||
rm /tmp/ns.$(whoami).${DISPLAY}/xrxs
|
rm /tmp/ns.$(whoami).${seat}/xrxs
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$0 start|stop"
|
echo "$0 start|stop"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "realm.h"
|
#include "realm.h"
|
||||||
#include "user.h"
|
#include "user.h"
|
||||||
|
|
||||||
int chatty9p = 1;
|
int chatty9p = 0;
|
||||||
|
|
||||||
static Tree* tree;
|
static Tree* tree;
|
||||||
|
|
||||||
|
@ -606,6 +606,12 @@ void threadmain(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < argc; i++) {
|
||||||
|
if (scmp(argv[i], "-d")) {
|
||||||
|
chatty9p = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fs.foreground = 1;
|
fs.foreground = 1;
|
||||||
fs.tree = alloctree(nil, nil, DMDIR | 0777, fs_destroy_file);
|
fs.tree = alloctree(nil, nil, DMDIR | 0777, fs_destroy_file);
|
||||||
tree = fs.tree;
|
tree = fs.tree;
|
||||||
|
|
Loading…
Reference in a new issue