9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Jacob Moody <moody@mail.posixcafe.org>
To: 9front@9front.org
Subject: [9front] [PATCH] better rio exit menu entry check
Date: Thu, 4 Aug 2022 08:36:03 -0600	[thread overview]
Message-ID: <9009aa07-2c7a-9dee-7b3c-63bb01af31f9@posixcafe.org> (raw)

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--;
 	}

             reply	other threads:[~2022-08-04 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 14:36 Jacob Moody [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9009aa07-2c7a-9dee-7b3c-63bb01af31f9@posixcafe.org \
    --to=moody@mail.posixcafe.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).