add debug flag to command line and fix launcher script
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmFrCqIACgkQO3+8IhRO Y5h9DA/+Igl+PI9dQrQJxX1zO71VTVAXz4lIFjM/5mw1aupMJGezdp7+0f4kQnzr 1FNxueao2XQhdXwiABUesi2On4/QOvMTJmcFoHC+o+z0H/tYjoRuk6VJqHtRy3+i SctBe9ygeW2DUNGbc+2Sx4mixGunP0TziUc2Rywrehy0FjKOkBubYkl2XLqpVsE+ 2feU+0btVExtXpnxpRYvXwZojxgXivACb3xi1S5Ve6jZgwJOZjXyQ73DoW+eCA56 tbuTs7/iU2zOOoMqIeZaUNl6sqUh2EzAA3D7X1Kyb8Nsp40qwGRbx/EneuOWLjQH +rXK7XfcU50iXNn1CJHXdVzpBEj4Rzfi88lZBHG1yQfr2q3X6wRCupxn5XhoylvO ew2yde2tD6KjBaLusmTJpMgCRm+eBjW5irantnDpTs+KBRO7PKh2KO19zrHgcgxl 6JEYxQ3nE2rK3qq2TCPaDgAnGSH5LebOVWZAGDBmSmD8tav8fYZ5kNcxUQnppSo4 iDU+mgUyV32fnWQ6Zgabx1dcAf5ekHNU6NCM5/WIcGIfKq7NwAIbNt/A1RClz2Eg 13bs48GTyf53tS2xhf3wrh2E55+6VIsFU5+0S8oWU8Mv4rhQYrG+aqqKkPLJek5P ZYP1ca+9xf7BzLaBBDA/EK87GYWdEsGNfO7qFzFNIXV6UyqS1RU= =xdaJ -----END PGP SIGNATURE-----
2 files changed,
18 insertions(+),
5 deletions(-)
M
server/xrxs-srv.sh
→
server/xrxs-srv.sh
@@ -2,18 +2,25 @@ #!/bin/sh
PORT=5460 -if [ -z "${DISPLAY}"]; then +if [ -z "${DISPLAY}" ]; then export DISPLAY=:0 fi +seat=$(echo ${DISPLAY} | awk -F. '{print $1}') + +debug="" + case $1 in start) - ./xrxs -s xrxs & sleep 1 - 9pserve -c unix!/tmp/ns.$(whoami).${DISPLAY}/xrxs tcp!0.0.0.0!${PORT} & + if [ "$2" = "-d" ]; then + debug="-d" + fi + ./xrxs -s xrxs ${debug} & sleep 1 + 9pserve -c unix!/tmp/ns.$(whoami).${seat}/xrxs tcp!0.0.0.0!${PORT} & ;; stop) killall xrxs - rm /tmp/ns.$(whoami).${DISPLAY}/xrxs + rm /tmp/ns.$(whoami).${seat}/xrxs ;; *) echo "$0 start|stop"
M
server/xrxs.c
→
server/xrxs.c
@@ -17,7 +17,7 @@ #include "universe.h"
#include "realm.h" #include "user.h" -int chatty9p = 1; +int chatty9p = 0; static Tree* tree;@@ -603,6 +603,12 @@ } else if (scmp(argv[i], "-s")) {
usocket = argv[++i]; printf("serving socket namespace %s", usocket); } + } + } + + for (i = 0; i < argc; i++) { + if (scmp(argv[i], "-d")) { + chatty9p = 1; } }