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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15003 invoked from network); 18 Jul 2021 18:07:05 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 18 Jul 2021 18:07:05 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id 2B5442AECD for ; Sun, 18 Jul 2021 14:07:04 -0400 (EDT) (envelope-from bounce.mM6011c83bf34acbf24c11966a.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 215D72D988D2; Sun, 18 Jul 2021 14:07:04 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:to:message-id:mime-version:content-type :from:list-help:list-id:list-post:list-subscribe:reply-to :subject:content-transfer-encoding:list-unsubscribe; s=sysmsg-1; t=1626631623; bh=q4oHMNwc1BPfDnw1sdfp5wE2pJtpyCq9Iha3AUiBMyc=; b= AwY5uxEns7rCssvdDVbaBk745lEsGqc+OXFdGOW9dvBZe4PP9a0qXYq1Lgyah0sg BYJImmkiwQe2JtUtWojKy4COV27+lAf+rYWbqfZQLs3ErzR+Z0hDoKMgUWOJ9s7B Si4iAupnxcFK7ho50iWURtxdhYG5BKPd30ZZudckOfM= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1626631623; b=D/8ZoyqjZQ8TEgqj4SVTXHXiF/3OkPqcqKNje8Qib3wtma5OXq +yl8Z5R83VAdpJtb22FzeAj7dM9xN25TPxCrp/3ymgx5TeawGEJKGDOkWtEn/5Zw NEDbDVs1EC9u6Nq1Re2TS+uBIziVmwLTkeVIBHpNDv3bicqDAUlSZAi0M= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=date:to :message-id:mime-version:content-type:from:list-help:list-id :list-post:list-subscribe:reply-to:subject :content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=S9BgK7 WFm38yX8/9m2gWsOv5CgrO3xCbB5zGLOhhh40=; b=YYGuw2tMjqrLSjWLEyucg1 VOLN4NpABI1YpBsa0DVxkipyakdnHQETlVKxaAGXP1E2O7ebayjhGB959BFzVSEk q0U53CWOGOk8wprSdOX4jhoAIhakSwJIkfpvPSSD/BguNZzmBvAGycN9JJjWKE9b JtRf2cm57gMKD3dm8d86g= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id AFD942D98493 for <9fans@9fans.net>; Sun, 18 Jul 2021 14:06:48 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 3A351251736; Sun, 18 Jul 2021 14:06:48 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1626631608; b=NrVZuEXryiK6e1sQkCEIj57VLUXpaL1DBlixWfqDrhIxEoQ4ws Zi5F6KovVNDeostX1xlhKm77duSP3s7cDwHezXq0hcDGf/DB8H4hPuL1hPH6vzR/ 3A7avjus6piYeGlTUQ5D87U5S0vGRy+co4GWa+1qZbcr5sQ0iWOnlXmgTj9/01Eg hg43AHqzG7k3OxrBsOTXNi/75t/VsRtiWD7H+2Yto1ljUmfzDlqkvHTB2N+zuaso ftuyvjuP8WF9klYJ4Zvjq3mFgwHyAww4Gy/0hquQlcfvDUZt8LXQURu8C3Oz/ZsT nQJXTr2FTqvXwXOxxFRyZZ2L/ZwrLtbw6gbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:mime-version :content-type; s=arcseal; t=1626631608; bh=7KnD8M+LvPNLVET+Zcs8D GM0slod8KrehOUY08cv5J4=; b=eW9ZWlCIgxi17VqTx6jC1t6w8oAfsQOtBfC2q 2//HR+k9va4RzpOUuDbXrHTobnQOhsP82ffJtyM+uLq58ucVNEZ/VFYii+9bHHQo vXL8G+5W6ttbRzrX69h8ckx4eV9GR/F+bs3x4ys9qghDcb+Ay9Y00rlnWwIo/RxH WS+t/ehWfWDBkuwBiZameWPUXsb7fyFTGGEG5IVATGDONw+moEH07vRM8n0UwSY4 F+SUihRwj9jEmf87NmJJfbQFWOnyjv2aKrk8i6Wk+iPqmYdCg7b26rQEYyxE1Xtj 1B8FU59lCzeK1nFhZ+EPjyWpsDCTwnQ97BlgXp5rhz7E4pMBw== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=quarantine policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sdf.org; iprev=pass smtp.remote-ip=205.166.94.24 (mx.sdf.org); spf=pass smtp.mailfrom=adr@SDF.ORG smtp.helo=mx.sdf.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mx.sdf.org policy.ptr=mx.sdf.org; x-return-mx=pass header.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-return-mx=pass smtp.domain=sdf.org policy.is_org=yes (MX Records found: mx.sdf.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdekucdltddurdegudehrddttddmucetuf doteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgs shgtrhhisggvpdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenuc fjughrpeffhffvuffkgggtsehttdertddttddvnecuhfhrohhmpegrughruceorggurhes ufffhfdrqfftifeqnecuggftrfgrthhtvghrnhepvddtieelffevteevleelleeuhfeutd ehvdfhjedvfeduheeukeelhfeigfetveeinecukfhppedvtdehrdduieeirdelgedrvdeg pddvtdehrdduieeirdelgedrudeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehinhgvthepvddthedrudeiiedrleegrddvgedphhgvlhhopehmgidrshgufhdrohhr ghdpmhgrihhlfhhrohhmpeeorggurhesufffhfdrqfftifeq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sdf.org: 205.166.94.24 is authorized to use 'adr@SDF.ORG' in 'mfrom' identity (mechanism 'ip4:205.166.94.0/24' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="adr@SDF.ORG"; helo=mx.sdf.org; client-ip=205.166.94.24 Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 18 Jul 2021 14:06:48 -0400 (EDT) (envelope-from adr@SDF.ORG) Received: from sdf.org (IDENT:adr@sdf.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 16II6l75001583 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for <9fans@9fans.net>; Sun, 18 Jul 2021 18:06:47 GMT Received: from localhost (adr@localhost) by sdf.org (8.15.2/8.12.8/Submit) with ESMTP id 16II6k6h023315 for <9fans@9fans.net>; Sun, 18 Jul 2021 18:06:47 GMT Date: Sun, 18 Jul 2021 18:06:46 +0000 (UTC) To: 9fans@9fans.net Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format="flowed" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: ee4f4dac-e7f2-11eb-8d20-88de5200620f Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZjFlMjExZGFmODIzYzBlMC1NNjAxMWM4M2JmMzRhY2JmMjRjMTE5?= =?UTF-8?B?NjZhPg==?= From: "adr via 9fans" <9fans@9fans.net> List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] Command to set samterm label Content-Transfer-Encoding: quoted-printable List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M6011c83bf34acbf24c11966a:1:mzHdNvSBmoTZvb6ALXJ4DRbdW-6ehQR4AB1X3DJQ4iY Hi, I was hacking sam to set /dev/label to 'sam filename' when one is given to be opened but then I thought that it would be better to make samterm do it, so it'll work when using sam remotely. This patch adds a command 'l' to set the label, and sets it at startup as described above. Regards, adr. --- sys/src/cmd/sam/cmd.c Wed Apr 24 00:06:05 2013 +++ /sys/src/cmd/sam/cmd.c Sun Jul 18 18:23:06 2021 @@ -17,6 +17,7 @@ 'g', 0, 1, 0, 'p', aDot, 0, 0, g_c= md, 'i', 1, 0, 0, 0, aDot, 0, 0, i_c= md, 'k', 0, 0, 0, 0, aDot, 0, 0, k_c= md, + 'l', 0, 0, 0, 0, aNo, 0, linex, l_c= md, 'm', 0, 0, 1, 0, aDot, 0, 0, m_c= md, 'n', 0, 0, 0, 0, aNo, 0, 0, n_c= md, 'p', 0, 0, 0, 0, aDot, 0, 0, p_c= md, --- sys/src/cmd/sam/mesg.h Fri Mar 18 22:33:33 2005 +++ /sys/src/cmd/sam/mesg.h Sun Jul 18 18:25:36 2021 @@ -67,6 +67,7 @@ Hack, /* request acknowledgement */ Hexit, Hplumb, /* return plumb message to terminal - version 1 */ + Hlabel, /* change /dev/label */ HMAX, }Hmesg; typedef struct Header{ --- sys/src/cmd/sam/parse.h Thu Oct 27 15:36:34 2005 +++ /sys/src/cmd/sam/parse.h Sat Jul 17 19:55:51 2021 @@ -55,13 +55,12 @@ int nl_cmd(File*, Cmd*), a_cmd(File*, Cmd*), b_cmd(File*, Cmd*); int c_cmd(File*, Cmd*), cd_cmd(File*, Cmd*), d_cmd(File*, Cmd*); -int D_cmd(File*, Cmd*), e_cmd(File*, Cmd*); -int f_cmd(File*, Cmd*), g_cmd(File*, Cmd*), i_cmd(File*, Cmd*); -int k_cmd(File*, Cmd*), m_cmd(File*, Cmd*), n_cmd(File*, Cmd*); -int p_cmd(File*, Cmd*), q_cmd(File*, Cmd*); -int s_cmd(File*, Cmd*), u_cmd(File*, Cmd*), w_cmd(File*, Cmd*); -int x_cmd(File*, Cmd*), X_cmd(File*, Cmd*), plan9_cmd(File*, Cmd*); -int eq_cmd(File*, Cmd*); +int D_cmd(File*, Cmd*), e_cmd(File*, Cmd*), f_cmd(File*, Cmd*); +int g_cmd(File*, Cmd*), i_cmd(File*, Cmd*), k_cmd(File*, Cmd*); +int l_cmd(File*, Cmd*), m_cmd(File*, Cmd*), n_cmd(File*, Cmd*); +int p_cmd(File*, Cmd*), q_cmd(File*, Cmd*), s_cmd(File*, Cmd*); +int u_cmd(File*, Cmd*), w_cmd(File*, Cmd*), x_cmd(File*, Cmd*); +int X_cmd(File*, Cmd*), plan9_cmd(File*, Cmd*), eq_cmd(File*, Cmd*); String *getregexp(int); --- sys/src/cmd/sam/sam.c Tue Dec 6 17:05:45 2005 +++ /sys/src/cmd/sam/sam.c Sat Jul 17 17:01:44 2021 @@ -98,6 +98,8 @@ seq++; if(file.nused) current(file.filepptr[0]); + if(curfile) + outTS(Hlabel, &(curfile->name)); setjmp(mainloop); cmdloop(); trytoquit(); /* if we already q'ed, quitok will be TRUE */ --- sys/src/cmd/sam/xec.c Tue Jun 6 02:55:54 2000 +++ /sys/src/cmd/sam/xec.c Sat Jul 17 20:20:41 2021 @@ -154,6 +154,14 @@ } int +l_cmd(File *f, Cmd *cp) +{ + USED(f); + outTS(Hlabel, cp->ctext); + return TRUE; +} + +int m_cmd(File *f, Cmd *cp) { Address addr2; --- sys/src/cmd/samterm/mesg.c Thu Mar 29 19:35:49 2012 +++ /sys/src/cmd/samterm/mesg.c Sat Jul 17 20:28:26 2021 @@ -97,6 +97,7 @@ int i, m; long l; Flayer *lp; + char *str, c; m =3D inshort(0); l =3D inlong(2); @@ -106,6 +107,16 @@ default: fprint(2, "type %d\n", type); panic("rcv unknown"); + + case Hlabel: + str =3D (char *)indata; + if((i =3D open("/dev/label", OWRITE)) >=3D 0){ + while((c=3D*str) =3D=3D ' ' || c=3D=3D'\t') + str++; + fprint(i, "%s %s", "sam", str); + close(i); + } + break; case Hversion: hversion =3D m; ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tf1e211daf823c0e0-M6011c= 83bf34acbf24c11966a Delivery options: https://9fans.topicbox.com/groups/9fans/subscription