9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] better rio exit menu entry check
@ 2022-08-04 14:36 Jacob Moody
  2022-08-04 14:56 ` sirjofri
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jacob Moody @ 2022-08-04 14:36 UTC (permalink / raw)
  To: 9front

Checking for if the binary name contains .out always seemed a bit
like a hack. What I seem to want most of the time is for the
Exit option to show up on subrios, but not my "main" rio.
This patch does this by checking for an existing
rio mounted on /mnt/wsys.

diff 0541a434cb9cfd1a776f1ef29de3a8a7aa1d9b99 uncommitted
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -124,7 +124,7 @@
 	Image *i;
 	Rectangle r;

-	if(strstr(argv[0], ".out") == nil){
+	if(access("/mnt/wsys/wctl", AEXIST) != 0){
 		menu3str[Exit] = nil;
 		Hidden--;
 	}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-05  4:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 14:36 [9front] [PATCH] better rio exit menu entry check Jacob Moody
2022-08-04 14:56 ` sirjofri
2022-08-04 16:45 ` B. Atticus Grobe
2022-08-04 19:19   ` umbraticus
2022-08-04 20:18 ` qwx
2022-08-04 22:08   ` umbraticus
2022-08-05  4:55     ` qwx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).