From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 22454 invoked from network); 4 Aug 2022 14:38:29 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 4 Aug 2022 14:38:29 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Thu Aug 4 10:36:49 -0400 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1659623805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AszmW7MLemn1zF1Ng18xyKCchRT754cA8Vj3iyyBz9M=; b=LyMdY5NalYmh5QxWTEoxbYI5tx4J8wJw8/5thhme052Rs8zwyMEJx+yoWtOss4DT7BJ71W DXpg1pIQL+s929R1mQ0jIe6geO3skbKJ56SUPn50AZJKIJavu0bg8VUXumAfGRPk1/+WN6 RKH9H1pI4Wx0ik13Ncxz/E99KhoRcww= Received: from [192.168.168.200] (161-97-228-135.lpcnextlight.net [161.97.228.135]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id f37f5c22 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Thu, 4 Aug 2022 09:36:44 -0500 (CDT) Message-ID: <9009aa07-2c7a-9dee-7b3c-63bb01af31f9@posixcafe.org> Date: Thu, 4 Aug 2022 08:36:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: 9front@9front.org From: Jacob Moody Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: patented property-oriented metadata Subject: [9front] [PATCH] better rio exit menu entry check Reply-To: 9front@9front.org Precedence: bulk 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--; }