From cse.psu.edu!9fans-admin Thu Nov 1 00:10:29 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 00:10:29 JST 2001 Received: (qmail 29634 invoked by uid 1020); 1 Nov 2001 00:10:29 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 29630 invoked from network); 1 Nov 2001 00:10:28 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 00:10:28 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1B67019A02; Wed, 31 Oct 2001 10:10:13 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 240A8199EC for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 10:09:19 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15ywv0-0003r3-00 for 9fans@cse.psu.edu; Wed, 31 Oct 2001 15:04:38 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Matt Senecal Message-ID: <9rp3to$id4$1@newpoisson.nosc.mil> Organization: SPAWAR Systems Center, San Diego, CA 92147 References: Subject: [9fans] Re: Want to learn more about "Plan 9" Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 15:04:24 GMT Hi! I'm a newbie, too, with a lot to learn still. The following sites have been most helpful to me: First and foremost, this newsgroup: comp.os.plan9 The official Plan 9 site: http://plan9.bell-labs.com/plan9dist/ Yahoo lists several good Plan 9 sites: http://dir.yahoo.com/Computers_and_Internet/Software/Operating_Systems/Plan_ 9/ Open Directory lists some good sites, too: http://dmoz.org/Computers/Software/Operating_Systems/Network/Plan_9/ A great intro paper is at: http://plan9.bell-labs.com/sys/doc/9.pdf Other really good papers are at: http://plan9.bell-labs.com/sys/doc/ I found some good introductory links at this wiki: http://c2.com/cgi/wiki?PlanNineFromBellLabs "Virgil" wrote in message news:bb2c8038.0110310558.3b54cac8@posting.google.com... > I'm a newbie and want to learn more about "Plan 9". Could anybody tell > me where to find the resources ? From cse.psu.edu!9fans-admin Thu Nov 1 01:21:33 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 01:21:33 JST 2001 Received: (qmail 30292 invoked by uid 1020); 1 Nov 2001 01:21:33 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 30288 invoked from network); 1 Nov 2001 01:21:33 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 01:21:33 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A560E19A05; Wed, 31 Oct 2001 11:21:14 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 54FC6199EC for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 11:20:42 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15yxt8-0006M7-00 for 9fans@cse.psu.edu; Wed, 31 Oct 2001 16:06:46 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Matt Senecal Message-ID: <50ecc828.0110310710.4eda536d@posting.google.com> Organization: http://groups.google.com/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit References: <9rmnr3$t7d$1@newpoisson.nosc.mil>, Subject: Re: [9fans] CD-ROM drive that plugs into SoundBlaster? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 16:06:03 GMT I haven't a clue. The drive was a hand-me-down that came attached to the SB card, and I have yet to ID it. > Is the SB16 just acting as a SCSI controller? I had a Pro Audio > Spectrum 16 sound card that worked that way with an old SCSI 2X CD-ROM > for a 486-66 From cse.psu.edu!9fans-admin Thu Nov 1 03:25:31 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 03:25:31 JST 2001 Received: (qmail 31083 invoked by uid 1020); 1 Nov 2001 03:25:32 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 31079 invoked from network); 1 Nov 2001 03:25:31 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 03:25:31 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 569EE199F2; Wed, 31 Oct 2001 13:25:13 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 5CB8E199BB for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 13:24:25 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15yzrg-0002SS-00 for 9fans@cse.psu.edu; Wed, 31 Oct 2001 18:13:24 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3BE038E9.6AC0BD50@null.net> Organization: U.S. Army Research Laboratory Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <20011029123819.DCCD7199E4@mail.cse.psu.edu>, , Subject: Re: [9fans] Virtual memory in BSD and Plan9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 18:12:53 GMT One big difference I've seen in past examples of paging systems can be summarized as: page against everyone vs. page only against oneself. The latter is sometimes called the "working set" model. The former tends to make the whole system unusable when a process lets its address space get out of control, while the latter tends to run other processes pretty much the same under such conditions. From cse.psu.edu!9fans-admin Thu Nov 1 03:26:05 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 03:26:05 JST 2001 Received: (qmail 31098 invoked by uid 1020); 1 Nov 2001 03:26:05 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 31094 invoked from network); 1 Nov 2001 03:26:05 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 03:26:05 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3419319A06; Wed, 31 Oct 2001 13:25:37 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id AA671199BB for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 13:24:28 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15yzrg-0002SY-00 for 9fans@cse.psu.edu; Wed, 31 Oct 2001 18:13:24 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3BE03988.D24110C@null.net> Organization: U.S. Army Research Laboratory Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <9rmnr3$t7d$1@newpoisson.nosc.mil>, Subject: Re: [9fans] CD-ROM drive that plugs into SoundBlaster? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 18:13:08 GMT Ian Cooper wrote: > Is the SB16 just acting as a SCSI controller? There have been three SB16 CD-ROM interfaces of which I am aware: a Toshiba-specific I/F, an IDE I/F, and a SCSI I/F. Generally speaking these require special drivers and have thus not been widely supported by non-Microsoft OSes. From cse.psu.edu!9fans-admin Thu Nov 1 05:22:30 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 05:22:30 JST 2001 Received: (qmail 31956 invoked by uid 1020); 1 Nov 2001 05:22:29 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 31952 invoked from network); 1 Nov 2001 05:22:29 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 05:22:29 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 73AB1199FA; Wed, 31 Oct 2001 15:22:15 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from math.psu.edu (leibniz.math.psu.edu [146.186.130.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id EBCFD199DD for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 15:21:27 -0500 (EST) Received: from augusta.math.psu.edu (augusta.math.psu.edu [146.186.132.2]) by math.psu.edu (8.9.3/8.9.3) with ESMTP id PAA05323 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 15:21:27 -0500 (EST) From: Dan Cross Received: (from cross@localhost) by augusta.math.psu.edu (8.9.3+Sun/8.9.3) id PAA15416; Wed, 31 Oct 2001 15:21:27 -0500 (EST) Message-Id: <200110312021.PAA15416@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] Virtual memory in BSD and Plan9 Newsgroups: comp.os.plan9 In-Reply-To: <3BE038E9.6AC0BD50@null.net> References: <20011029123819.DCCD7199E4@mail.cse.psu.edu> Organization: Mememememememmeme Cc: Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 15:21:27 -0500 (EST) In article <3BE038E9.6AC0BD50@null.net> you write: >One big difference I've seen in past examples of paging systems >can be summarized as: page against everyone vs. page only against >oneself. The latter is sometimes called the "working set" model. >The former tends to make the whole system unusable when a process >lets its address space get out of control, while the latter tends >to run other processes pretty much the same under such conditions. Forsyth wrote an interesting paper years back called something along the lines of, ``Sending Unix to the Fat Farm,'' wherein he details his experience replacing various parts of the SunOS 3 kernel in an effort to simplify the overall system. Of particular interest was his replacement of the whole-system paging scheme inherited from 4BSD with one based on the working set model. Apparantly, the system performed much more gracefully under load as a result, in addition to being far simpler and more maintainable. One of the things that bothers me about the Linux and BSD camps is that they don't learn from such experiences of the past, and instead forge ahead with the status quo that they've inherited. For instance, the idea that Plan 9 would port one of the BSD paging subsystems is ridiculous for the same reason that the idea of porting the sockets subsystem is ridiculous; the system simply doesn't need it, it wouldn't mesh well with the overall architecture, and possibly better solutions exist in the literature. In this specific case, the subtle nuances that Dyson describes in the FreeBSD paging code are precisely the sort of thing that Plan 9 does to great lengths to avoid. Perhaps this could be accurately summed up as, ``what works for one group of people is not necessarily appropriate for all groups.'' - Dan C. From cse.psu.edu!9fans-admin Thu Nov 1 11:47:35 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 11:47:35 JST 2001 Received: (qmail 4830 invoked by uid 1020); 1 Nov 2001 11:47:35 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 4826 invoked from network); 1 Nov 2001 11:47:34 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 11:47:34 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B8B48199F2; Wed, 31 Oct 2001 21:47:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from euryale.inf.ufsc.br (euryale.inf.ufsc.br [150.162.60.23]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8C328199BB for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 21:46:36 -0500 (EST) Received: from juno (juno.inf.ufsc.br [150.162.60.3]) by euryale.inf.ufsc.br (8.11.3/8.11.3) with ESMTP id fA13lV854004 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 00:47:32 -0300 From: Carlos Eduardo Lenz X-Sender: lenz@juno To: 9fans@cse.psu.edu Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] SB16 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 01:42:14 -0200 (EDT) My laptop allows to enable SB16 compatibility for the VIA soundcard in the bios. I enabled it in plan9.ini, with the dma,irq, etc set in the bios. But it gives the error msg: #A: model 0x03 0x02: not SB16 compatible (or something similar). Found that devsound.c tests for major=0x03 and minor=0x01. So I need to know if I can just add another test that fits my config or my card isn't really supported? thanks, Carlos E Lenz lenz@inf.ufsc.br From cse.psu.edu!9fans-admin Thu Nov 1 11:58:21 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 11:58:21 JST 2001 Received: (qmail 5093 invoked by uid 1020); 1 Nov 2001 11:58:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5089 invoked from network); 1 Nov 2001 11:58:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 11:58:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id DC88F19A05; Wed, 31 Oct 2001 21:58:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from granite.cias.osakafu-u.ac.jp (granite.cias.osakafu-u.ac.jp [157.16.101.69]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 91311199DD for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 21:57:12 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] SB16 From: okamoto@granite.cias.osakafu-u.ac.jp MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-qmziaoafgwziutkshhdqjdxftq" Message-Id: <20011101025712.91311199DD@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 11:57:14 +0900 This is a multi-part message in MIME format. --upas-qmziaoafgwziutkshhdqjdxftq Content-Disposition: inline Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit >My laptop allows to enable SB16 compatibility for the VIA soundcard in Is that really sb16 compatible, not 'sbpro'? Kenji --upas-qmziaoafgwziutkshhdqjdxftq Content-Type: message/rfc822 Content-Disposition: inline Received: from granite.cias.osakafu-u.ac.jp ([192.168.1.3]) by diabase; Thu Nov 1 11:47:52 JST 2001 Received: from elmo.cias.osakafu-u.ac.jp (elmo.cias.osakafu-u.ac.jp [157.16.103.2]) by granite.cias.osakafu-u.ac.jp (8.9.3/8.9.3) with ESMTP id LAA13501; Thu, 1 Nov 2001 11:46:35 +0900 Received: from mail.cse.psu.edu (postfix@psuvax1.cse.psu.edu [130.203.4.6]) by elmo.cias.osakafu-u.ac.jp (8.9.3/3.7W-01101619) with ESMTP id LAA29131; Thu, 1 Nov 2001 11:47:34 +0900 (JST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B8B48199F2; Wed, 31 Oct 2001 21:47:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from euryale.inf.ufsc.br (euryale.inf.ufsc.br [150.162.60.23]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8C328199BB for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 21:46:36 -0500 (EST) Received: from juno (juno.inf.ufsc.br [150.162.60.3]) by euryale.inf.ufsc.br (8.11.3/8.11.3) with ESMTP id fA13lV854004 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 00:47:32 -0300 From: Carlos Eduardo Lenz X-Sender: lenz@juno To: 9fans@cse.psu.edu Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] SB16 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 01:42:14 -0200 (EDT) My laptop allows to enable SB16 compatibility for the VIA soundcard in the bios. I enabled it in plan9.ini, with the dma,irq, etc set in the bios. But it gives the error msg: #A: model 0x03 0x02: not SB16 compatible (or something similar). Found that devsound.c tests for major=0x03 and minor=0x01. So I need to know if I can just add another test that fits my config or my card isn't really supported? thanks, Carlos E Lenz lenz@inf.ufsc.br --upas-qmziaoafgwziutkshhdqjdxftq-- From cse.psu.edu!9fans-admin Thu Nov 1 12:15:25 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 12:15:25 JST 2001 Received: (qmail 5496 invoked by uid 1020); 1 Nov 2001 12:15:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5491 invoked from network); 1 Nov 2001 12:15:24 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 12:15:24 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 9FB1819A05; Wed, 31 Oct 2001 22:15:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtpzilla5.xs4all.nl (smtpzilla5.xs4all.nl [194.109.127.141]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3DD60199DD for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 22:14:52 -0500 (EST) Received: from micron (213-84-71-105.adsl.xs4all.nl [213.84.71.105]) by smtpzilla5.xs4all.nl (8.12.0/8.12.0) with ESMTP id fA13EoKb026656 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 04:14:50 +0100 (CET) Received: from wstan by micron with local (Exim 3.32 #1 (Debian)) id 15z8Jd-0000lW-00 for <9fans@cse.psu.edu>; Thu, 01 Nov 2001 04:14:49 +0100 From: "William S." To: 9fans@cse.psu.edu Message-ID: <20011101041449.A894@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i Subject: [9fans] 3COM NIC Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu X-Reply-To: wilby98@yahoo.com List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 04:14:49 +0100 Just a quick question. Would the 3Com 3C905B-TX PCI NIC card be a good choice for a Plan9 system? Anything better? The 3C589 doesn't seem to be offered anymore. Bill Amsterdam, NL From cse.psu.edu!9fans-admin Thu Nov 1 12:28:29 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 12:28:29 JST 2001 Received: (qmail 5756 invoked by uid 1020); 1 Nov 2001 12:28:29 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5752 invoked from network); 1 Nov 2001 12:28:29 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 12:28:29 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1BC5C19A06; Wed, 31 Oct 2001 22:28:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 97C41199E7 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 22:27:19 -0500 (EST) From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] 3COM NIC MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011101032719.97C41199E7@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 22:27:16 -0500 The 3C589 is a PCMCIA card, the 3C905B is a PCI card, they're not really equivalent. The 3C905B will work OK with Plan 9, as does the 3C589 Megahertz equivalent (sorry, I don't remember the exact model number). On Wed Oct 31 22:15:21 EST 2001, wstan@REMOVE.xs4all.nl wrote: > Just a quick question. Would the > 3Com 3C905B-TX PCI NIC card be a good choice > for a Plan9 system? Anything better? > The 3C589 doesn't seem to be offered > anymore. > > Bill > Amsterdam, NL From cse.psu.edu!9fans-admin Thu Nov 1 12:51:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 12:51:22 JST 2001 Received: (qmail 6117 invoked by uid 1020); 1 Nov 2001 12:51:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 6113 invoked from network); 1 Nov 2001 12:51:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 12:51:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 41E3519A05; Wed, 31 Oct 2001 22:51:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.WPI.EDU (smtp.WPI.EDU [130.215.24.62]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 0B4B819A00 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 22:51:00 -0500 (EST) Received: from grover.wpi.edu (ian@grover.WPI.EDU [130.215.25.67]) by smtp.WPI.EDU (8.12.2.Beta0/8.12.2.Beta0) with ESMTP id fA13oxAO022105 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 22:50:59 -0500 (EST) From: Ian Cooper To: <9fans@cse.psu.edu> Subject: Re: [9fans] 3COM NIC In-Reply-To: <20011101041449.A894@xs4all.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 22:50:59 -0500 (EST) > The 3C589 doesn't seem to be offered > anymore. Isn't the 3c589 a PCMCIA card? From cse.psu.edu!9fans-admin Thu Nov 1 13:22:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 13:22:24 JST 2001 Received: (qmail 6791 invoked by uid 1020); 1 Nov 2001 13:22:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 6787 invoked from network); 1 Nov 2001 13:22:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 13:22:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id CFA5F19A04; Wed, 31 Oct 2001 23:22:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from dirty.research.bell-labs.com (dirty.research.bell-labs.com [204.178.16.6]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 1F61C199DD for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 23:21:23 -0500 (EST) Received: from bronx.dnrc.bell-labs.com ([135.180.160.8]) by dirty; Wed Oct 31 23:21:17 EST 2001 Received: from mill.dnrc.belllabs.com (dharani.lra.lucent.com [135.255.41.66]) by bronx.dnrc.bell-labs.com (8.9.3/8.9.3) with SMTP id XAA03043 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 23:20:38 -0500 (EST) Message-ID: <000d01c1628c$9cdf2de0$4229ff87@dnrc.belllabs.com> From: "Dharani Vilwanathan" To: <9fans@cse.psu.edu> References: <20011101032719.97C41199E7@mail.cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Subject: [9fans] cpu/auth/fs Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 23:20:59 -0500 I am trying to build a Plan9 cpu/auth/file server (all in a single box). Is it possible? At the end of the document titled "Installing the Plan 9 Distribution", it says: "The kfs patches are currently being soaked and may appear before long." Are the details available? Can someone tell me how I can do it? Thanks dharani ----- Original Message ----- From: To: <9fans@cse.psu.edu> Sent: Wednesday, October 31, 2001 10:27 PM Subject: Re: [9fans] 3COM NIC > The 3C589 is a PCMCIA card, the 3C905B is a PCI card, they're > not really equivalent. The 3C905B will work OK with Plan 9, as > does the 3C589 Megahertz equivalent (sorry, I don't remember the > exact model number). > > On Wed Oct 31 22:15:21 EST 2001, wstan@REMOVE.xs4all.nl wrote: > > Just a quick question. Would the > > 3Com 3C905B-TX PCI NIC card be a good choice > > for a Plan9 system? Anything better? > > The 3C589 doesn't seem to be offered > > anymore. > > > > Bill > > Amsterdam, NL From cse.psu.edu!9fans-admin Thu Nov 1 13:32:26 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 13:32:26 JST 2001 Received: (qmail 7032 invoked by uid 1020); 1 Nov 2001 13:32:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 7028 invoked from network); 1 Nov 2001 13:32:25 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 13:32:25 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A9F0719A08; Wed, 31 Oct 2001 23:32:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from cosym.net (peter.sys.9srv.net [64.7.3.116]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 0E609199E7 for <9fans@cse.psu.edu>; Wed, 31 Oct 2001 23:31:02 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] cpu/auth/fs From: anothy@cosym.net MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Message-Id: <20011101043102.0E609199E7@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Oct 2001 23:30:45 -0500 i believe the kfs patches to allow a cpu server to also act as a file server (minus dumps, of course) are in the normal distribution now (i'm using them, and i _think_ that's where i got them from). it's pretty easy (the fs part is, anyway). set up the cpu server as normal, and just add the lines: disk/kfscmd 'listen il!*!17008' disk/kfscmd 'listen tcp!*!564' to /rc/bin/cpurc, and it'll listen on the normal file server ports and serve authenticated access to your kfs file system. i _think_ that's what you're asking for. auth servers can be a bit complicated to set up, but there isn't really anything _tricky_ about them, and i think the documentation's sufficient. if you run into problems there, let us (or me) know. ã‚¢ From cse.psu.edu!9fans-admin Thu Nov 1 18:58:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 18:58:22 JST 2001 Received: (qmail 14670 invoked by uid 1020); 1 Nov 2001 18:58:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 14666 invoked from network); 1 Nov 2001 18:58:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 18:58:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 0670819A04; Thu, 1 Nov 2001 04:58:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 65C7E199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 04:57:49 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zET7-0002Am-00 for 9fans@cse.psu.edu; Thu, 01 Nov 2001 09:49:01 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Randolph Fritz Message-ID: Organization: PANIX Public Access Internet and UNIX, NYC References: <20011025124551.4A1E1199B5@mail.cse.psu.edu> Subject: Re: [9fans] Plan 9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu X-Reply-To: randolph@panix.com List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 09:47:11 GMT ...lurklurklurk... In article <20011025124551.4A1E1199B5@mail.cse.psu.edu>, rob pike wrote: > The original reason behind Plan 9 is still the most important and, > unfortunately, is largely obscured by the need to make a distribution > and the desire for individuals to run it on PCs: a shared environment. > [...] > Plan9 is, in other words, a platform for ubiquitous, collaborative computing. This, I think, reflects the social environment of Bell Labs. Whether or not this is a model worth pursuing in other contexts is left as an exercise for the student... Randolph ...lurklurklurk... From cse.psu.edu!9fans-admin Thu Nov 1 19:03:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 19:03:22 JST 2001 Received: (qmail 14747 invoked by uid 1020); 1 Nov 2001 19:03:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 14743 invoked from network); 1 Nov 2001 19:03:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 19:03:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 76EFB19A06; Thu, 1 Nov 2001 05:03:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C9F7B199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 05:02:37 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zET7-0002Ag-00 for 9fans@cse.psu.edu; Thu, 01 Nov 2001 09:49:01 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Matt Senecal Message-ID: <9rpgri$ler$1@newpoisson.nosc.mil> Organization: SPAWAR Systems Center, San Diego, CA 92147 References: <9rmnr3$t7d$1@newpoisson.nosc.mil>, , <3BE03988.D24110C@null.net> Subject: Re: [9fans] CD-ROM drive that plugs into SoundBlaster? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 09:46:52 GMT Ok, here's what I've found out: the card I've got has a Panasonic/MKE interface, and the drive plugged into it can only be run through that interface. Looks like I'm out of luck! "Douglas A. Gwyn" wrote in message news:3BE03988.D24110C@null.net... > Ian Cooper wrote: > > Is the SB16 just acting as a SCSI controller? > > There have been three SB16 CD-ROM interfaces of which I > am aware: a Toshiba-specific I/F, an IDE I/F, and a SCSI > I/F. Generally speaking these require special drivers and > have thus not been widely supported by non-Microsoft OSes. From cse.psu.edu!9fans-admin Thu Nov 1 22:32:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 22:32:22 JST 2001 Received: (qmail 17118 invoked by uid 1020); 1 Nov 2001 22:32:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 17114 invoked from network); 1 Nov 2001 22:32:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 22:32:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2E26819A05; Thu, 1 Nov 2001 08:32:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from sigint.cs.purdue.edu (sigint.cs.purdue.edu [128.10.2.82]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id BD8BA199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 08:31:17 -0500 (EST) Received: by sigint.cs.purdue.edu (Postfix, from userid 118) id 54604276E; Thu, 1 Nov 2001 08:31:17 -0500 (EST) From: plan9@sigint.cs.purdue.edu To: 9fans@cse.psu.edu Subject: Re: [9fans] SB16 Message-ID: <20011101083117.B11551@sigint.cs.purdue.edu> References: <20011101025712.91311199DD@mail.cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011101025712.91311199DD@mail.cse.psu.edu>; from okamoto@granite.cias.osakafu-u.ac.jp on Thu, Nov 01, 2001 at 11:57:14AM +0900 X-Disclaimer: Any similarity to an opinion of Purdue is purely coincidental Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 08:31:17 -0500 On Thu, Nov 01, 2001 at 11:57:14AM +0900, okamoto@granite.cias.osakafu-u.ac.jp wrote: >> From: Carlos Eduardo Lenz >> >> My laptop allows to enable SB16 compatibility for the VIA soundcard in >> the bios. >> I enabled it in plan9.ini, with the dma,irq, etc set in the bios. >> But it gives the error msg: >> #A: model 0x03 0x02: not SB16 compatible (or something similar). >> >> Found that devsound.c tests for major=0x03 and minor=0x01. >> So I need to know if I can just add another test that fits my config or >> my card isn't really supported? > > Is that really sb16 compatible, not 'sbpro'? It's probably sbpro; I've never seen a card that emulated an sb16. You can't just bung in different major/minor numbers; the sbpro is only 8-bit, so you have to scale down the 16-bit samples first. There's an sbpro driver for 2nd Edition on Charles Forsyth's Plan 9 software page. It may be a SMOP to port it to 3rd Edition. http://www.caldo.demon.co.uk/plan9/soft/index.html From cse.psu.edu!9fans-admin Thu Nov 1 23:19:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Thu Nov 1 23:19:23 JST 2001 Received: (qmail 17629 invoked by uid 1020); 1 Nov 2001 23:19:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 17625 invoked from network); 1 Nov 2001 23:19:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 1 Nov 2001 23:19:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 214E119A06; Thu, 1 Nov 2001 09:19:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id C4F73199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 09:18:51 -0500 (EST) Received: (qmail 1806557 invoked from network); 1 Nov 2001 07:18:50 -0700 Received: from snaresland.acl.lanl.gov (128.165.147.113) by acl.lanl.gov with SMTP; 1 Nov 2001 07:18:50 -0700 Received: (qmail 21587 invoked by uid 3499); 1 Nov 2001 07:18:50 -0700 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 1 Nov 2001 07:18:50 -0700 From: Ronald G Minnich X-X-Sender: To: <9fans@cse.psu.edu> Subject: Re: [9fans] Plan 9 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 07:18:50 -0700 (MST) On Thu, 1 Nov 2001, Randolph Fritz wrote: > ...lurklurklurk... > > In article <20011025124551.4A1E1199B5@mail.cse.psu.edu>, rob pike wrote: > > The original reason behind Plan 9 is still the most important and, > > unfortunately, is largely obscured by the need to make a distribution > > and the desire for individuals to run it on PCs: a shared environment. > > Plan9 is, in other words, a platform for ubiquitous, collaborative > computing. This, I think, reflects the social environment of Bell > Labs. Whether or not this is a model worth pursuing in other > contexts is left as an exercise for the student... yes but ... just because that is what it was designed for does not mean that is what it is limited to. I kind of doubt the designers anticipated our little rack of DL360s running plan9. But it is pretty nice for clusters. ron From cse.psu.edu!9fans-admin Fri Nov 2 03:58:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 03:58:24 JST 2001 Received: (qmail 19683 invoked by uid 1020); 2 Nov 2001 03:58:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 19679 invoked from network); 2 Nov 2001 03:58:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 03:58:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id CDA7F19A02; Thu, 1 Nov 2001 13:58:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from ducky.net (unknown [199.26.172.91]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 21E1E199F1 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 13:57:16 -0500 (EST) Received: (from mike@localhost) by ducky.net (8.11.6/8.11.4) id fA1Iv9701688 for 9fans@cse.psu.edu; Thu, 1 Nov 2001 10:57:09 -0800 (PST) (envelope-from mike) From: Mike Haertel Message-Id: <200111011857.fA1Iv9701688@ducky.net> To: 9fans@cse.psu.edu Subject: [9fans] authentication protocol question Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 10:57:09 -0800 (PST) I am puzzled by the following code in /sys/src/fs/port/auth.c. /* * the id must be in a valid range. the range is specified by a * lower bount (idoffset) and a bit vector (idvec) where a * bit set to 1 means unusable */ lock(&cp->idlock); x = a.id - cp->idoffset; bit = 1< 31 || (bit&cp->idvec)){ unlock(&cp->idlock); print("id out of range: idoff %ld idvec %lux id %ld\n", cp->idoffset, cp->idvec, a.id); return 0; } cp->idvec |= bit; From the auth(6) man page, I had the impression that the id field was supposed to be a simple sequence number. Is there a race in some client in which the order of the sequence numbers can get rearranged? What is the race? From cse.psu.edu!9fans-admin Fri Nov 2 04:02:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 04:02:23 JST 2001 Received: (qmail 19747 invoked by uid 1020); 2 Nov 2001 04:02:21 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 19743 invoked from network); 2 Nov 2001 04:02:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 04:02:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 90CA719A04; Thu, 1 Nov 2001 14:02:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 6A9D8199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 14:01:06 -0500 (EST) Subject: [9fans] authentication protocol question From: presotto@closedmind.org To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011101190106.6A9D8199DD@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 14:01:05 -0500 The race is on the client side. There can be a number of simultaneous attaches through the same communications channel. Nothing synchronizes them so the authentications can come out of order. The important part is that the id's aren't reused. From cse.psu.edu!9fans-admin Fri Nov 2 06:21:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 06:21:23 JST 2001 Received: (qmail 20879 invoked by uid 1020); 2 Nov 2001 06:21:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 20871 invoked from network); 2 Nov 2001 06:21:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 06:21:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id D50F619A04; Thu, 1 Nov 2001 16:21:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 4CDD5199F1 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 16:20:10 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] Virtual memory in BSD and Plan9 From: David Gordon Hogan MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011101212010.4CDD5199F1@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 16:19:56 -0500 > One big difference I've seen in past examples of paging systems > can be summarized as: page against everyone vs. page only against > oneself. The latter is sometimes called the "working set" model. > The former tends to make the whole system unusable when a process > lets its address space get out of control, while the latter tends > to run other processes pretty much the same under such conditions. I'm wondering if anyone's ever tried to treat this as a `bandwidth sharing' issue, and applied techniques like Fair Queueing. Admittedly it's more complex than a simple bandwidth sharing problem. There are two resources to share: the page pool and the paging device IO, and there are interactions between the two. From cse.psu.edu!9fans-admin Fri Nov 2 06:24:25 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 06:24:25 JST 2001 Received: (qmail 20899 invoked by uid 1020); 2 Nov 2001 06:24:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 20895 invoked from network); 2 Nov 2001 06:24:24 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 06:24:24 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2AF5719A08; Thu, 1 Nov 2001 16:24:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from galapagos.cse.psu.edu (galapagos.cse.psu.edu [130.203.12.17]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id DA70F199F1 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 16:23:44 -0500 (EST) Received: (qmail 28901 invoked by uid 991); 1 Nov 2001 21:23:44 -0000 Message-ID: <20011101212344.28899.qmail@g.bio.cse.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] Virtual memory in BSD and Plan9 In-Reply-To: Message from David Gordon Hogan of "Thu, 01 Nov 2001 16:19:56 EST." <20011101212010.4CDD5199F1@mail.cse.psu.edu> From: Scott Schwartz Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 01 Nov 2001 16:23:44 -0500 | I'm wondering if anyone's ever tried to treat this as a `bandwidth sharing' | issue, and applied techniques like Fair Queueing. Wasn't there a usenix paper by someone at the labs a while back on something like that? From cse.psu.edu!9fans-admin Fri Nov 2 06:27:33 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 06:27:33 JST 2001 Received: (qmail 20927 invoked by uid 1020); 2 Nov 2001 06:27:32 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 20923 invoked from network); 2 Nov 2001 06:27:32 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 06:27:32 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 054B3199F1; Thu, 1 Nov 2001 16:27:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 193D5199F1 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 16:26:06 -0500 (EST) From: presotto@closedmind.org To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011101212606.193D5199F1@mail.cse.psu.edu> Subject: [9fans] (no subject) Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 16:26:04 -0500 the paper you're alluding to, I believe, was OSMOSIS, a modified Plan 9 kernel, by Eran Gabber. From cse.psu.edu!9fans-admin Fri Nov 2 06:28:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 06:28:22 JST 2001 Received: (qmail 20940 invoked by uid 1020); 2 Nov 2001 06:28:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 20933 invoked from network); 2 Nov 2001 06:28:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 06:28:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7163719A11; Thu, 1 Nov 2001 16:28:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B286E199F2 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 16:27:00 -0500 (EST) From: presotto@closedmind.org To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011101212700.B286E199F2@mail.cse.psu.edu> Subject: [9fans] (no subject) Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 16:27:00 -0500 You might also look at the virtual clock paper by Carr in an SOSP proceeding from the 70's. From cse.psu.edu!9fans-admin Fri Nov 2 08:13:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 08:13:22 JST 2001 Received: (qmail 21636 invoked by uid 1020); 2 Nov 2001 08:13:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21632 invoked from network); 2 Nov 2001 08:13:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 08:13:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A603519A04; Thu, 1 Nov 2001 18:13:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtpzilla3.xs4all.nl (smtpzilla3.xs4all.nl [194.109.127.139]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C3750199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 18:12:12 -0500 (EST) Received: from micron (213-84-71-105.adsl.xs4all.nl [213.84.71.105]) by smtpzilla3.xs4all.nl (8.12.0/8.12.0) with ESMTP id fA1NC9Zm011996 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 00:12:09 +0100 (CET) Received: from wstan by micron with local (Exim 3.32 #1 (Debian)) id 15zR0K-0001PE-00 for <9fans@cse.psu.edu>; Fri, 02 Nov 2001 00:12:08 +0100 From: "William S." To: 9fans@cse.psu.edu Message-ID: <20011102001208.A5218@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i Subject: [9fans] setting up an "authentication server" Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu X-Reply-To: wilby98@yahoo.com List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 00:12:08 +0100 I have seen explanations for setting up a "CPU/authentication server (CPU and auth server combined)" and a "file server", but nothing about how to set up a dedicated "authentication server" separate from the CPU server. I am not at the point of doing this yet so I am not looking for a step by step explanation. I am just curious what the advantages would be in doing this. Bill Amsterdam, NL From cse.psu.edu!9fans-admin Fri Nov 2 08:57:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 08:57:23 JST 2001 Received: (qmail 22033 invoked by uid 1020); 2 Nov 2001 08:57:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 22029 invoked from network); 2 Nov 2001 08:57:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 08:57:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8503319A05; Thu, 1 Nov 2001 18:57:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from math.psu.edu (leibniz.math.psu.edu [146.186.130.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 77938199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 18:56:11 -0500 (EST) Received: from augusta.math.psu.edu (augusta.math.psu.edu [146.186.132.2]) by math.psu.edu (8.9.3/8.9.3) with ESMTP id SAA15010 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 18:56:10 -0500 (EST) From: Dan Cross Received: (from cross@localhost) by augusta.math.psu.edu (8.9.3+Sun/8.9.3) id SAA20511; Thu, 1 Nov 2001 18:56:10 -0500 (EST) Message-Id: <200111012356.SAA20511@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] setting up an "authentication server" Newsgroups: comp.os.plan9 In-Reply-To: <20011102001208.A5218@xs4all.nl> Organization: Mememememememmeme Cc: Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 18:56:10 -0500 (EST) In article <20011102001208.A5218@xs4all.nl> you write: >I have seen explanations for setting up a >"CPU/authentication server (CPU and auth server combined)" >and a "file server", but nothing about how to set >up a dedicated "authentication server" separate from >the CPU server. > >I am not at the point of doing this yet so I am not looking >for a step by step explanation. I am just curious what the >advantages would be in doing this. An authentication server is just a CPU server that runs the authentication server processes (in user land). Unlike the file server, it's not a seperate kernel; it's the ``normal'' CPU/terminal kernel. You can set up a standalone machine (ie, uses a local disk, installation of the OS, etc) that runs the CPU server kernel but a subset of the CPU server services. In this case the subset would just consist of the authentication server processes. I don't generally like to do this because I think it's a bit of an administrative hassle and besides, if my file server goes away, I'm already in a world of hurt. - Dan C. From cse.psu.edu!9fans-admin Fri Nov 2 09:04:21 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 09:04:21 JST 2001 Received: (qmail 22157 invoked by uid 1020); 2 Nov 2001 09:04:21 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 22153 invoked from network); 2 Nov 2001 09:04:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 09:04:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6F92319A08; Thu, 1 Nov 2001 19:04:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.noos.fr (descartes.noos.net [212.198.2.74]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7DE0B199DD for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 19:03:38 -0500 (EST) Received: (qmail 35014701 invoked by uid 0); 2 Nov 2001 00:03:03 -0000 Received: from unknown (HELO SOMA) ([212.198.185.249]) (envelope-sender ) by 212.198.2.74 (qmail-ldap-1.03) with SMTP for <9fans@cse.psu.edu>; 2 Nov 2001 00:03:03 -0000 Message-ID: <075701c16331$29040080$f9b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <200111012356.SAA20511@augusta.math.psu.edu> Subject: Re: [9fans] setting up an "authentication server" MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 00:58:53 +0100 I would run a standalone AS in a secure area. From cse.psu.edu!9fans-admin Fri Nov 2 12:00:34 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 12:00:34 JST 2001 Received: (qmail 26536 invoked by uid 1020); 2 Nov 2001 12:00:33 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 26532 invoked from network); 2 Nov 2001 12:00:33 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 12:00:33 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E2287199F2; Thu, 1 Nov 2001 22:00:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from euryale.inf.ufsc.br (euryale.inf.ufsc.br [150.162.60.23]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C8D38199B9 for <9fans@cse.psu.edu>; Thu, 1 Nov 2001 21:59:02 -0500 (EST) Received: from juno (juno.inf.ufsc.br [150.162.60.3]) by euryale.inf.ufsc.br (8.11.3/8.11.3) with ESMTP id fA23xv853328 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 00:59:58 -0300 From: Carlos Eduardo Lenz X-Sender: lenz@juno To: 9fans@cse.psu.edu Subject: Re: [9fans] SB16 In-Reply-To: <20011101083117.B11551@sigint.cs.purdue.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 01:54:42 -0200 (EDT) It says in the bios setup it can emulate a sb16 (compaq 1200series)! So it's not true? Anyway, what are the major&minor about? My guess was that they are values set somewhere by a real sb16 (for detection). Carlos E Lenz lenz@inf.ufsc.br On Thu, 1 Nov 2001 plan9@sigint.cs.purdue.edu wrote: > On Thu, Nov 01, 2001 at 11:57:14AM +0900, okamoto@granite.cias.osakafu-u.ac.jp wrote: > >> From: Carlos Eduardo Lenz > >> > >> My laptop allows to enable SB16 compatibility for the VIA soundcard in > >> the bios. > >> I enabled it in plan9.ini, with the dma,irq, etc set in the bios. > >> But it gives the error msg: > >> #A: model 0x03 0x02: not SB16 compatible (or something similar). > >> > >> Found that devsound.c tests for major=0x03 and minor=0x01. > >> So I need to know if I can just add another test that fits my config or > >> my card isn't really supported? > > > > Is that really sb16 compatible, not 'sbpro'? > > It's probably sbpro; I've never seen a card that emulated an sb16. > > You can't just bung in different major/minor numbers; the sbpro is only > 8-bit, so you have to scale down the 16-bit samples first. > > There's an sbpro driver for 2nd Edition on Charles Forsyth's Plan 9 software > page. It may be a SMOP to port it to 3rd Edition. > > http://www.caldo.demon.co.uk/plan9/soft/index.html > From cse.psu.edu!9fans-admin Fri Nov 2 14:44:31 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 14:44:31 JST 2001 Received: (qmail 30484 invoked by uid 1020); 2 Nov 2001 14:44:31 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 30477 invoked from network); 2 Nov 2001 14:44:30 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 14:44:30 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E945219A05; Fri, 2 Nov 2001 00:44:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from ducky.net (unknown [199.26.172.91]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6360E199DD for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 00:43:48 -0500 (EST) Received: (from mike@localhost) by ducky.net (8.11.6/8.11.4) id fA25hkG02351 for 9fans@cse.psu.edu; Thu, 1 Nov 2001 21:43:46 -0800 (PST) (envelope-from mike) From: Mike Haertel Message-Id: <200111020543.fA25hkG02351@ducky.net> To: 9fans@cse.psu.edu Subject: [9fans] auth protocol questions + proposed kfs improvement Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 1 Nov 2001 21:43:46 -0800 (PST) What is the reason for the distinction between AuthTs and AuthTc tickets, and AuthAs and AuthAc authenticators? This caused me some grief in a recent project... I wanted to modify kfs so that "listen il!*!17008" would work on terminals as well as cpu servers, so that I could use the local file system on my laptop as the boot file system for the bitsy. The problem, I found, is that the code in kfs relies on being able to read /dev/key, and uses the key so obtained to verify authentication protocol tickets by hand. But reading /dev/key is only allowed on cpu servers (presumably it's disallowed on terminals to prevent trojans from having access to your password). So, I wanted to modify kfs to use /dev/authcheck to verify the authentication protocol, rather than relying on being able to read /dev/key. Here's the new version of authorize() for /sys/src/cmd/disk/kfs/auth.c. (The text of this email continues beyond the code...) int authorize(Chan *cp, Fcall *in, Fcall *ou) { Ticket t; Authenticator a; char authbuf[TICKETLEN + AUTHENTLEN + CHALLEN + 4]; int fd, try; ulong bit; if (cp == cons.srvchan) /* local channel already safe */ return 1; if(noauth || wstatallow) /* set to allow entry during boot */ return 1; if(strcmp(in->uname, "none") == 0) return allownone || cp->auth; if(in->type == Toattach) return 0; fd = open("#c/authcheck", ORDWR); if (fd < 0) { print("can't open #c/authcheck\n"); return 0; } memcpy(authbuf, in->ticket, TICKETLEN); memcpy(authbuf + TICKETLEN, in->auth, AUTHENTLEN); memcpy(authbuf + TICKETLEN + AUTHENTLEN, cp->chal, CHALLEN); /* * the id must be in a valid range. the range is specified by a * lower bount (idoffset) and a bit vector (idvec) where a * bit set to 1 means unusable */ lock(&cp->idlock); for (try = cp->idoffset; try < cp->idoffset + 16; ++try) { authbuf[TICKETLEN + AUTHENTLEN + CHALLEN + 0] = try; authbuf[TICKETLEN + AUTHENTLEN + CHALLEN + 1] = try >> 8; authbuf[TICKETLEN + AUTHENTLEN + CHALLEN + 2] = try >> 16; authbuf[TICKETLEN + AUTHENTLEN + CHALLEN + 3] = try >> 24; if (write(fd, authbuf, sizeof authbuf) == sizeof authbuf) break; } if (try == cp->idoffset + 16) { unlock(&cp->idlock); close(fd); print("authcheck failed\n"); return 0; } bit = 1UL << (try - cp->idoffset); if (cp->idvec & bit) { unlock(&cp->idlock); print("id %d reused (replay attack?)\n", try); close(fd); return 0; } cp->idvec |= bit; /* normalize the vector */ while(cp->idvec&0xffff0001){ cp->idvec >>= 1; cp->idoffset++; } unlock(&cp->idlock); /* ticket name and attach name must match */ if (read(fd, authbuf, TICKETLEN) != TICKETLEN) { close(fd); print("can't read decrypted ticket\n"); return 0; } close(fd); convM2T(authbuf, &t, nil); if(memcmp(in->uname, t.cuid, sizeof(in->uname)) != 0){ print("names don't match\n"); return 0; } /* copy translated name into input record */ memmove(in->uname, t.suid, sizeof(in->uname)); /* craft a reply */ a.num = AuthAs; memmove(a.chal, cp->rchal, CHALLEN); a.id = try; convA2M(&a, ou->rauth, t.key); cp->auth = 1; return 1; } Unfortunately, what I discovered is this doesn't work. The reason it doesn't work is that /dev/authcheck only works with AuthTc flavored tickets, and AuthAs flavored authenticators. So I replaced authcheck() in /sys/src/9/port/auth.c with the following code. (email *still* continues after this code...) long authcheck(Chan *c, char *a, int n) { Crypt *cp; char *chal; ulong id; if(n != TICKETLEN+AUTHENTLEN && n != TICKETLEN+AUTHENTLEN+CHALLEN+4) error(Ebadarg); if(c->aux == 0) c->aux = newcrypt(); cp = c->aux; memmove(cp->tbuf, a, TICKETLEN); convM2T(cp->tbuf, &cp->t, evekey); if (cp->t.num == AuthTc) { if(strcmp(up->user, cp->t.cuid)) error(cp->t.cuid); } else if (cp->t.num != AuthTs) { error(Ebadarg); } memmove(cp->tbuf, a+TICKETLEN, AUTHENTLEN); convM2A(cp->tbuf, &cp->a, cp->t.key); if(n == TICKETLEN+AUTHENTLEN+CHALLEN+4){ uchar *p = (uchar *)&a[TICKETLEN+AUTHENTLEN+CHALLEN]; id = p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24); chal = &a[TICKETLEN+AUTHENTLEN]; }else{ id = 0; chal = cp->t.chal; } if(cp->t.num == AuthTc && cp->a.num != AuthAs || cp->t.num == AuthTs && cp->a.num != AuthAc || memcmp(chal, cp->a.chal, CHALLEN) || cp->a.id != id) error(Eperm); return n; } Now, /dev/authcheck works either with (AuthTc,AuthAs) or (AuthTs,AuthAc) flavored ticket+authenticator pairs. So, a couple of questions: 1. Is there any security reason why /dev/authcheck didn't already work with AuthTs flavored tickets and AuthAc flavored authenticators? 2. What is the reason for strcmp(up->user, cp->t.cuid)? 3. Repeating my original question, is there a security reason for the distinction between AuthTs and AuthTc flavored tickets, and the distinction between AuthAc and AuthAs flavored authenticators? From cse.psu.edu!9fans-admin Fri Nov 2 16:10:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 16:10:24 JST 2001 Received: (qmail 340 invoked by uid 1020); 2 Nov 2001 16:10:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 336 invoked from network); 2 Nov 2001 16:10:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 16:10:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8CB5919A02; Fri, 2 Nov 2001 02:10:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id DD951199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 02:09:25 -0500 (EST) From: "Russ Cox" To: 9fans@cse.psu.edu Subject: Re: [9fans] auth protocol questions + proposed kfs improvement MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102070925.DD951199B9@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 02:09:22 -0500 > 1. Is there any security reason why /dev/authcheck > didn't already work with AuthTs flavored tickets and AuthAc > flavored authenticators? Yes, /dev/authcheck was only intended to be used for checking the credentials presented by servers. > 2. What is the reason for strcmp(up->user, cp->t.cuid)? > 3. Repeating my original question, is there a security reason > for the distinction between AuthTs and AuthTc flavored tickets, > and the distinction between AuthAc and AuthAs flavored authenticators? Both of these might only be paranoia (I'm sure presotto will say for sure), but paranoia for its own sake isn't a bad thing. The distinction makes very explicit which messages are intended to be used where. If you don't do this, it's too easy not to be explicit enough. The Needham and Schroeder protocol is the most commonly cited example, but here's one closer to home. If you diff auth(6) between second and third edition you'll notice a slight change: the password change ticket sent back from the AS is of type AuthTp instead of AuthTc. The reason is that if I could convince a client host to talk to me instead of the real AS, I could relay all the traffic through until I get a password change, at which point I can convince the client host to tell me its password. UserProc->FakeAS: AuthPass, xxx, xxx, xxx, xxx, UIDc FakeAS->RealAS: AuthTreq, xxx, UIDfakeas, xxx, UIDc, UIDc RealAS->FakeAS: AuthOK, Kc{AuthTc, ..., Kn} Kfakeas{AuthTs, ..., Kn} FakeAS->UserProc: AuthOK, Kc{AuthTc, ..., Kn} UserProc->FakeAS: Kn{AuthPass, old password, new password} The fake AS sends a ticket request, getting a pair of similarly encrypted tickets with the same nonce key. It can relay the Kc ticket (which it can't decrypt) to the client, but then decrypt the Kfakeas ticket to recover the nonce key, which lets it decrypt the password change message. The problem here is that the AuthTc ticket type got used in two places for different purposes under different assumptions. I stumbled across this while checking the protocol using some authentication logics. The problem with such checks, of course, is that they don't guarantee to let you find all the problems. Maybe if you merged AuthTs and AuthTc and also AuthAs and AuthAc, everything would work out. But maybe not, and that's the argument for being as explicit as possible. (In this case, I think you could rederive the original type by looking at the user ids in the message. But maybe not always.) Russ From cse.psu.edu!9fans-admin Fri Nov 2 16:17:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 16:17:24 JST 2001 Received: (qmail 506 invoked by uid 1020); 2 Nov 2001 16:17:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 502 invoked from network); 2 Nov 2001 16:17:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 16:17:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6C7EB19A04; Fri, 2 Nov 2001 02:17:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id D336D199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 02:16:47 -0500 (EST) From: "Russ Cox" To: 9fans@cse.psu.edu Subject: Re: [9fans] auth protocol questions + proposed kfs improvement MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102071647.D336D199B9@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 02:16:45 -0500 And there it is. If you merge AuthAc and AuthAs, you won't be able to tell client authenticator from server authenticator. The usual protocol is 1. get a ticket pair from the AS. the ticket pair is identical tickets one encrypted with your key and one with the server key. 2. decrypt your ticket to get a nonce key. 3. send the other ticket to the server. 4. you send {AuthAc, ...} encrypted with the nonce key. 5. the server sends {AuthAs, ...} encrypted with the nonce key. Since you trust the AS, you believe that only you and the remote server know the nonce key (the AS forgot the key as soon as it gave you the tickets, and since you have to have either your key or the server key to decrypt a ticket, only you and the server know the nonce key). When you do #4, the server concludes that you know the nonce key (or you know the server key, in which case why are we playing this game?) so you must be you. When the server does #5, you conclude by similar reasoning that it knows the nonce key, so it must be the server you expected. If AuthAc==AuthAs, the server can parrot back your message, so you would no longer have reason to believe that it knows the nonce key and thus no reason to believe its supposed identity. Russ From cse.psu.edu!9fans-admin Fri Nov 2 19:10:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 19:10:23 JST 2001 Received: (qmail 4020 invoked by uid 1020); 2 Nov 2001 19:10:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 4016 invoked from network); 2 Nov 2001 19:10:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 19:10:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1E410199F2; Fri, 2 Nov 2001 05:10:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 12A38199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 05:09:05 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zb7l-0006st-00 for 9fans@cse.psu.edu; Fri, 02 Nov 2001 10:00:29 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87lmhpx2e9.fsf@becket.becket.net> Organization: University of California, Irvine Content-Type: text/plain; charset=us-ascii References: <20011029123819.DCCD7199E4@mail.cse.psu.edu>, <03f901c16187$b0ca6d20$f9b9c6d4@SOMA> Subject: Re: [9fans] Virtual memory in BSD and Plan9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 09:59:17 GMT boyd@fr.inter.net (Boyd Roberts) writes: > A Virtual Address Space != Paging. The former is essential, > the later is an implementation detail. The latter (sp!) is essential for other purposes too. My principle system is a computer with 256 MB of RAM and about 60 GB of disk. If I want to do a computation that requires more than 256 MB of memory, then I'm pretty happy that my system is able to go and use some of that disk to be able to complete the computation. Now, it's ludicrous to me that my system forces me to decide ahead of time which space is for "files" and which is for "backing store"--these are all simply data objects--but that's a defect caused by the conventional notion of "filesystem". That diatribe for another day. From cse.psu.edu!9fans-admin Fri Nov 2 19:19:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 19:19:23 JST 2001 Received: (qmail 4164 invoked by uid 1020); 2 Nov 2001 19:19:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 4160 invoked from network); 2 Nov 2001 19:19:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 19:19:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 5BCC219A04; Fri, 2 Nov 2001 05:19:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id BB103199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 05:18:18 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zb6M-0006rI-00 for 9fans@cse.psu.edu; Fri, 02 Nov 2001 09:59:02 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87u1wdx2ry.fsf@becket.becket.net> Organization: University of California, Irvine Content-Type: text/plain; charset=us-ascii References: <20011025124551.4A1E1199B5@mail.cse.psu.edu>, Subject: Re: [9fans] Plan 9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 09:58:20 GMT Randolph Fritz writes: > Plan9 is, in other words, a platform for ubiquitous, collaborative > computing. This, I think, reflects the social environment of Bell > Labs. Whether or not this is a model worth pursuing in other > contexts is left as an exercise for the student... Sadly, it doesn't run on my laptop. Despite much energy from Russ Cox (for which I am grateful) it doesn't install. Some of the reasons for the problem include a dependency on Microdreck in the install system and forgetting about extended partitions when designing the install process. So I'm stuck. What do people think about per-process directory hierarchies? I've asked the question about four times now, and sadly, nobody in this happy collaborative environment has anything to say. To repeat: Plan 9 has a nifty idea of making mount tables per-process, and as a result gets huge benefits across the board. But why stop there? Why should not *all* links (instead of just some) be a per-process matter? Leave aside for the moment implementation strategy, and just consider: what would the implications be for design? Would this be a feasable UI strategy? (I'm not speaking strictly of Plan 9; I'm speaking in general.) From cse.psu.edu!9fans-admin Fri Nov 2 19:19:46 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 19:19:46 JST 2001 Received: (qmail 4173 invoked by uid 1020); 2 Nov 2001 19:19:46 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 4169 invoked from network); 2 Nov 2001 19:19:46 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 19:19:46 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2CD7519A0B; Fri, 2 Nov 2001 05:19:13 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4125E199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 05:18:32 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zb6M-0006rO-00 for 9fans@cse.psu.edu; Fri, 02 Nov 2001 09:59:02 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87pu71x2lm.fsf@becket.becket.net> Organization: University of California, Irvine Content-Type: text/plain; charset=us-ascii References: <20011029123819.DCCD7199E4@mail.cse.psu.edu> Subject: Re: [9fans] Virtual memory in BSD and Plan9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 09:58:48 GMT rob@plan9.bell-labs.com (rob pike) writes: > I'm a radical here, but I think if a machine is paging, you've lost. Many times I have been grateful that I could perform a task thanks to the availability of paging. Certainly, paging is not a substitute for having more memory. But it is reasonable to want it as a technique. Indeed, once years and years ago we had a horrid intractible kernel debugging problem on BSD, when I worked for UNM, and we solved the problem (I kid you not) by firing up emacs on /dev/mem, from which I was able to find the problem when adb was not helpful. Obviously, this strategy only worked because the system was able to page. If emacs buffers were limited to the size of memory, it would not be possible to edit /dev/mem. More prosaically, many times I have had some extensive data set to operate on in a tool that needed to keep it all in "core", and while it took much longer with paging than if I had more memory--it would take forever (literally) if the kernel didn't support paging at all. Thomas From cse.psu.edu!9fans-admin Fri Nov 2 21:05:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 21:05:22 JST 2001 Received: (qmail 5381 invoked by uid 1020); 2 Nov 2001 21:05:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5377 invoked from network); 2 Nov 2001 21:05:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 21:05:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2F99119A04; Fri, 2 Nov 2001 07:05:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3F718199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 07:04:47 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 15zcj9-0002aF-00 for 9fans@cse.psu.edu; Fri, 02 Nov 2001 11:43:11 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Wladimir Mutel Message-ID: <1004699299.772773@firewall.isd.dp.ua> Organization: ISD References: <20011025124551.4A1E1199B5@mail.cse.psu.edu>, , <87u1wdx2ry.fsf@becket.becket.net> Subject: Re: [9fans] Plan 9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 11:43:02 GMT Thomas Bushnell, BSG wrote: > What do people think about per-process directory hierarchies? I've > asked the question about four times now, and sadly, nobody in this > happy collaborative environment has anything to say. Nice thing. Linux is to borrow it :> > To repeat: Plan 9 has a nifty idea of making mount tables per-process, > and as a result gets huge benefits across the board. But why stop > there? Why should not *all* links (instead of just some) be a Linux should also borrow 'fileserver' concept. Nice to have it instead of VFS-layer. And to make userspace fileserver-processes instead of kernel VFS modules. From cse.psu.edu!9fans-admin Fri Nov 2 21:41:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 21:41:22 JST 2001 Received: (qmail 5864 invoked by uid 1020); 2 Nov 2001 21:41:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5860 invoked from network); 2 Nov 2001 21:41:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 21:41:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E845519A05; Fri, 2 Nov 2001 07:41:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from math.psu.edu (leibniz.math.psu.edu [146.186.130.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 32B91199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 07:40:01 -0500 (EST) Received: from weyl.math.psu.edu (weyl.math.psu.edu [146.186.130.226]) by math.psu.edu (8.9.3/8.9.3) with ESMTP id HAA27452 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 07:39:59 -0500 (EST) Received: from localhost (viro@localhost) by weyl.math.psu.edu (8.9.3/8.9.3) with ESMTP id HAA13128 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 07:39:59 -0500 (EST) X-Authentication-Warning: weyl.math.psu.edu: viro owned process doing -bs From: Alexander Viro To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 In-Reply-To: <1004699299.772773@firewall.isd.dp.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 07:39:59 -0500 (EST) On Fri, 2 Nov 2001, Wladimir Mutel wrote: > Thomas Bushnell, BSG wrote: > > > What do people think about per-process directory hierarchies? I've > > asked the question about four times now, and sadly, nobody in this > > happy collaborative environment has anything to say. > > Nice thing. Linux is to borrow it :> Not likely, unless you can show a damn good reasons why it's a good idea. > > To repeat: Plan 9 has a nifty idea of making mount tables per-process, > > and as a result gets huge benefits across the board. But why stop > > there? Why should not *all* links (instead of just some) be a > > Linux should also borrow 'fileserver' concept. > Nice to have it instead of VFS-layer. And to make userspace > fileserver-processes instead of kernel VFS modules. Huh? What in your opinion VFS is and how could userland filesystems replace it? BTW, Plan 9 _does_ have VFS equivalent - code that deals with channels, mounts, etc. From cse.psu.edu!9fans-admin Fri Nov 2 22:54:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Fri Nov 2 22:54:22 JST 2001 Received: (qmail 6600 invoked by uid 1020); 2 Nov 2001 22:54:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 6596 invoked from network); 2 Nov 2001 22:54:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 2 Nov 2001 22:54:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 3775719A08; Fri, 2 Nov 2001 08:54:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 938F819A04 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 08:53:23 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 From: "rob pike" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102135323.938F819A04@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 08:53:18 -0500 > To repeat: Plan 9 has a nifty idea of making mount tables per-process, > and as a result gets huge benefits across the board. But why stop > there? Why should not *all* links (instead of just some) be a > per-process matter? Any 'link' can be per-process in Plan 9, but in practice only those ones that need to be are invested with the trouble to make them so. Otherwise, I would have to write down somewhere what all the default links would be for a process when it starts running, and that would be a huge list of information and also unpredictable since I can't say what resources the process is likely to need dynamically. It seems both much simpler and just as general to let the file system set the defaults with its directory structure and override them for the relatively small number of cases needed, which is exactly what Plan 9 does. In other words, in Plan 9 all links *can* be per-process but only those that *need* to be actually are. Why do it differently? Or perhaps I don't understand what you're asking. -rob From cse.psu.edu!9fans-admin Sat Nov 3 00:37:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 00:37:24 JST 2001 Received: (qmail 7581 invoked by uid 1020); 3 Nov 2001 00:37:24 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 7577 invoked from network); 3 Nov 2001 00:37:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 00:37:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 73B22199FA; Fri, 2 Nov 2001 10:37:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B06EB1998A for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 10:36:47 -0500 (EST) Received: (qmail 2311 invoked from network); 2 Nov 2001 08:36:46 -0700 Received: from snaresland.acl.lanl.gov (128.165.147.113) by acl.lanl.gov with SMTP; 2 Nov 2001 08:36:46 -0700 Received: (qmail 27400 invoked by uid 3499); 2 Nov 2001 08:36:46 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Ronald G Minnich To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 X-Mailer: KMail [version 1.2] References: <20011025124551.4A1E1199B5@mail.cse.psu.edu> <87u1wdx2ry.fsf@becket.becket.net> <1004699299.772773@firewall.isd.dp.ua> In-Reply-To: <1004699299.772773@firewall.isd.dp.ua> MIME-Version: 1.0 Message-Id: <01110208364601.27359@snaresland> Content-Transfer-Encoding: 8bit Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 08:36:46 -0700 On Friday 02 November 2001 04:43, you wrote: > Thomas Bushnell, BSG wrote: > > What do people think about per-process directory hierarchies? I've > > asked the question about four times now, and sadly, nobody in this > > happy collaborative environment has anything to say. > > Nice thing. Linux is to borrow it :> I've done it twice now, once on my own, once with Peter Braam. Dec. Dr. Dobb's describes the one I did on my own. ron From cse.psu.edu!9fans-admin Sat Nov 3 00:43:25 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 00:43:25 JST 2001 Received: (qmail 7630 invoked by uid 1020); 3 Nov 2001 00:43:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 7626 invoked from network); 3 Nov 2001 00:43:24 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 00:43:24 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8181C19A04; Fri, 2 Nov 2001 10:43:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mail.usask.ca (mail.usask.ca [128.233.3.34]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1A7EC199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 10:42:30 -0500 (EST) Received: from CONVERSION-DAEMON by mail.usask.ca (PMDF V5.2-32 #36834) id <0GM600F01JMRPK@mail.usask.ca> for 9fans@cse.psu.edu; Fri, 2 Nov 2001 09:42:27 -0600 (CST) Received: from mail.usask.ca ([128.233.3.206]) by mail.usask.ca (PMDF V5.2-32 #36834) with ESMTP id <0GM6004JLJMRBD@mail.usask.ca> for 9fans@cse.psu.edu; Fri, 02 Nov 2001 09:42:27 -0600 (CST) From: andrey Subject: Re: [9fans] Plan 9 To: 9fans@cse.psu.edu Message-id: <3BE2BEE3.14BA4E5E@mail.usask.ca> MIME-version: 1.0 X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <20011025124551.4A1E1199B5@mail.cse.psu.edu> <87u1wdx2ry.fsf@becket.becket.net> <1004699299.772773@firewall.isd.dp.ua> <01110208364601.27359@snaresland> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 02 Nov 2001 09:42:27 -0600 http://www.ddj.com/articles/2001/0112/0112a/0112a.htm for those who are not subscribed to it.. Ronald G Minnich wrote: > I've done it twice now, once on my own, once with Peter Braam. > > Dec. Dr. Dobb's describes the one I did on my own. > > ron From cse.psu.edu!9fans-admin Sat Nov 3 00:55:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 00:55:22 JST 2001 Received: (qmail 7747 invoked by uid 1020); 3 Nov 2001 00:55:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 7743 invoked from network); 3 Nov 2001 00:55:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 00:55:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C970019A06; Fri, 2 Nov 2001 10:55:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B149819A05 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 10:54:30 -0500 (EST) Received: (qmail 2908 invoked from network); 2 Nov 2001 08:54:30 -0700 Received: from snaresland.acl.lanl.gov (128.165.147.113) by acl.lanl.gov with SMTP; 2 Nov 2001 08:54:30 -0700 Received: (qmail 27565 invoked by uid 3499); 2 Nov 2001 08:54:29 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Ronald G Minnich To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 X-Mailer: KMail [version 1.2] References: <20011025124551.4A1E1199B5@mail.cse.psu.edu> <01110208364601.27359@snaresland> <3BE2BEE3.14BA4E5E@mail.usask.ca> In-Reply-To: <3BE2BEE3.14BA4E5E@mail.usask.ca> MIME-Version: 1.0 Message-Id: <01110208542906.27359@snaresland> Content-Transfer-Encoding: 8bit Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 08:54:29 -0700 On Friday 02 November 2001 08:42, you wrote: > http://www.ddj.com/articles/2001/0112/0112a/0112a.htm Great. Now all the experts on the list will flame me for all that parts I got wrong. Oh well. ron From cse.psu.edu!9fans-admin Sat Nov 3 01:14:32 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 01:14:32 JST 2001 Received: (qmail 7929 invoked by uid 1020); 3 Nov 2001 01:14:32 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 7925 invoked from network); 3 Nov 2001 01:14:31 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 01:14:31 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B1C3D199F8; Fri, 2 Nov 2001 11:14:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from marvin.nildram.co.uk (marvin.nildram.co.uk [195.112.4.71]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B21EF1998A for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 11:13:29 -0500 (EST) Received: (qmail 5020 invoked from network); 2 Nov 2001 16:13:26 -0000 Received: from hamnavoe.gotadsl.co.uk (HELO hamnavoe) (213.208.117.150) by marvin.nildram.co.uk with SMTP; 2 Nov 2001 16:13:26 -0000 To: 9fans@cse.psu.edu Subject: Re: [9fans] SB16 From: Richard Miller MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-anwtxviokjvsgmjfqixkeemlkt" Message-Id: <20011102161329.B21EF1998A@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 15:22:51 0000 This is a multi-part message in MIME format. --upas-anwtxviokjvsgmjfqixkeemlkt Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit > There's an sbpro driver for 2nd Edition on Charles Forsyth's Plan 9 software > page. It may be a SMOP to port it to 3rd Edition. Here's an update to the 3rd edition version of /sys/src/9/port/devaudio.c for sbpro support. It's been found to work on a real sbpro and at least two impostors; it doesn't work on the Thinkpad T21. I think my resampling of sound data in b8to16() and b16to8() isn't quite right. Would somebody like to comment? -- Richard --upas-anwtxviokjvsgmjfqixkeemlkt Content-Disposition: attachment; filename=devaudio.bod Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit #!/bin/rc # # command: /bin/boddle /sys/src/9/port/devaudio.c devaudio.c # srcdir: /sys/src/9/port # version: 1004714078 # date: Fri Nov 2 15:14:38 GMT 2001 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 1004714078 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/9/port case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 1004714078 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 1004714078 mkdir 1004714078 target=1004714078/devaudio.c echo -n '1004714078/devaudio.c: ' if(! test -f $srcdir/devaudio.c || ! test -r $srcdir/devaudio.c){ echo $srcdir/devaudio.c unreadable exit unreadable } sum=`{sum < $srcdir/devaudio.c} if(! ~ 010c638720395 $sum(1)^$sum(2)){ echo $srcdir/devaudio.c is not the original distribution file exit original } cp $srcdir/devaudio.c 1004714078/devaudio.c sed s/.// <<'//GO.SYSIN DD VADIM devaudio.c' | ed 1004714078/devaudio.c >/dev/null >[2=1] -1203a -} - -static void -b8to16(uchar *a) -{ - uchar *p, *q; - - p = a + Bufsize/2; - q = a + Bufsize - 2; - do { - q[1] = (*--p)^0x80; - q[0] = 0; - } while ((q -= 2) >= a); -} - -static void -b16to8(uchar *a) -{ - uchar *p, *ep, *q; - - p = a + 1; - ep = a + Bufsize; - q = a - 1; - do - *++q = *p^0x80; - while ((p += 2) < ep); -. -1175c - if(audio.major == 3) - b16to8(b->virt); - else - swab(b->virt); -. -987c - if(audio.major == 3) - b8to16(b->virt); - else - swab(b->virt); -. -928c - if(audio.major == 3) - b16to8(b->virt); - else - swab(b->virt); -. -861c - if(audio.major != 4 && audio.major != 3) -. -833a - } - -. -819a - if(audio.major == 4) { - -. -793d -788,789c - if(audio.major == 3) { - if(audio.minor == 1 && !ess1688(&sbconf)) - audio.major = 4; - else - blaster.startdma = sbprostartdma; - } else { - print("#A: model 0x%.2x 0x%.2x; not SB 16/PRO compatible\n", -. -730c - if(cistrcmp(sbconf.type, "sbpro") == 0) - sbconf.dma = 1; - else if((cistrcmp(sbconf.type, "sb16") != 0) && (cistrcmp(sbconf.type, "ess1688") != 0)) -. -410a -static void -sbprostartdma(void) -{ - ulong count; - int speed; - - ilock(&blaster); - dmaend(blaster.dma); - if(audio.amode == Aread) { - sbcmd(0xd3); /* speaker off */ - speed = audio.livol[Vspeed]; - } else { - sbcmd(0xd1); /* speaker on */ - speed = audio.lovol[Vspeed]; - } - speed *= 2; - sbcmd(0x40); - sbcmd((65536 - 256000000/speed) >> 8); - - count = (Bufsize >> 1) - 1; - sbcmd(0x48); /* block size */ - sbcmd(count); - sbcmd(count>>8); - if(audio.amode == Aread) { - sbcmd(0xa8); /* stereo */ - sbcmd(0x98); /* high speed input, autoinit */ - } else { - mxcmd(0x0e, mxread(0x0e)|0x22); /* stereo, no output filter */ - sbcmd(0x90); /* high speed output, autoinit */ - } - - audio.active = 1; - audio.tottime = todget(nil); - contindma(); - iunlock(&blaster); -} - -. -369a - } -. -367a - if(audio.major == 3) { /* sbpro */ - outb(blaster.reset, 1); - microdelay(3); - outb(blaster.reset, 0); - } else { /* sb16 */ -. -361c - if(dmasetup(blaster.dma, b->virt, (audio.major == 3? Bufsize/2 : Bufsize), audio.amode == Aread) >= 0) -. -304a - break; - - case 3: /* sbpro */ - - mxcmd(0x22, 255); /* left/right master */ - mxcmds2(0x04, left[Vaudio], right[Vaudio]); - mxcmds2(0x26, left[Vsynth], right[Vsynth]); - mxcmds2(0x28, left[Vcd], right[Vcd]); - mxcmds2(0x2e, left[Vline], right[Vline]); - mxcmdss(0x0a, left[Vmic]); - - source = 0; - if(audio.livol[Vcd]) - source = 2; - else if(audio.livol[Vline]) - source = 6; - mxcmd(0x0c, 0x20|source); /* no input filter */ - break; - } - -. -255a - switch (audio.major) { - case 4: /* sb16 */ - -. -229a -mxcmds2(int s, int v, int w) -{ - - if(v > 100) - v = 100; - if(v < 0) - v = 0; - if(w > 100) - w = 100; - if(w < 0) - w = 0; - mxcmd(s, (((v*15)/100)<<4) | ((w*15)/100)); -} - -static void -mxcmdss(int s, int v) -{ - if(v > 100) - v = 100; - if(v < 0) - v = 0; - mxcmd(s, (v*7)/100); -} - -static void -. -132a -static void b16to8(uchar*); -static void b8to16(uchar*); -. -79,80c - int major; /* SB major version number (sb16=4, sbpro=3) */ - int minor; /* SB minor version number */ -. -wq //GO.SYSIN DD VADIM devaudio.c sum=`{sum < 1004714078/devaudio.c} if(~ 0d74360d22810 $sum(1)^$sum(2)) echo if not{ echo 1004714078/devaudio.c checksum error creating updated file exit checksum } --upas-anwtxviokjvsgmjfqixkeemlkt-- From cse.psu.edu!9fans-admin Sat Nov 3 02:27:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 02:27:24 JST 2001 Received: (qmail 8465 invoked by uid 1020); 3 Nov 2001 02:27:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 8461 invoked from network); 3 Nov 2001 02:27:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 02:27:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id ADC11199FA; Fri, 2 Nov 2001 12:27:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (ampl.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 8CF92199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 12:26:14 -0500 (EST) Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Fri Nov 2 12:26:13 EST 2001 Received: from plan9.cs.bell-labs.com ([141.154.232.189]) by plan9; Fri Nov 2 12:26:12 EST 2001 To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102172614.8CF92199B9@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 12:26:10 -0500 > Sadly, it doesn't run on my laptop. Despite much energy from Russ Cox > (for which I am grateful) it doesn't install. Some of the reasons for > the problem include a dependency on Microdreck in the install system > and forgetting about extended partitions when designing the install > process. Now, now, be fair. The real problem is that we don't have a USB driver at boot, we require a floppy disk to install, and your laptop's floppy drive is USB. There is no dependency on Microsoft operating systems whatever (though our boot floppy happens to use their file system format), and what we ``forgot'' was the ability to boot out of extended partitions that are pretending to be a floppy disk, which no one else does either. There are some bugs in fdisk's extended partition table parsing too, but we didn't get far. Our lack of USB support is the real problem here. I wish... Russ From cse.psu.edu!9fans-admin Sat Nov 3 02:53:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 02:53:23 JST 2001 Received: (qmail 8616 invoked by uid 1020); 3 Nov 2001 02:53:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 8612 invoked from network); 3 Nov 2001 02:53:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 02:53:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 765DC199F8; Fri, 2 Nov 2001 12:53:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from doppio.vitanuova.com (unknown [62.254.170.97]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B10BA1998A for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 12:52:16 -0500 (EST) From: forsyth@vitanuova.com To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102175216.B10BA1998A@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 17:57:44 0000 if you haven't got a supported floppy disk drive you can still install the system, if you've got a CD drive, and if you've got Windows 9x running, with ftp, but you need to do much of the installation by hand, and you'll need a version of the kernel that runs off a CD (booting the kernel from the hard disk). i've just had to do that with a new thinkpad a22e. you can even do it without the ethernet, but you'll need to transfer the 9pccd kernel some other way. From cse.psu.edu!9fans-admin Sat Nov 3 03:27:31 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 03:27:31 JST 2001 Received: (qmail 8848 invoked by uid 1020); 3 Nov 2001 03:27:30 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 8844 invoked from network); 3 Nov 2001 03:27:30 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 03:27:30 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 777A1199FA; Fri, 2 Nov 2001 13:27:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.noos.fr (descartes.noos.net [212.198.2.74]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E8770199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 13:26:55 -0500 (EST) Received: (qmail 35565729 invoked by uid 0); 2 Nov 2001 18:26:51 -0000 Received: from unknown (HELO SOMA) ([212.198.185.249]) (envelope-sender ) by 212.198.2.74 (qmail-ldap-1.03) with SMTP for <9fans@cse.psu.edu>; 2 Nov 2001 18:26:51 -0000 Message-ID: <085001c163cb$5ab27400$f9b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <20011102175216.B10BA1998A@mail.cse.psu.edu> Subject: Re: [9fans] Plan 9 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 19:22:39 +0100 > but you'll need to transfer the 9pccd kernel some other way. I nearly built a bootable CD image, but had more pressing things to do. From cse.psu.edu!9fans-admin Sat Nov 3 03:34:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 03:34:23 JST 2001 Received: (qmail 8886 invoked by uid 1020); 3 Nov 2001 03:34:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 8882 invoked from network); 3 Nov 2001 03:34:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 03:34:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B75DE19A04; Fri, 2 Nov 2001 13:34:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.noos.fr (aragon.noos.net [212.198.2.75]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 21C58199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 13:33:48 -0500 (EST) Received: (qmail 47005023 invoked by uid 0); 2 Nov 2001 18:33:46 -0000 Received: from unknown (HELO SOMA) ([212.198.185.249]) (envelope-sender ) by 212.198.2.75 (qmail-ldap-1.03) with SMTP for <9fans@cse.psu.edu>; 2 Nov 2001 18:33:46 -0000 Message-ID: <085801c163cc$51a91c00$f9b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <20011102172614.8CF92199B9@mail.cse.psu.edu> Subject: Re: [9fans] Plan 9 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 19:29:33 +0100 > Now, now, be fair. The real problem is that we don't have a USB > driver at boot, we require a floppy disk to install, and your laptop's > floppy drive is USB. But the BIOS should understand the USB floppy and from there you can boot/install from c: unless this m/c is weirder than a VAIO. The process is tedios, but I did document it: http://home.fr.inter.net/boyd/code/plan9/usbflop.html All credit goes to Russ. From cse.psu.edu!9fans-admin Sat Nov 3 03:37:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 03:37:24 JST 2001 Received: (qmail 8924 invoked by uid 1020); 3 Nov 2001 03:37:24 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 8920 invoked from network); 3 Nov 2001 03:37:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 03:37:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7F52919A0B; Fri, 2 Nov 2001 13:37:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id E4C5F199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 13:36:30 -0500 (EST) Received: from plan9.cs.bell-labs.com ([141.154.232.189]) by plan9; Fri Nov 2 13:36:29 EST 2001 To: 9fans@cse.psu.edu Subject: Re: [9fans] Plan 9 From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011102183630.E4C5F199B9@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 13:36:28 -0500 > But the BIOS should understand the USB floppy and from there you can > boot/install from c: unless this m/c is weirder than a VAIO. We tried that. Loading the kernel off the disk never gets the right bits. We suspect that maybe the USB is busmastering and we need to turn it off. It's all just never-ending hacks because we don't have real USB support. Russ From cse.psu.edu!9fans-admin Sat Nov 3 04:24:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 04:24:24 JST 2001 Received: (qmail 9278 invoked by uid 1020); 3 Nov 2001 04:24:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 9274 invoked from network); 3 Nov 2001 04:24:24 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 04:24:24 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B42B5199FA; Fri, 2 Nov 2001 14:24:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from ducky.net (unknown [199.26.172.91]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 250DC199B9 for <9fans@cse.psu.edu>; Fri, 2 Nov 2001 14:23:56 -0500 (EST) Received: (from mike@localhost) by ducky.net (8.11.6/8.11.4) id fA2JNqV03620 for 9fans@cse.psu.edu; Fri, 2 Nov 2001 11:23:52 -0800 (PST) (envelope-from mike) From: Mike Haertel Message-Id: <200111021923.fA2JNqV03620@ducky.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] auth protocol questions + proposed kfs improvement In-Reply-To: <20011102070925.DD951199B9@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Fri, 2 Nov 2001 11:23:52 -0800 (PST) >> 1. Is there any security reason why /dev/authcheck >> didn't already work with AuthTs flavored tickets and AuthAc >> flavored authenticators? > >Yes, /dev/authcheck was only intended to be used >for checking the credentials presented by servers. You'd think it would say something about that in the manual page. Any particular reason for this restriction? The one reason I can think of is that it might allow J. Random User on a cpu server to pose as eve to a remote client, since authcheck also allows you to sign authenticators with eve's secret key. So how about allowing authcheck to check client credentials and sign server authenticators, but only in the case that the user is eve? From cse.psu.edu!9fans-admin Sat Nov 3 23:57:26 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sat Nov 3 23:57:26 JST 2001 Received: (qmail 18601 invoked by uid 1020); 3 Nov 2001 23:57:26 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 18597 invoked from network); 3 Nov 2001 23:57:26 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 3 Nov 2001 23:57:26 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2B1C5199EE; Sat, 3 Nov 2001 09:57:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from wintermute.cse.psu.edu (unknown [130.203.8.5]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id F02C7199B5 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 09:56:16 -0500 (EST) Received: from paxvill.com (unknown [211.38.202.51]) by wintermute.cse.psu.edu (Postfix Null Client) with SMTP id 1EE8573CA1 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 09:56:11 -0500 (EST) From: HotBoard.com To: <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/html; charset=iso-8859-1; Content-Transfer-Encoding: 7bit Message-Id: <20011103145612.1EE8573CA1@wintermute.cse.psu.edu> Subject: [9fans] [ADV] Win a Porsche Boxter! or $25,000 Official rules! Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 3 Nov 2001 09:56:12 -0500 (EST)

The  Best Site related to Stocks of this week
recommending from HotBoard.com!

Win a Porsche Boxter! or

$25,000 Official rules!

  Everybody can join our contest, which currently is for free.   Click here

Stock Picks & Recommendations Community Investing Supersite With Free Analyst Stock Recommendations, Investing Tools, News and Message Boards.

International Stock Picks, news, quotes, charts, chat, and messageboards

 Click here

      

Win a Porsche Boxter!

Win a Porsche Boxter!
- or $25,000

Everybody can join our contest,
which currently is for free.
Click here

Market headlines

Click Here To Be Removed From Our Mailing List!

From cse.psu.edu!9fans-admin Sun Nov 4 05:36:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sun Nov 4 05:36:24 JST 2001 Received: (qmail 22698 invoked by uid 1020); 4 Nov 2001 05:36:24 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 22694 invoked from network); 4 Nov 2001 05:36:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 4 Nov 2001 05:36:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 0DED2199FA; Sat, 3 Nov 2001 15:36:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from workbench.borf.com (unknown [205.185.197.248]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 558E5199B5 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 15:35:28 -0500 (EST) From: bwc@borf.com To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011103203528.558E5199B5@mail.cse.psu.edu> Subject: [9fans] QID reference Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 3 Nov 2001 15:37:08 -0500 What's the idea behind the vers/path in the 9P qid? Is path just a serial number? Is there a reference to the literature? Brantley Coile From cse.psu.edu!9fans-admin Sun Nov 4 06:20:30 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sun Nov 4 06:20:30 JST 2001 Received: (qmail 23168 invoked by uid 1020); 4 Nov 2001 06:20:30 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 23164 invoked from network); 4 Nov 2001 06:20:29 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 4 Nov 2001 06:20:29 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 9663719A06; Sat, 3 Nov 2001 16:20:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.noos.fr (aragon.noos.net [212.198.2.75]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7C4C8199B5 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 16:19:26 -0500 (EST) Received: (qmail 47521941 invoked by uid 0); 3 Nov 2001 21:19:24 -0000 Received: from unknown (HELO SOMA) ([212.198.185.249]) (envelope-sender ) by 212.198.2.75 (qmail-ldap-1.03) with SMTP for <9fans@cse.psu.edu>; 3 Nov 2001 21:19:24 -0000 Message-ID: <093801c164ac$9e3572e0$f9b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <20011103203528.558E5199B5@mail.cse.psu.edu> Subject: Re: [9fans] QID reference MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 3 Nov 2001 22:15:07 +0100 > What's the idea behind the vers/path in the 9P qid? Is path > just a serial number? Is there a reference to the literature? As one with the knowledge and magic of the source -- Yes From cse.psu.edu!9fans-admin Sun Nov 4 15:21:27 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sun Nov 4 15:21:27 JST 2001 Received: (qmail 29795 invoked by uid 1020); 4 Nov 2001 15:21:27 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 29791 invoked from network); 4 Nov 2001 15:21:26 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 4 Nov 2001 15:21:26 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.18.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C63DA19A08; Sun, 4 Nov 2001 01:21:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id BFEBA199B5 for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 01:20:58 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] QID reference From: "rob pike" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ulyajeyofsdyqugmtwktjadzkr" Message-Id: <20011104062058.BFEBA199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 01:20:56 -0500 This is a multi-part message in MIME format. --upas-ulyajeyofsdyqugmtwktjadzkr Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit The version number increments on each modification. The path is unique on that file system; no other specification is made. -rob --upas-ulyajeyofsdyqugmtwktjadzkr Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Sat Nov 3 15:36:18 EST 2001 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 27B2F19A02; Sat, 3 Nov 2001 15:36:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from workbench.borf.com (unknown [205.185.197.248]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 558E5199B5 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 15:35:28 -0500 (EST) From: bwc@borf.com To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011103203528.558E5199B5@mail.cse.psu.edu> Subject: [9fans] QID reference Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 3 Nov 2001 15:37:08 -0500 What's the idea behind the vers/path in the 9P qid? Is path just a serial number? Is there a reference to the literature? Brantley Coile --upas-ulyajeyofsdyqugmtwktjadzkr-- From cse.psu.edu!9fans-admin Sun Nov 4 20:30:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Sun Nov 4 20:30:24 JST 2001 Received: (qmail 951 invoked by uid 1020); 4 Nov 2001 20:30:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 947 invoked from network); 4 Nov 2001 20:30:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 4 Nov 2001 20:30:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id A0E2F19A0C; Sun, 4 Nov 2001 06:30:07 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from skeeve.com (ads5.ads.active.net.il [192.117.127.213]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 5BF87199B5 for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 06:29:06 -0500 (EST) Received: (from arnold@localhost) by skeeve.com (8.11.0/8.11.0) id fA4BQeB24653 for 9fans@cse.psu.edu; Sun, 4 Nov 2001 13:26:40 +0200 From: Aharon Robbins Message-Id: <200111041126.fA4BQeB24653@skeeve.com> To: 9fans@cse.psu.edu Subject: [9fans] test version of new 9menu available Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 13:26:40 +0200 For anyone still using Unix/Linux and 9term/sam/9wm, a new version of the 9menu program is available for testing from ftp://freefriends.org/arnold/upload/9menu-1.6-test.shar.gz The `upload' directory is executable but not readable. If there are no problems, I'll move it to the generally available `Source' directory. Thanks, Arnold Robbins arnold@skeeve.com From cse.psu.edu!9fans-admin Mon Nov 5 04:20:25 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 04:20:25 JST 2001 Received: (qmail 5122 invoked by uid 1020); 5 Nov 2001 04:20:25 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5118 invoked from network); 5 Nov 2001 04:20:25 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 04:20:25 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 5803519A17; Sun, 4 Nov 2001 14:20:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from doppio.vitanuova.com (unknown [62.254.170.97]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 40FA3199B5 for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 14:19:17 -0500 (EST) From: forsyth@vitanuova.com To: 9fans@cse.psu.edu Subject: Re: [9fans] QID reference MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-rkxhyudeitznmevdhdleefelxw" Message-Id: <20011104191917.40FA3199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 19:19:56 0000 This is a multi-part message in MIME format. --upas-rkxhyudeitznmevdhdleefelxw Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit it is discussed by intro(5): ... The qid represents the server's unique identification for the file being accessed: two files on the same server hierarchy are the same if and only if their qids are the same. (The client may have multiple fids pointing to a single file on a server and hence having a single qid.) The eight-byte qid fields represent two four-byte unsigned integers: first the qid path, then the qid version. The path is an integer unique among all files in the hierarchy. If a file is deleted and recreated with the same name in the same direc- tory, the old and new path components of the qids should be different. Directories always have the CHDIR bit (0x80000000) set in their qid path. The version is a ver- sion number for a file; typically, it is incremented every time the file is modified. it's quite important that Qid.path be unique for active files in the same hierarchy (identified by type and dev), otherwise bind and mount will malfunction because they ultimately depend on Qid values via the mount table. for that reason, exportfs(4) resolves qid.path clashes that can occur when it exports a hierarchy with binds and mounts within it. (the importing system will expect Qid.path to be unique in the hierarchy it sees, but the original type and dev that separated the Qid.path spaces on the exporting system are not seen on the importing system.) Qid.vers is less critical but is used by the kernel file cache for mounted file systems, and by cfs(4) and others. devices often don't maintain it; support elsewhere is a little patchy, but kfs and the file server kernel do support it, as does env(3). --upas-rkxhyudeitznmevdhdleefelxw Content-Type: message/rfc822 Content-Disposition: inline Return-Path: <9fans-admin@cse.psu.edu> Received: from punt-1.mail.demon.net by mailstore for forsyth@vitanuova.com id 1004819806:10:12639:1; Sat, 03 Nov 2001 20:36:46 GMT Received: from psuvax1.cse.psu.edu ([130.203.4.6]) by punt-1.mail.demon.net id aa1120294; 3 Nov 2001 20:36 GMT Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 27B2F19A02; Sat, 3 Nov 2001 15:36:05 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from workbench.borf.com (unknown [205.185.197.248]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 558E5199B5 for <9fans@cse.psu.edu>; Sat, 3 Nov 2001 15:35:28 -0500 (EST) To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011103203528.558E5199B5@mail.cse.psu.edu> Subject: [9fans] QID reference Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sat, 3 Nov 2001 15:37:08 -0500 What's the idea behind the vers/path in the 9P qid? Is path just a serial number? Is there a reference to the literature? Brantley Coile --upas-rkxhyudeitznmevdhdleefelxw-- From cse.psu.edu!9fans-admin Mon Nov 5 04:49:21 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 04:49:21 JST 2001 Received: (qmail 5261 invoked by uid 1020); 5 Nov 2001 04:49:21 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 5257 invoked from network); 5 Nov 2001 04:49:20 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 04:49:20 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7791119A1C; Sun, 4 Nov 2001 14:49:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from cosym.net (peter.sys.9srv.net [64.7.3.116]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B20E319A0D for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 14:48:36 -0500 (EST) From: anothy@cosym.net To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Message-Id: <20011104194836.B20E319A0D@mail.cse.psu.edu> Subject: [9fans] fs upgrade Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 14:48:23 -0500 okay, so i've got this file server. given my space and money constraints, it's a pseudo-worm, running off a single 36GB SCSI disk. said disk is nearing capacity. as one might imagine, i'd like to add capacity to my file server. how do i do so? i'm particularly interested in how to do so without loss of all my history, and, if possible, without wasting a disk of size equal to my current fs. i've heard tell on this list of people upgrading file servers, changing jukeboxes and retaining the history, and so on. the common response seems to be "it's not too hard." great. so please describe the procedure to someone interested in doing it. the above is a hypothetical question. i do actually have the disk and box, but havn't set up the file server yet. i want to know the process for upgrades before i set up my file server with _any_ set size for storage. so... anyone? ã‚¢ From cse.psu.edu!9fans-admin Mon Nov 5 10:46:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 10:46:24 JST 2001 Received: (qmail 9525 invoked by uid 1020); 5 Nov 2001 10:46:24 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 9521 invoked from network); 5 Nov 2001 10:46:24 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 10:46:24 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6487119A11; Sun, 4 Nov 2001 20:46:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from dircon.co.uk (unknown [210.115.222.2]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 5241E199B5 for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 20:45:10 -0500 (EST) Received: (from digbyt@localhost) by dircon.co.uk (8.8.7/8.8.7) id LAA00668; Mon, 5 Nov 2001 11:52:12 +0900 From: Digby Tarvin Message-Id: <200111050252.LAA00668@dircon.co.uk> To: dalehube@enoreo.on.ca (Dale Hubert) Cc: ipaq@handhelds.org, 9fans@cse.psu.edu In-Reply-To: <000501c16531$abfa6040$7e01fea9@cr42400a> from "Dale Hubert" at Nov 4, 1 08:07:28 am Content-Type: text Subject: [9fans] Re: iPAQ printing Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu X-Reply-To: digbyt@acm.org List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 101 11:52:12 +0900 (KST) Hello Dale, My impression so far is that the ipaq is neat hardware that is still waiting for some suitable software to run on it. I gave up on WinCE after a few days, concluding that it was vastly inferior to my old Psion EPOCH O/S and didn't seem to attempt to work as an independent computer. Everything seemed to revolve around the assumption that you would have ready access to a desktop machine and would only work offline for brief periods :-/ I have loaded up Linux which is much more interesting, but really only at the 'some assembly required' stage. As soon as I sort out a viable LAN and get some native compilers going it will definately beat the pants off WinCE though..... I am, however, most optimistic about the prospects for Plan9 or Inferno - both of which are actively being developed for IPAQ, and are far more modern, elegant and efficient than WinCE or even Linux. (I think they currently assume a wireless lan with access to a separate file server) These too are still not quite ready for the general masses, but Compaq have done the right thing in making adequate hardware docs available, so I am confident that the IPAQ will become a useful tool... Just a pity Compaq had to waste so much of their resources following the Microsft bandwagon rather than putting a useful OS on it to start with.... Regards, DigbyT P.S. in answer to your original question - no, I did not get any suggestions regarding printing from WinCE. And when I pointed my IPAQ at my HP Laserjet, I didn't get the slightest hint of any recognition, so you got further than I did. Perhaps your IPAQ was running newer firmware? But if WinCE needs third party software to actually print a file, it doesn't sound like something worth wasting time on to me. >Hello > >I am wondering whether anyone gave you any good advice on printing from your >iPAQ. I just bought one and figured it's got a beam function, so why not >print? I held it up to an HP 6P printer with an infrared and the light on >the printer started flashing, the iPAQ showed that it had encountered a >printer and even gave the correct name- then nothing. I got a "failed" >message. > >Tech support at Compaq said it won't print that way until some 3rd party >comes up with printing software. A hand held computer running a word >processor that won't print? Seems like an oversight to me. > >Anyway, I hope you had better luck than I did finding a solution. > >Dale Hubert From cse.psu.edu!9fans-admin Mon Nov 5 14:33:24 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 14:33:24 JST 2001 Received: (qmail 15467 invoked by uid 1020); 5 Nov 2001 14:33:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 15463 invoked from network); 5 Nov 2001 14:33:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 14:33:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id C66A419A26; Mon, 5 Nov 2001 00:33:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from granite.cias.osakafu-u.ac.jp (granite.cias.osakafu-u.ac.jp [157.16.101.69]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 81F57199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 00:32:42 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] Alpha success (w/ clock.c bugfix and ether2114x.c update) From: okamoto@granite.cias.osakafu-u.ac.jp MIME-Version: 1.0 Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011105053242.81F57199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 14:32:53 +0900 Oops! I've forgotten to report this. >I have a DEC PC with PentiumII 266MHz, from which I'm now typing. >This PC (PC 5510) has 21143 chip on the motherboard. I failed to make >it work for Plan 9, and am using another ether card... This was solved by Jim, and now it's working very fine for me. Thank you very much Jim. Kenji From cse.psu.edu!9fans-admin Mon Nov 5 16:36:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 16:36:22 JST 2001 Received: (qmail 18701 invoked by uid 1020); 5 Nov 2001 16:36:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 18697 invoked from network); 5 Nov 2001 16:36:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 16:36:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id EEF8C19A02; Mon, 5 Nov 2001 02:36:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 510D7199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 02:35:08 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] fs upgrade From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-bixjnokyicyflttuhamgaxzlni" Message-Id: <20011105073508.510D7199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 08:34:38 +0100 This is a multi-part message in MIME format. --upas-bixjnokyicyflttuhamgaxzlni Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I think you just have to copy the old device into the bigger one; the fs kernel would note a resize and simply adjust the new limits and keep on burning the worm. However, since I tried with two disks of the same size and they were ide, I'd wait for acks/nacks from others. --upas-bixjnokyicyflttuhamgaxzlni Content-Type: message/rfc822 Content-Disposition: inline Received: from gsyc.escet.urjc.es ([212.128.1.45]) by aquamar; Sun Nov 4 20:49:25 MET 2001 Received: from mail.cse.psu.edu (postfix@psuvax1.cse.psu.edu [130.203.4.6]) by gsyc.escet.urjc.es (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA11007; Sun, 4 Nov 2001 20:49:24 +0100 X-Authentication-Warning: gsyc.escet.urjc.es: Host postfix@psuvax1.cse.psu.edu [130.203.4.6] claimed to be mail.cse.psu.edu Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7791119A1C; Sun, 4 Nov 2001 14:49:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from cosym.net (peter.sys.9srv.net [64.7.3.116]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B20E319A0D for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 14:48:36 -0500 (EST) From: anothy@cosym.net To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Message-Id: <20011104194836.B20E319A0D@mail.cse.psu.edu> Subject: [9fans] fs upgrade Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 14:48:23 -0500 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by gsyc.escet.urjc.es id UAA11007 okay, so i've got this file server. given my space and money constraints, it's a pseudo-worm, running off a single 36GB SCSI disk. said disk is nearing capacity. as one might imagine, i'd like to add capacity to my file server. how do i do so? i'm particularly interested in how to do so without loss of all my history, and, if possible, without wasting a disk of size equal to my current fs. i've heard tell on this list of people upgrading file servers, changing jukeboxes and retaining the history, and so on. the common response seems to be "it's not too hard." great. so please describe the procedure to someone interested in doing it. the above is a hypothetical question. i do actually have the disk and box, but havn't set up the file server yet. i want to know the process for upgrades before i set up my file server with _any_ set size for storage. so... anyone? =E3=82=A2 --upas-bixjnokyicyflttuhamgaxzlni-- From cse.psu.edu!9fans-admin Mon Nov 5 17:08:28 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 17:08:28 JST 2001 Received: (qmail 19550 invoked by uid 1020); 5 Nov 2001 17:08:29 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 19546 invoked from network); 5 Nov 2001 17:08:26 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 17:08:26 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 0118419A10; Mon, 5 Nov 2001 03:08:10 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 64503199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 03:07:40 -0500 (EST) To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-zotadcwcqqpcerqfscnrvgcvtg" Message-Id: <20011105080740.64503199B5@mail.cse.psu.edu> Subject: [9fans] acme: hiding certain files in dir windows Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 09:07:34 +0100 This is a multi-part message in MIME format. --upas-zotadcwcqqpcerqfscnrvgcvtg Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, I added a Ignore command to acme to let it ignore files matching a regexp when listing dir contents. I use it to keep the window of my kernel source dir with just the source files; but I think it's also marginally useful to hide ugly dot files on windows browsing unix directories. The usage is simple: Ignore regexp: ignore matching files Ignore: don't ignore anything regexps are those of regexp(6). I attach the changed files here. By the way, why doesn't acme use regexp(2)? Shouldn't we converge to regexp(6)? Just wondering... --upas-zotadcwcqqpcerqfscnrvgcvtg Content-Disposition: attachment; filename=acme.c Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit #include #include #include #include #include #include #include #include #include #include #include #include #include "dat.h" #include "fns.h" /* for generating syms in mkfile only: */ #include #include "edit.h" void mousethread(void*); void keyboardthread(void*); void waitthread(void*); void xfidallocthread(void*); void plumbproc(void*); Reffont **fontcache; int nfontcache; char wdir[512] = "."; Reffont *reffonts[2]; int snarffd = -1; int mainpid; int plumbsendfd; int plumbeditfd; enum{ NSnarf = 1000 /* less than 1024, I/O buffer size */ }; Rune snarfrune[NSnarf+1]; char *fontnames[2] = { "/lib/font/bit/lucidasans/euro.8.font", "/lib/font/bit/lucm/unicode.9.font", }; Reprog* ignoreregx; Command *command; void acmeerrorinit(void); void readfile(Column*, char*); int shutdown(void*, char*); void derror(Display*, char *errorstr) { error(errorstr); } void threadmain(int argc, char *argv[]) { int i; char *p, *loadfile; char buf[256]; Column *c; int ncol; Display *d; static void *arg[1]; rfork(RFENVG|RFNAMEG); ncol = -1; loadfile = nil; ARGBEGIN{ case 'b': bartflag = TRUE; break; case 'c': p = ARGF(); if(p == nil) goto Usage; ncol = atoi(p); if(ncol <= 0) goto Usage; break; case 'i': p = ARGF(); if (p == nil) goto Usage; ignoreregx = regcomp(p); break; case 'f': fontnames[0] = ARGF(); if(fontnames[0] == nil) goto Usage; break; case 'F': fontnames[1] = ARGF(); if(fontnames[1] == nil) goto Usage; break; case 'l': loadfile = ARGF(); if(loadfile == nil) goto Usage; break; default: Usage: fprint(2, "usage: acme -c ncol -f fontname -F fixedwidthfontname -i ignore -l loadfile\n"); exits("usage"); }ARGEND cputype = getenv("cputype"); objtype = getenv("objtype"); home = getenv("home"); p = getenv("tabstop"); if(p != nil){ maxtab = strtoul(p, nil, 0); free(p); } if(maxtab == 0) maxtab = 4; putenv("font", fontnames[0]); snarffd = open("/dev/snarf", OREAD|OCEXEC); if(cputype){ sprint(buf, "/acme/bin/%s", cputype); bind(buf, "/bin", MBEFORE); } bind("/acme/bin", "/bin", MBEFORE); getwd(wdir, sizeof wdir); if(geninitdraw(nil, derror, nil, "acme", nil, Refnone) < 0){ fprint(2, "acme: can't open display: %r\n"); exits("font"); } d = display; font = d->defaultfont; reffont.f = font; reffonts[0] = &reffont; incref(&reffont); /* one to hold up 'font' variable */ incref(&reffont); /* one to hold up reffonts[0] */ fontcache = emalloc(sizeof(Reffont*)); nfontcache = 1; fontcache[0] = &reffont; iconinit(); timerinit(); rxinit(); cwait = threadwaitchan(); ccommand = chancreate(sizeof(Command**), 0); ckill = chancreate(sizeof(Rune*), 0); cxfidalloc = chancreate(sizeof(Xfid*), 0); cxfidfree = chancreate(sizeof(Xfid*), 0); cerr = chancreate(sizeof(char*), 0); cedit = chancreate(sizeof(int), 0); cexit = chancreate(sizeof(int), 0); if(cwait==nil || ccommand==nil || ckill==nil || cxfidalloc==nil || cxfidfree==nil || cerr==nil || cexit==nil){ fprint(2, "acme: can't create initial channels: %r\n"); exits("channels"); } mousectl = initmouse(nil, screen); if(mousectl == nil){ fprint(2, "acme: can't initialize mouse: %r\n"); exits("mouse"); } mouse = mousectl; keyboardctl = initkeyboard(nil); if(keyboardctl == nil){ fprint(2, "acme: can't initialize keyboard: %r\n"); exits("keyboard"); } mainpid = getpid(); plumbeditfd = plumbopen("edit", OREAD|OCEXEC); if(plumbeditfd >= 0){ cplumb = chancreate(sizeof(Plumbmsg*), 0); proccreate(plumbproc, nil, STACK); } plumbsendfd = plumbopen("send", OWRITE|OCEXEC); fsysinit(); #define WPERCOL 8 disk = diskinit(); if(loadfile) rowload(&row, loadfile, TRUE); else{ rowinit(&row, screen->clipr); if(ncol < 0){ if(argc == 0) ncol = 2; else{ ncol = (argc+(WPERCOL-1))/WPERCOL; if(ncol < 2) ncol = 2; } } if(ncol == 0) ncol = 2; for(i=0; i=row.ncol) readfile(c, argv[i]); else readfile(row.col[i/WPERCOL], argv[i]); } } flushimage(display, 1); acmeerrorinit(); threadcreate(keyboardthread, nil, STACK); threadcreate(mousethread, nil, STACK); threadcreate(waitthread, nil, STACK); threadcreate(xfidallocthread, nil, STACK); atnotify(shutdown, 1); recvul(cexit); killprocs(); threadexitsall(nil); } void readfile(Column *c, char *s) { Window *w; Rune rb[256]; int nb, nr; Runestr rs; w = coladd(c, nil, nil, -1); cvttorunes(s, strlen(s), rb, &nb, &nr, nil); rs = cleanrname((Runestr){rb, nr}); winsetname(w, rs.r, rs.nr); textload(&w->body, 0, s, 1); w->body.file->mod = FALSE; w->dirty = FALSE; winsettag(w); textscrdraw(&w->body); textsetselect(&w->tag, w->tag.file->nc, w->tag.file->nc); } char *oknotes[] ={ "delete", "hangup", "kill", "kilall", "exit", nil }; int dumping; void shutdown1(void*, char *msg) { int i; notify(nil); killprocs(); if(!dumping && strcmp(msg, "kill")!=0 && strcmp(msg, "exit")!=0 && strcmp(msg, "kilall")!=0 && getpid()==mainpid){ dumping = TRUE; rowdump(&row, nil); } for(i=0; oknotes[i]; i++) if(strncmp(oknotes[i], msg, strlen(oknotes[i])) == 0) threadexitsall(msg); print("acme: %s\n", msg); abort(); } int shutdown(void *a, char *msg) /* extra call to get stack trace on 386 */ { shutdown1(a, msg); return 1; } void killprocs(void) { Command *c; fsysclose(); if(display) flushimage(display, 1); for(c=command; c; c=c->next) postnote(PNGROUP, c->pid, "hangup"); remove(acmeerrorfile); } static int errorfd; void acmeerrorproc(void *) { char *buf; int n; threadsetname("acmeerrorproc"); buf = emalloc(8192+1); while((n=read(errorfd, buf, 8192)) >= 0){ buf[n] = '\0'; sendp(cerr, estrdup(buf)); } } void acmeerrorinit(void) { int fd, pfd[2]; char buf[64]; if(pipe(pfd) < 0) error("can't create pipe"); sprint(acmeerrorfile, "/srv/acme.%s.%d", getuser(), mainpid); fd = create(acmeerrorfile, OWRITE, 0666); if(fd < 0){ remove(acmeerrorfile); fd = create(acmeerrorfile, OWRITE, 0666); if(fd < 0) error("can't create acmeerror file"); } sprint(buf, "%d", pfd[0]); write(fd, buf, strlen(buf)); close(fd); /* reopen pfd[1] close on exec */ sprint(buf, "/fd/%d", pfd[1]); errorfd = open(buf, OREAD|OCEXEC); if(errorfd < 0) error("can't re-open acmeerror file"); close(pfd[1]); close(pfd[0]); proccreate(acmeerrorproc, nil, STACK); } void plumbproc(void *) { Plumbmsg *m; threadsetname("plumbproc"); for(;;){ m = plumbrecv(plumbeditfd); if(m == nil) threadexits(nil); sendp(cplumb, m); } } void keyboardthread(void *) { Rune r; Timer *timer; Text *t; enum { KTimer, KKey, NKALT }; static Alt alts[NKALT+1]; alts[KTimer].c = nil; alts[KTimer].v = nil; alts[KTimer].op = CHANNOP; alts[KKey].c = keyboardctl->c; alts[KKey].v = &r; alts[KKey].op = CHANRCV; alts[NKALT].op = CHANEND; timer = nil; typetext = nil; threadsetname("keyboardthread"); for(;;){ switch(alt(alts)){ case KTimer: timerstop(timer); t = typetext; if(t!=nil && t->what==Tag){ winlock(t->w, 'K'); wincommit(t->w, t); winunlock(t->w); flushimage(display, 1); } alts[KTimer].c = nil; alts[KTimer].op = CHANNOP; break; case KKey: casekeyboard: typetext = rowtype(&row, r, mouse->xy); t = typetext; if(t!=nil && t->col!=nil) activecol = t->col; if(t!=nil && t->w!=nil) t->w->body.file->curtext = &t->w->body; if(timer != nil) timercancel(timer); if(t!=nil && t->what==Tag) { timer = timerstart(500); alts[KTimer].c = timer->c; alts[KTimer].op = CHANRCV; }else{ timer = nil; alts[KTimer].c = nil; alts[KTimer].op = CHANNOP; } if(nbrecv(keyboardctl->c, &r) > 0) goto casekeyboard; flushimage(display, 1); break; } } } void mousethread(void *) { Text *t, *argt; int but; uint q0, q1; Window *w; Plumbmsg *pm; char *act; enum { MResize, MMouse, MPlumb, NMALT }; static Alt alts[NMALT+1]; threadsetname("mousethread"); alts[MResize].c = mousectl->resizec; alts[MResize].v = nil; alts[MResize].op = CHANRCV; alts[MMouse].c = mousectl->c; alts[MMouse].v = &mousectl->Mouse; alts[MMouse].op = CHANRCV; alts[MPlumb].c = cplumb; alts[MPlumb].v = ± alts[MPlumb].op = CHANRCV; if(cplumb == nil) alts[MPlumb].op = CHANNOP; alts[NMALT].op = CHANEND; for(;;){ switch(alt(alts)){ case MResize: if(getwindow(display, Refnone) < 0) error("attach to window"); scrlresize(); rowresize(&row, screen->clipr); flushimage(display, 1); break; case MPlumb: if(strcmp(pm->type, "text") == 0){ act = plumblookup(pm->attr, "action"); if(act==nil || strcmp(act, "showfile")==0) plumblook(pm); else if(strcmp(act, "showdata")==0) plumbshow(pm); } flushimage(display, 1); plumbfree(pm); break; case MMouse: qlock(&row); t = rowwhich(&row, mouse->xy); if(t!=mousetext && mousetext!=nil && mousetext->w!=nil){ winlock(mousetext->w, 'M'); mousetext->eq0 = ~0; wincommit(mousetext->w, mousetext); winunlock(mousetext->w); } mousetext = t; if(t == nil) goto Continue; w = t->w; if(t==nil || mouse->buttons==0) goto Continue; but = 0; if(mouse->buttons == 1) but = 1; else if(mouse->buttons == 2) but = 2; else if(mouse->buttons == 4) but = 3; barttext = t; if(t->what==Body && ptinrect(mouse->xy, t->scrollr)){ if(but){ winlock(w, 'M'); t->eq0 = ~0; textscroll(t, but); winunlock(w); } goto Continue; } if(ptinrect(mouse->xy, t->scrollr)){ if(but){ if(t->what == Columntag) rowdragcol(&row, t->col, but); else if(t->what == Tag){ coldragwin(t->col, t->w, but); if(t->w) barttext = &t->w->body; } if(t->col) activecol = t->col; } goto Continue; } if(mouse->buttons){ if(w) winlock(w, 'M'); t->eq0 = ~0; if(w) wincommit(w, t); else textcommit(t, TRUE); if(mouse->buttons & 1){ textselect(t); if(w) winsettag(w); argtext = t; seltext = t; if(t->col) activecol = t->col; /* button 1 only */ if(t->w!=nil && t==&t->w->body) activewin = t->w; }else if(mouse->buttons & 2){ if(textselect2(t, &q0, &q1, &argt)) execute(t, q0, q1, FALSE, argt); }else if(mouse->buttons & 4){ if(textselect3(t, &q0, &q1)) look3(t, q0, q1, FALSE); } if(w) winunlock(w); goto Continue; } Continue: flushimage(display, 1); qunlock(&row); break; } } } /* * There is a race between process exiting and our finding out it was ever created. * This structure keeps a list of processes that have exited we haven't heard of. */ typedef struct Pid Pid; struct Pid { int pid; char msg[ERRLEN]; Pid *next; }; void waitthread(void *) { Waitmsg w; Command *c, *lc; uint pid; int found, ncmd; Rune *cmd; char *err; Text *t; Pid *pids, *p, *lastp; enum { WErr, WKill, WWait, WCmd, NWALT }; Alt alts[NWALT+1]; threadsetname("waitthread"); pids = nil; alts[WErr].c = cerr; alts[WErr].v = &err; alts[WErr].op = CHANRCV; alts[WKill].c = ckill; alts[WKill].v = &cmd; alts[WKill].op = CHANRCV; alts[WWait].c = cwait; alts[WWait].v = &w; alts[WWait].op = CHANRCV; alts[WCmd].c = ccommand; alts[WCmd].v = &c; alts[WCmd].op = CHANRCV; alts[NWALT].op = CHANEND; command = nil; for(;;){ switch(alt(alts)){ case WErr: qlock(&row); warning(nil, "%s", err); free(err); flushimage(display, 1); qunlock(&row); break; case WKill: found = FALSE; ncmd = runestrlen(cmd); for(c=command; c; c=c->next){ /* -1 for blank */ if(runeeq(c->name, c->nname-1, cmd, ncmd) == TRUE){ if(postnote(PNGROUP, c->pid, "kill") < 0) warning(nil, "kill %S: %r\n", cmd); found = TRUE; } } if(!found) warning(nil, "Kill: no process %S\n", cmd); free(cmd); break; case WWait: pid = atoi(w.pid); lc = nil; for(c=command; c; c=c->next){ if(c->pid == pid){ if(lc) lc->next = c->next; else command = c->next; break; } lc = c; } qlock(&row); t = &row.tag; textcommit(t, TRUE); if(c == nil){ /* helper processes use this exit status */ if(strncmp(w.msg, "libthread", 9) != 0){ p = emalloc(sizeof(Pid)); p->pid = pid; strncpy(p->msg, w.msg, sizeof(p->msg)); p->next = pids; pids = p; } }else{ if(search(t, c->name, c->nname)){ textdelete(t, t->q0, t->q1, TRUE); textsetselect(t, 0, 0); } if(w.msg[0]) warning(c->md, "%s\n", w.msg); flushimage(display, 1); } qunlock(&row); Freecmd: if(c){ if(c->iseditcmd) sendul(cedit, 0); free(c->text); free(c->av); free(c->name); fsysdelid(c->md); free(c); } break; case WCmd: /* has this command already exited? */ lastp = nil; for(p=pids; p!=nil; p=p->next){ if(p->pid == c->pid){ if(p->msg[0]) warning(c->md, "%s\n", p->msg); if(lastp == nil) pids = p->next; else lastp->next = p->next; free(p); goto Freecmd; } lastp = p; } c->next = command; command = c; qlock(&row); t = &row.tag; textcommit(t, TRUE); textinsert(t, 0, c->name, c->nname, TRUE); textsetselect(t, 0, 0); flushimage(display, 1); qunlock(&row); break; } } } void xfidallocthread(void*) { Xfid *xfree, *x; enum { Alloc, Free, N }; static Alt alts[N+1]; threadsetname("xfidallocthread"); alts[Alloc].c = cxfidalloc; alts[Alloc].v = nil; alts[Alloc].op = CHANRCV; alts[Free].c = cxfidfree; alts[Free].v = &x; alts[Free].op = CHANRCV; alts[N].op = CHANEND; xfree = nil; for(;;){ switch(alt(alts)){ case Alloc: x = xfree; if(x) xfree = x->next; else{ x = emalloc(sizeof(Xfid)); x->c = chancreate(sizeof(void(*)(Xfid*)), 0); x->arg = x; threadcreate(xfidctl, x->arg, STACK); } sendp(cxfidalloc, x); break; case Free: x->next = xfree; xfree = x; break; } } } Reffont* rfget(int fix, int save, int setfont, char *name) { Reffont *r; Font *f; int i; r = nil; if(name == nil){ name = fontnames[fix]; r = reffonts[fix]; } if(r == nil){ for(i=0; if->name) == 0){ r = fontcache[i]; goto Found; } f = openfont(display, name); if(f == nil){ warning(nil, "can't open font file %s: %r\n", name); return nil; } r = emalloc(sizeof(Reffont)); r->f = f; fontcache = realloc(fontcache, (nfontcache+1)*sizeof(Reffont*)); fontcache[nfontcache++] = r; } Found: if(save){ incref(r); if(reffonts[fix]) rfclose(reffonts[fix]); reffonts[fix] = r; fontnames[fix] = name; } if(setfont){ reffont.f = r->f; incref(r); rfclose(reffonts[0]); font = r->f; reffonts[0] = r; incref(r); iconinit(); } incref(r); return r; } void rfclose(Reffont *r) { int i; if(decref(r) == 0){ for(i=0; i= nfontcache) warning(nil, "internal error: can't find font in cache\n"); else{ nfontcache--; memmove(fontcache+i, fontcache+i+1, (nfontcache-i)*sizeof(Reffont*)); } freefont(r->f); free(r); } } Cursor boxcursor = { {-7, -7}, {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x70, 0x0E, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x00, 0x00} }; void iconinit(void) { Rectangle r; Image *tmp; /* Blue */ tagcols[BACK] = allocimagemix(display, DPalebluegreen, DWhite); tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), display->chan, 1, DPalegreygreen); tagcols[BORD] = allocimage(display, Rect(0,0,1,1), display->chan, 1, DPurpleblue); tagcols[TEXT] = display->black; tagcols[HTEXT] = display->black; /* Yellow */ textcols[BACK] = allocimagemix(display, DPaleyellow, DWhite); textcols[HIGH] = allocimage(display, Rect(0,0,1,1), display->chan, 1, DDarkyellow); textcols[BORD] = allocimage(display, Rect(0,0,1,1), display->chan, 1, DYellowgreen); textcols[TEXT] = display->black; textcols[HTEXT] = display->black; if(button){ freeimage(button); freeimage(modbutton); freeimage(colbutton); } r = Rect(0, 0, Scrollwid+2, font->height+1); button = allocimage(display, r, display->chan, 0, DNofill); draw(button, r, tagcols[BACK], nil, r.min); r.max.x -= 2; border(button, r, 2, tagcols[BORD], ZP); r = button->r; modbutton = allocimage(display, r, display->chan, 0, DNofill); draw(modbutton, r, tagcols[BACK], nil, r.min); r.max.x -= 2; border(modbutton, r, 2, tagcols[BORD], ZP); r = insetrect(r, 2); tmp = allocimage(display, Rect(0,0,1,1), display->chan, 1, DMedblue); draw(modbutton, r, tmp, nil, ZP); freeimage(tmp); r = button->r; colbutton = allocimage(display, r, display->chan, 0, DPurpleblue); but2col = allocimage(display, r, display->chan, 1, 0xAA0000FF); but3col = allocimage(display, r, display->chan, 1, 0x006600FF); } /* * /dev/snarf updates when the file is closed, so we must open our own * fd here rather than use snarffd */ /* rio truncates larges snarf buffers, so this avoids using the * service if the string is huge */ #define MAXSNARF 100*1024 void putsnarf(void) { int fd, i, n; if(snarffd<0 || snarfbuf.nc==0) return; if(snarfbuf.nc > MAXSNARF) return; fd = open("/dev/snarf", OWRITE); if(fd < 0) return; for(i=0; i= NSnarf) n = NSnarf; bufread(&snarfbuf, i, snarfrune, n); if(fprint(fd, "%.*S", n, snarfrune) < 0) break; } close(fd); } void getsnarf() { int nulls; if(snarfbuf.nc > MAXSNARF) return; if(snarffd < 0) return; seek(snarffd, 0, 0); bufreset(&snarfbuf); bufload(&snarfbuf, 0, snarffd, &nulls); } --upas-zotadcwcqqpcerqfscnrvgcvtg Content-Disposition: attachment; filename=exec.c Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit #include #include #include #include #include #include #include #include #include #include #include #include "dat.h" #include "fns.h" Buffer snarfbuf; void del(Text*, Text*, Text*, int, int, Rune*, int); void delcol(Text*, Text*, Text*, int, int, Rune*, int); void dump(Text*, Text*, Text*, int, int, Rune*, int); void edit(Text*, Text*, Text*, int, int, Rune*, int); void exit(Text*, Text*, Text*, int, int, Rune*, int); void fontx(Text*, Text*, Text*, int, int, Rune*, int); void get(Text*, Text*, Text*, int, int, Rune*, int); void id(Text*, Text*, Text*, int, int, Rune*, int); void ignore(Text*, Text*, Text*, int, int, Rune*, int); void incl(Text*, Text*, Text*, int, int, Rune*, int); void kill(Text*, Text*, Text*, int, int, Rune*, int); void local(Text*, Text*, Text*, int, int, Rune*, int); void look(Text*, Text*, Text*, int, int, Rune*, int); void newcol(Text*, Text*, Text*, int, int, Rune*, int); void paste(Text*, Text*, Text*, int, int, Rune*, int); void put(Text*, Text*, Text*, int, int, Rune*, int); void putall(Text*, Text*, Text*, int, int, Rune*, int); void sendx(Text*, Text*, Text*, int, int, Rune*, int); void sort(Text*, Text*, Text*, int, int, Rune*, int); void tab(Text*, Text*, Text*, int, int, Rune*, int); void zeroxx(Text*, Text*, Text*, int, int, Rune*, int); extern Reprog* ignoreregx; typedef struct Exectab Exectab; struct Exectab { Rune *name; void (*fn)(Text*, Text*, Text*, int, int, Rune*, int); int mark; int flag1; int flag2; }; Exectab exectab[] = { { L"Cut", cut, TRUE, TRUE, TRUE }, { L"Del", del, FALSE, FALSE, XXX }, { L"Delcol", delcol, FALSE, XXX, XXX }, { L"Delete", del, FALSE, TRUE, XXX }, { L"Dump", dump, FALSE, TRUE, XXX }, { L"Edit", edit, FALSE, XXX, XXX }, { L"Exit", exit, FALSE, XXX, XXX }, { L"Font", fontx, FALSE, XXX, XXX }, { L"Get", get, FALSE, TRUE, XXX }, { L"Ignore", ignore, FALSE, XXX, XXX }, { L"ID", id, FALSE, XXX, XXX }, { L"Incl", incl, FALSE, XXX, XXX }, { L"Kill", kill, FALSE, XXX, XXX }, { L"Load", dump, FALSE, FALSE, XXX }, { L"Local", local, FALSE, XXX, XXX }, { L"Look", look, FALSE, XXX, XXX }, { L"New", new, FALSE, XXX, XXX }, { L"Newcol", newcol, FALSE, XXX, XXX }, { L"Paste", paste, TRUE, TRUE, XXX }, { L"Put", put, FALSE, XXX, XXX }, { L"Putall", putall, FALSE, XXX, XXX }, { L"Redo", undo, FALSE, FALSE, XXX }, { L"Send", sendx, TRUE, XXX, XXX }, { L"Snarf", cut, FALSE, TRUE, FALSE }, { L"Sort", sort, FALSE, XXX, XXX }, { L"Tab", tab, FALSE, XXX, XXX }, { L"Undo", undo, FALSE, TRUE, XXX }, { L"Zerox", zeroxx, FALSE, XXX, XXX }, { nil, nil, 0, 0, 0 }, }; Exectab* lookup(Rune *r, int n) { Exectab *e; int nr; r = skipbl(r, n, &n); if(n == 0) return nil; findbl(r, n, &nr); nr = n-nr; for(e=exectab; e->name; e++) if(runeeq(r, nr, e->name, runestrlen(e->name)) == TRUE) return e; return nil; } int isexecc(int c) { if(isfilec(c)) return 1; return c=='<' || c=='|' || c=='>'; } void execute(Text *t, uint aq0, uint aq1, int external, Text *argt) { uint q0, q1; Rune *r, *s; char *b, *a, *aa; Exectab *e; int c, n, f; Runestr dir; q0 = aq0; q1 = aq1; if(q1 == q0){ /* expand to find word (actually file name) */ /* if in selection, choose selection */ if(t->q1>t->q0 && t->q0<=q0 && q0<=t->q1){ q0 = t->q0; q1 = t->q1; }else{ while(q1file->nc && isexecc(c=textreadc(t, q1)) && c!=':') q1++; while(q0>0 && isexecc(c=textreadc(t, q0-1)) && c!=':') q0--; if(q1 == q0) return; } } r = runemalloc(q1-q0); bufread(t->file, q0, r, q1-q0); e = lookup(r, q1-q0); if(!external && t->w!=nil && t->w->nopen[QWevent]>0){ f = 0; if(e) f |= 1; if(q0!=aq0 || q1!=aq1){ bufread(t->file, aq0, r, aq1-aq0); f |= 2; } aa = getbytearg(argt, TRUE, TRUE, &a); if(a){ if(strlen(a) > EVENTSIZE){ /* too big; too bad */ free(aa); free(a); warning(nil, "`argument string too long\n"); return; } f |= 8; } c = 'x'; if(t->what == Body) c = 'X'; n = aq1-aq0; if(n <= EVENTSIZE) winevent(t->w, "%c%d %d %d %d %.*S\n", c, aq0, aq1, f, n, n, r); else winevent(t->w, "%c%d %d %d 0 \n", c, aq0, aq1, f, n); if(q0!=aq0 || q1!=aq1){ n = q1-q0; bufread(t->file, q0, r, n); if(n <= EVENTSIZE) winevent(t->w, "%c%d %d 0 %d %.*S\n", c, q0, q1, n, n, r); else winevent(t->w, "%c%d %d 0 0 \n", c, q0, q1, n); } if(a){ winevent(t->w, "%c0 0 0 %d %s\n", c, utflen(a), a); if(aa) winevent(t->w, "%c0 0 0 %d %s\n", c, utflen(aa), aa); else winevent(t->w, "%c0 0 0 0 \n", c); } free(r); free(aa); free(a); return; } if(e){ if(e->mark && seltext!=nil) if(seltext->what == Body){ seq++; filemark(seltext->w->body.file); } s = skipbl(r, q1-q0, &n); s = findbl(s, n, &n); s = skipbl(s, n, &n); (*e->fn)(t, seltext, argt, e->flag1, e->flag2, s, n); free(r); return; } b = runetobyte(r, q1-q0); free(r); dir = dirname(t, nil, 0); if(dir.nr==1 && dir.r[0]=='.'){ /* sigh */ free(dir.r); dir.r = nil; dir.nr = 0; } aa = getbytearg(argt, TRUE, TRUE, &a); if(t->w) incref(t->w); run(t->w, b, dir.r, dir.nr, TRUE, aa, a, FALSE); } char* printarg(Text *argt, uint q0, uint q1) { char *buf; if(argt->what!=Body || argt->file->name==nil) return nil; buf = emalloc(argt->file->nname+32); if(q0 == q1) sprint(buf, "%.*S:#%d", argt->file->nname, argt->file->name, q0); else sprint(buf, "%.*S:#%d,#%d", argt->file->nname, argt->file->name, q0, q1); return buf; } char* getarg(Text *argt, int doaddr, int dofile, Rune **rp, int *nrp) { int n; Expand e; char *a; *rp = nil; *nrp = 0; if(argt == nil) return nil; a = nil; textcommit(argt, TRUE); if(expand(argt, argt->q0, argt->q1, &e)){ free(e.bname); if(e.nname && dofile){ e.name = runerealloc(e.name, e.nname+1); if(doaddr) a = printarg(argt, e.q0, e.q1); *rp = e.name; *nrp = e.nname; return a; } free(e.name); }else{ e.q0 = argt->q0; e.q1 = argt->q1; } n = e.q1 - e.q0; *rp = runemalloc(n+1); bufread(argt->file, e.q0, *rp, n); if(doaddr) a = printarg(argt, e.q0, e.q1); *nrp = n; return a; } char* getbytearg(Text *argt, int doaddr, int dofile, char **bp) { Rune *r; int n; char *aa; *bp = nil; aa = getarg(argt, doaddr, dofile, &r, &n); if(r == nil) return nil; *bp = runetobyte(r, n); free(r); return aa; } void newcol(Text *et, Text*, Text*, int, int, Rune*, int) { Column *c; c = rowadd(et->row, nil, -1); if(c) winsettag(coladd(c, nil, nil, -1)); } void delcol(Text *et, Text*, Text*, int, int, Rune*, int) { int i; Column *c; Window *w; c = et->col; if(c==nil || colclean(c)==0) return; for(i=0; inw; i++){ w = c->w[i]; if(w->nopen[QWevent]+w->nopen[QWaddr]+w->nopen[QWdata] > 0){ warning(nil, "can't delete column; %.*S is running an external command\n", w->body.file->nname, w->body.file->name); return; } } rowclose(et->col->row, et->col, TRUE); } void del(Text *et, Text*, Text*, int flag1, int, Rune*, int) { if(et->col==nil || et->w == nil) return; if(flag1 || et->w->body.file->ntext>1 || winclean(et->w, FALSE)) colclose(et->col, et->w, TRUE); } void sort(Text *et, Text*, Text*, int, int, Rune*, int) { if(et->col) colsort(et->col); } uint seqof(Window *w, int isundo) { /* if it's undo, see who changed with us */ if(isundo) return w->body.file->seq; /* if it's redo, see who we'll be sync'ed up with */ return fileredoseq(w->body.file); } void undo(Text *et, Text*, Text*, int flag1, int, Rune*, int) { int i, j; Column *c; Window *w; uint seq; if(et==nil || et->w== nil) return; seq = seqof(et->w, flag1); if(seq == 0){ /* nothing to undo */ return; } /* * Undo the executing window first. Its display will update. other windows * in the same file will not call show() and jump to a different location in the file. * Simultaneous changes to other files will be chaotic, however. */ winundo(et->w, flag1); for(i=0; inw; j++){ w = c->w[j]; if(w == et->w) continue; if(seqof(w, flag1) == seq) winundo(w, flag1); } } } char* getname(Text *t, Text *argt, Rune *arg, int narg, int isput) { char *s; Rune *r; int i, n, promote; Runestr dir; getarg(argt, FALSE, TRUE, &r, &n); promote = FALSE; if(r == nil) promote = TRUE; else if(isput){ /* if are doing a Put, want to synthesize name even for non-existent file */ /* best guess is that file name doesn't contain a slash */ promote = TRUE; for(i=0; ifile->name, t->file->nname); return s; } /* prefix with directory name if necessary */ dir.r = nil; dir.nr = 0; if(n>0 && arg[0]!='/'){ dir = dirname(t, nil, 0); if(n==1 && dir.r[0]=='.'){ /* sigh */ free(dir.r); dir.r = nil; dir.nr = 0; } } if(dir.r){ r = runemalloc(dir.nr+n+1); runemove(r, dir.r, dir.nr); free(dir.r); runemove(r+dir.nr, arg, n); n += dir.nr; }else{ r = runemalloc(n+1); runemove(r, arg, n); } } s = runetobyte(r, n); free(r); if(strlen(s) == 0){ free(s); s = nil; } return s; } void zeroxx(Text *et, Text *t, Text*, int, int, Rune*, int) { Window *nw; int c, locked; locked = FALSE; if(t!=nil && t->w!=nil && t->w!=et->w){ locked = TRUE; c = 'M'; if(et->w) c = et->w->owner; winlock(t->w, c); } if(t == nil) t = et; if(t==nil || t->w==nil) return; t = &t->w->body; if(t->w->isdir) warning(nil, "%.*S is a directory; Zerox illegal\n", t->file->nname, t->file->name); else{ nw = coladd(t->w->col, nil, t->w, -1); /* ugly: fix locks so w->unlock works */ winlock1(nw, t->w->owner); } if(locked) winunlock(t->w); } void get(Text *et, Text *t, Text *argt, int flag1, int, Rune *arg, int narg) { char *name; Rune *r; int i, n, dirty, samename; Window *w; Text *u; Dir d; if(flag1) if(et==nil || et->w==nil) return; if(!et->w->isdir && (et->w->body.file->nc>0 && !winclean(et->w, TRUE))) return; w = et->w; t = &w->body; name = getname(t, argt, arg, narg, FALSE); if(name == nil){ warning(nil, "no file name\n"); return; } if(t->file->ntext>1 && dirstat(name, &d)==0 && d.qid.path & CHDIR){ warning(nil, "%s is a directory; can't read with multiple windows on it\n", name); return; } r = bytetorune(name, &n); for(i=0; ifile->ntext; i++){ u = t->file->text[i]; /* second and subsequent calls with zero an already empty buffer, but OK */ textreset(u); windirfree(u->w); } samename = runeeq(r, n, t->file->name, t->file->nname); textload(t, 0, name, samename); if(samename){ t->file->mod = FALSE; dirty = FALSE; }else{ t->file->mod = TRUE; dirty = TRUE; } for(i=0; ifile->ntext; i++) t->file->text[i]->w->dirty = dirty; free(name); free(r); winsettag(w); t->file->unread = FALSE; for(i=0; ifile->ntext; i++){ u = t->file->text[i]; textsetselect(&u->w->tag, u->w->tag.file->nc, u->w->tag.file->nc); textscrdraw(u); } } void putfile(File *f, int q0, int q1, Rune *namer, int nname) { uint n, m; Rune *r; char *s, *name; int i, fd, q; Dir d; Window *w; w = f->curtext->w; name = runetobyte(namer, nname); if(runeeq(namer, nname, f->name, f->nname) && dirstat(name, &d)>=0){ if(f->dev!=d.dev || f->qidpath!=d.qid.path || f->mtimedev = d.dev; f->qidpath = d.qid.path; f->mtime = d.mtime; if(f->unread) warning(nil, "%s not written; file already exists\n", name); else warning(nil, "%s modified since last read\n", name); goto Rescue1; } } fd = create(name, OWRITE, 0666); if(fd < 0){ warning(nil, "can't create file %s: %r\n", name); goto Rescue1; } r = fbufalloc(); s = fbufalloc(); if(dirfstat(fd, &d)>=0 && (d.mode&CHAPPEND) && d.length>0){ warning(nil, "%s not written; file is append only\n", name); goto Rescue2; } for(q=q0; q BUFSIZE/UTFmax) n = BUFSIZE/UTFmax; bufread(f, q, r, n); m = snprint(s, BUFSIZE+1, "%.*S", n, r); if(write(fd, s, m) != m){ warning(nil, "can't write file %s: %r\n", name); goto Rescue2; } } if(runeeq(namer, nname, f->name, f->nname)){ if(q0!=0 || q1!=f->nc){ f->mod = TRUE; w->dirty = TRUE; f->unread = TRUE; }else{ dirfstat(fd, &d); /* ignore error; use old values if we failed */ f->qidpath = d.qid.path; f->dev = d.dev; f->mtime = d.mtime; f->mod = FALSE; w->dirty = FALSE; f->unread = FALSE; } for(i=0; intext; i++){ f->text[i]->w->putseq = f->seq; f->text[i]->w->dirty = w->dirty; } } fbuffree(s); fbuffree(r); free(namer); free(name); close(fd); winsettag(w); return; Rescue2: fbuffree(s); fbuffree(r); close(fd); /* fall through */ Rescue1: free(namer); free(name); } void put(Text *et, Text*, Text *argt, int, int, Rune *arg, int narg) { int nname; Rune *namer; Window *w; File *f; char *name; if(et==nil || et->w==nil || et->w->isdir) return; w = et->w; f = w->body.file; name = getname(&w->body, argt, arg, narg, TRUE); if(name == nil){ warning(nil, "no file name\n"); return; } namer = bytetorune(name, &nname); putfile(f, 0, f->nc, namer, nname); free(name); } void dump(Text *, Text *, Text *argt, int isdump, int, Rune *arg, int narg) { char *name; if(narg) name = runetobyte(arg, narg); else getbytearg(argt, FALSE, TRUE, &name); if(isdump) rowdump(&row, name); else rowload(&row, name, FALSE); free(name); } void ignore(Text *, Text *, Text *argt, int, int, Rune *arg, int narg) { char *exp; exp = nil; if(narg) exp = runetobyte(arg, narg); else getbytearg(argt, FALSE, TRUE, &exp); if (ignoreregx) free(ignoreregx); ignoreregx = (exp == nil) ? nil : regcomp(exp); free(exp); } void cut(Text *et, Text *t, Text*, int dosnarf, int docut, Rune*, int) { uint q0, q1, n, locked, c; Rune *r; /* use current window if snarfing and its selection is non-null */ if(et!=t && dosnarf && et->w!=nil){ if(et->w->body.q1>et->w->body.q0){ t = &et->w->body; if(docut) filemark(t->file); /* seq has been incremented by execute */ }else if(et->w->tag.q1>et->w->tag.q0) t = &et->w->tag; } if(t == nil){ /* can only happen if seltext == nil */ return; } locked = FALSE; if(t->w!=nil && et->w!=t->w){ locked = TRUE; c = 'M'; if(et->w) c = et->w->owner; winlock(t->w, c); } if(t->q0 == t->q1){ if(locked) winunlock(t->w); return; } if(dosnarf){ q0 = t->q0; q1 = t->q1; bufdelete(&snarfbuf, 0, snarfbuf.nc); r = fbufalloc(); while(q0 < q1){ n = q1 - q0; if(n > RBUFSIZE) n = RBUFSIZE; bufread(t->file, q0, r, n); bufinsert(&snarfbuf, snarfbuf.nc, r, n); q0 += n; } fbuffree(r); putsnarf(); } if(docut){ textdelete(t, t->q0, t->q1, TRUE); textsetselect(t, t->q0, t->q0); if(t->w){ textscrdraw(t); winsettag(t->w); } }else if(dosnarf) /* Snarf command */ argtext = t; if(locked) winunlock(t->w); } void paste(Text *et, Text *t, Text*, int selectall, int tobody, Rune*, int) { int c; uint q, q0, q1, n; Rune *r; getsnarf(); if(snarfbuf.nc==0) return; /* if(tobody), use body of executing window (Paste or Send command) */ if(tobody && et!=nil && et->w!=nil){ t = &et->w->body; filemark(t->file); /* seq has been incremented by execute */ } if(t == nil) return; if(t->w!=nil && et->w!=t->w){ c = 'M'; if(et->w) c = et->w->owner; winlock(t->w, c); } cut(t, t, nil, FALSE, TRUE, nil, 0); q = 0; q0 = t->q0; q1 = t->q0+snarfbuf.nc; r = fbufalloc(); while(q0 < q1){ n = q1 - q0; if(n > RBUFSIZE) n = RBUFSIZE; if(r == nil) r = runemalloc(n); bufread(&snarfbuf, q, r, n); textinsert(t, q0, r, n, TRUE); q += n; q0 += n; } fbuffree(r); if(selectall) textsetselect(t, t->q0, q1); else textsetselect(t, q1, q1); if(t->w){ textscrdraw(t); winsettag(t->w); } if(t->w!=nil && et->w!=t->w) winunlock(t->w); } void look(Text *et, Text *t, Text *argt, int, int, Rune *arg, int narg) { Rune *r; int n; if(et && et->w){ t = &et->w->body; if(narg > 0){ search(t, arg, narg); return; } getarg(argt, FALSE, FALSE, &r, &n); if(r == nil){ n = t->q1-t->q0; r = runemalloc(n); bufread(t->file, t->q0, r, n); } search(t, r, n); free(r); } } void sendx(Text *et, Text *t, Text*, int, int, Rune*, int) { if(et->w==nil) return; t = &et->w->body; if(t->q0 != t->q1) cut(t, t, nil, TRUE, FALSE, nil, 0); textsetselect(t, t->file->nc, t->file->nc); paste(t, t, nil, TRUE, TRUE, nil, 0); if(textreadc(t, t->file->nc-1) != '\n'){ textinsert(t, t->file->nc, L"\n", 1, TRUE); textsetselect(t, t->file->nc, t->file->nc); } } void edit(Text *et, Text*, Text *argt, int, int, Rune *arg, int narg) { Rune *r; int len; if(et == nil) return; getarg(argt, FALSE, TRUE, &r, &len); seq++; if(r != nil){ editcmd(et, r, len); free(r); }else editcmd(et, arg, narg); } void exit(Text*, Text*, Text*, int, int, Rune*, int) { if(rowclean(&row)){ sendul(cexit, 0); threadexits(nil); } } void putall(Text*, Text*, Text*, int, int, Rune*, int) { int i, j, e; Window *w; Column *c; char *a; for(i=0; inw; j++){ w = c->w[j]; if(w->isscratch || w->isdir || w->body.file->nname==0) continue; if(w->nopen[QWevent] > 0) continue; a = runetobyte(w->body.file->name, w->body.file->nname); e = access(a, 0); if(w->body.file->mod || w->body.ncache) if(e < 0) warning(nil, "no auto-Put of %s: %r\n", a); else{ wincommit(w, &w->body); put(&w->body, nil, nil, XXX, XXX, nil, 0); } free(a); } } } void id(Text *et, Text*, Text*, int, int, Rune*, int) { if(et && et->w) warning(nil, "/mnt/acme/%d/\n", et->w->id); } void local(Text *et, Text*, Text *argt, int, int, Rune *arg, int narg) { char *a, *aa; Runestr dir; aa = getbytearg(argt, TRUE, TRUE, &a); dir = dirname(et, nil, 0); if(dir.nr==1 && dir.r[0]=='.'){ /* sigh */ free(dir.r); dir.r = nil; dir.nr = 0; } run(nil, runetobyte(arg, narg), dir.r, dir.nr, FALSE, aa, a, FALSE); } void kill(Text*, Text*, Text *argt, int, int, Rune *arg, int narg) { Rune *a, *cmd, *r; int na; getarg(argt, FALSE, FALSE, &r, &na); if(r) kill(nil, nil, nil, 0, 0, r, na); /* loop condition: *arg is not a blank */ for(;;){ a = findbl(arg, narg, &na); if(a == arg) break; cmd = runemalloc(narg-na+1); runemove(cmd, arg, narg-na); sendp(ckill, cmd); arg = skipbl(a, na, &narg); } } void fontx(Text *et, Text *t, Text *argt, int, int, Rune *arg, int narg) { Rune *a, *r, *flag, *file; int na, nf; char *aa; Reffont *newfont; Dirlist *dp; int i, fix; if(et==nil || et->w==nil) return; t = &et->w->body; flag = nil; file = nil; /* loop condition: *arg is not a blank */ nf = 0; for(;;){ a = findbl(arg, narg, &na); if(a == arg) break; r = runemalloc(narg-na+1); runemove(r, arg, narg-na); if(runeeq(r, narg-na, L"fix", 3) || runeeq(r, narg-na, L"var", 3)){ free(flag); flag = r; }else{ free(file); file = r; nf = narg-na; } arg = skipbl(a, na, &narg); } getarg(argt, FALSE, TRUE, &r, &na); if(r) if(runeeq(r, na, L"fix", 3) || runeeq(r, na, L"var", 3)){ free(flag); flag = r; }else{ free(file); file = r; nf = na; } fix = 1; if(flag) fix = runeeq(flag, runestrlen(flag), L"fix", 3); else if(file == nil){ newfont = rfget(FALSE, FALSE, FALSE, nil); if(newfont) fix = strcmp(newfont->f->name, t->font->name)==0; } if(file){ aa = runetobyte(file, nf); newfont = rfget(fix, flag!=nil, FALSE, aa); free(aa); }else newfont = rfget(fix, FALSE, FALSE, nil); if(newfont){ draw(screen, t->w->r, textcols[BACK], nil, ZP); rfclose(t->reffont); t->reffont = newfont; t->font = newfont->f; frinittick(t); if(t->w->isdir){ t->all.min.x++; /* force recolumnation; disgusting! */ for(i=0; iw->ndl; i++){ dp = t->w->dlp[i]; aa = runetobyte(dp->r, dp->nr); dp->wid = stringwidth(newfont->f, aa); free(aa); } } /* avoid shrinking of window due to quantization */ colgrow(t->w->col, t->w, -1); } free(file); free(flag); } void incl(Text *et, Text*, Text *argt, int, int, Rune *arg, int narg) { Rune *a, *r; Window *w; int na, n, len; if(et==nil || et->w==nil) return; w = et->w; n = 0; getarg(argt, FALSE, TRUE, &r, &len); if(r){ n++; winaddincl(w, r, len); } /* loop condition: *arg is not a blank */ for(;;){ a = findbl(arg, narg, &na); if(a == arg) break; r = runemalloc(narg-na+1); runemove(r, arg, narg-na); n++; winaddincl(w, r, narg-na); arg = skipbl(a, na, &narg); } if(n==0 && w->nincl){ for(n=w->nincl; --n>=0; ) warning(nil, "%S ", w->incl[n]); warning(nil, "\n"); } } void tab(Text *et, Text*, Text *argt, int, int, Rune *arg, int narg) { Rune *a, *r; Window *w; int na, len, tab; char *p; if(et==nil || et->w==nil) return; w = et->w; getarg(argt, FALSE, TRUE, &r, &len); tab = 0; if(r!=nil && len>0){ p = runetobyte(r, len); if('0'<=p[0] && p[0]<='9') tab = atoi(p); free(p); }else{ a = findbl(arg, narg, &na); if(a != arg){ p = runetobyte(arg, narg-na); if('0'<=p[0] && p[0]<='9') tab = atoi(p); free(p); } } if(tab > 0){ if(w->body.tabstop != tab){ w->body.tabstop = tab; winresize(w, w->r, 1); } }else warning(nil, "%.*S: Tab %d\n", w->body.file->nname, w->body.file->name, w->body.tabstop); } void runproc(void *argvp) { /* args: */ Window *win; char *s; Rune *rdir; int ndir; int newns; char *argaddr; char *arg; Command *c; Channel *cpid; int iseditcmd; /* end of args */ char *e, *t, *name, *dir, **av, *news; Rune r, **incl; int ac, w, inarg, i, n, fd, nincl, winid; int pipechar; char buf[512]; static void *parg[2]; void **argv; argv = argvp; win = argv[0]; s = argv[1]; rdir = argv[2]; ndir = (int)argv[3]; newns = (int)argv[4]; argaddr = argv[5]; arg = argv[6]; c = argv[7]; cpid = argv[8]; iseditcmd = (int)argv[9]; free(argv); t = s; while(*t==' ' || *t=='\n' || *t=='\t') t++; for(e=t; *e; e++) if(*e==' ' || *e=='\n' || *e=='\t' ) break; name = emalloc((e-t)+2); memmove(name, t, e-t); name[e-t] = 0; e = utfrrune(name, '/'); if(e) strcpy(name, e+1); strcat(name, " "); /* add blank here for ease in waittask */ c->name = bytetorune(name, &c->nname); free(name); pipechar = 0; if(*t=='<' || *t=='|' || *t=='>') pipechar = *t++; c->iseditcmd = iseditcmd; c->text = s; if(rdir != nil){ dir = runetobyte(rdir, ndir); chdir(dir); /* ignore error: probably app. window */ free(dir); } if(newns){ nincl = 0; incl = nil; if(win){ nincl = win->nincl; if(nincl > 0){ incl = emalloc(nincl*sizeof(Rune*)); for(i=0; iincl[i]); incl[i] = runemalloc(n+1); runemove(incl[i], win->incl[i], n); } } winid = win->id; winclose(win); }else{ winid = 0; if(activewin) winid = activewin->id; } rfork(RFNAMEG|RFENVG|RFFDG|RFNOTEG); c->md = fsysmount(rdir, ndir, incl, nincl); if(c->md == nil){ threadprint(2, "child: can't mount /dev/cons: %r\n"); threadexits("mount"); } close(0); if(winid>0 && (pipechar=='|' || pipechar=='>')){ sprint(buf, "/mnt/acme/%d/rdsel", winid); open(buf, OREAD); }else open("/dev/null", OREAD); close(1); if((winid>0 || iseditcmd) && (pipechar=='|' || pipechar=='<')){ if(iseditcmd){ if(winid > 0) sprint(buf, "/mnt/acme/%d/editout", winid); else sprint(buf, "/mnt/acme/editout"); }else sprint(buf, "/mnt/acme/%d/wrsel", winid); open(buf, OWRITE); close(2); open("/dev/cons", OWRITE); }else{ open("/dev/cons", OWRITE); dup(1, 2); } }else{ if(win) winclose(win); rfork(RFFDG|RFNOTEG); fsysclose(); close(0); open("/dev/null", OREAD); close(1); open(acmeerrorfile, OWRITE); dup(1, 2); } if(argaddr) putenv("acmeaddr", argaddr); if(strlen(t) > sizeof buf-10) /* may need to print into stack */ goto Hard; inarg = FALSE; for(e=t; *e; e+=w){ w = chartorune(&r, e); if(r==' ' || r=='\t') continue; if(r < ' ') goto Hard; if(utfrune("#;&|^$=`'{}()<>[]*?^~`", r)) goto Hard; inarg = TRUE; } if(!inarg) goto Fail; ac = 0; av = nil; inarg = FALSE; for(e=t; *e; e+=w){ w = chartorune(&r, e); if(r==' ' || r=='\t'){ inarg = FALSE; *e = 0; continue; } if(!inarg){ inarg = TRUE; av = realloc(av, (ac+1)*sizeof(char**)); av[ac++] = e; } } av = realloc(av, (ac+2)*sizeof(char**)); av[ac++] = arg; av[ac] = nil; c->av = av; procexec(cpid, av[0], av); e = av[0]; if(e[0]=='/' || (e[0]=='.' && e[1]=='/')) goto Fail; if(cputype){ sprint(buf, "%s/%s", cputype, av[0]); procexec(cpid, buf, av); } sprint(buf, "/bin/%s", av[0]); procexec(cpid, buf, av); goto Fail; Hard: /* * ugly: set path = (. $cputype /bin) * should honor $path if unusual. */ if(cputype){ n = 0; memmove(buf+n, ".", 2); n += 2; i = strlen(cputype)+1; memmove(buf+n, cputype, i); n += i; memmove(buf+n, "/bin", 5); n += 5; fd = create("/env/path", OWRITE, 0666); write(fd, buf, n); close(fd); } if(arg){ news = emalloc(strlen(t) + 1 + 1 + strlen(arg) + 1 + 1); if(news){ sprint(news, "%s '%s'", t, arg); /* BUG: what if quote in arg? */ free(s); t = news; c->text = news; } } procexecl(cpid, "/bin/rc", "rc", "-c", t, nil); Fail: /* procexec hasn't happened, so need to send our own pid */ sendul(cpid, getpid()); threadexits(nil); } void runwaittask(void *v) { Command *c; Channel *cpid; void **a; threadsetname("runwaittask"); a = v; c = a[0]; cpid = a[1]; free(a); do c->pid = recvul(cpid); while(c->pid == ~0); if(c->pid != 0) /* successful exec */ sendp(ccommand, c); else{ free(c->name); free(c); } chanfree(cpid); } void run(Window *win, char *s, Rune *rdir, int ndir, int newns, char *argaddr, char *xarg, int iseditcmd) { void **arg; Command *c; Channel *cpid; if(s == nil) return; arg = emalloc(10*sizeof(void*)); c = emalloc(sizeof *c); cpid = chancreate(sizeof(ulong), 0); arg[0] = win; arg[1] = s; arg[2] = rdir; arg[3] = (void*)ndir; arg[4] = (void*)newns; arg[5] = argaddr; arg[6] = xarg; arg[7] = c; arg[8] = cpid; arg[9] = (void*)iseditcmd; proccreate(runproc, arg, STACK); /* mustn't block here because must be ready to answer mount() call in run() */ arg = emalloc(2*sizeof(void*)); arg[0] = c; arg[1] = cpid; threadcreate(runwaittask, arg, STACK); } --upas-zotadcwcqqpcerqfscnrvgcvtg Content-Disposition: attachment; filename=rows.c Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit #include #include #include #include #include #include #include #include #include #include #include #include #include "dat.h" #include "fns.h" void rowinit(Row *row, Rectangle r) { Rectangle r1; Text *t; char *c; Rune rc[100]; int i; draw(screen, r, display->white, nil, ZP); row->r = r; row->col = nil; row->ncol = 0; r1 = r; r1.max.y = r1.min.y + font->height; t = &row->tag; textinit(t, fileaddtext(nil, t), r1, rfget(FALSE, FALSE, FALSE, nil), tagcols); t->what = Rowtag; t->row = row; t->w = nil; t->col = nil; r1.min.y = r1.max.y; r1.max.y += Border; draw(screen, r1, display->black, nil, ZP); if (c=getenv("acmetag")){ for (i=0; *c && i<99; i++){ c += chartorune(rc+i, c); } rc[i] = 0; textinsert(t, 0, rc, i, TRUE); }else textinsert(t, 0, L"Newcol Kill Putall Dump Exit Ignore ", 36, TRUE); textsetselect(t, t->file->nc, t->file->nc); } Column* rowadd(Row *row, Column *c, int x) { Rectangle r, r1; Column *d; int i; d = nil; r = row->r; r.min.y = row->tag.r.max.y+Border; if(xncol>0){ /*steal 40% of last column by default */ d = row->col[row->ncol-1]; x = d->r.min.x + 3*Dx(d->r)/5; } /* look for column we'll land on */ for(i=0; incol; i++){ d = row->col[i]; if(x < d->r.max.x) break; } if(row->ncol > 0){ if(i < row->ncol) i++; /* new column will go after d */ r = d->r; if(Dx(r) < 100) return nil; draw(screen, r, display->white, nil, ZP); r1 = r; r1.max.x = min(x, r.max.x-50); if(Dx(r1) < 50) r1.max.x = r1.min.x+50; colresize(d, r1); r1.min.x = r1.max.x; r1.max.x = r1.min.x+Border; draw(screen, r1, display->black, nil, ZP); r.min.x = r1.max.x; } if(c == nil){ c = emalloc(sizeof(Column)); colinit(c, r); incref(&reffont); }else colresize(c, r); c->row = row; c->tag.row = row; row->col = realloc(row->col, (row->ncol+1)*sizeof(Column*)); memmove(row->col+i+1, row->col+i, (row->ncol-i)*sizeof(Column*)); row->col[i] = c; row->ncol++; clearmouse(); return c; } void rowresize(Row *row, Rectangle r) { int i, dx, odx; Rectangle r1, r2; Column *c; dx = Dx(r); odx = Dx(row->r); row->r = r; r1 = r; r1.max.y = r1.min.y + font->height; textresize(&row->tag, r1); r1.min.y = r1.max.y; r1.max.y += Border; draw(screen, r1, display->black, nil, ZP); r.min.y = r1.max.y; r1 = r; r1.max.x = r1.min.x; for(i=0; incol; i++){ c = row->col[i]; r1.min.x = r1.max.x; if(i == row->ncol-1) r1.max.x = r.max.x; else r1.max.x = r1.min.x+Dx(c->r)*dx/odx; if(i > 0){ r2 = r1; r2.max.x = r2.min.x+Border; draw(screen, r2, display->black, nil, ZP); r1.min.x = r2.max.x; } colresize(c, r1); } } void rowdragcol(Row *row, Column *c, int) { Rectangle r; int i, b, x; Point p, op; Column *d; clearmouse(); setcursor(mousectl, &boxcursor); b = mouse->buttons; op = mouse->xy; while(mouse->buttons == b) readmouse(mousectl); setcursor(mousectl, nil); if(mouse->buttons){ while(mouse->buttons) readmouse(mousectl); return; } for(i=0; incol; i++) if(row->col[i] == c) goto Found; error("can't find column"); Found: if(i == 0) return; p = mouse->xy; if((abs(p.x-op.x)<5 && abs(p.y-op.y)<5)) return; if((i>0 && p.xcol[i-1]->r.min.x) || (incol-1 && p.x>c->r.max.x)){ /* shuffle */ x = c->r.min.x; rowclose(row, c, FALSE); if(rowadd(row, c, p.x) == nil) /* whoops! */ if(rowadd(row, c, x) == nil) /* WHOOPS! */ if(rowadd(row, c, -1)==nil){ /* shit! */ rowclose(row, c, TRUE); return; } colmousebut(c); return; } d = row->col[i-1]; if(p.x < d->r.min.x+80+Scrollwid) p.x = d->r.min.x+80+Scrollwid; if(p.x > c->r.max.x-80-Scrollwid) p.x = c->r.max.x-80-Scrollwid; r = d->r; r.max.x = c->r.max.x; draw(screen, r, display->white, nil, ZP); r.max.x = p.x; colresize(d, r); r = c->r; r.min.x = p.x; r.max.x = r.min.x; r.max.x += Border; draw(screen, r, display->black, nil, ZP); r.min.x = r.max.x; r.max.x = c->r.max.x; colresize(c, r); colmousebut(c); } void rowclose(Row *row, Column *c, int dofree) { Rectangle r; int i; for(i=0; incol; i++) if(row->col[i] == c) goto Found; error("can't find column"); Found: r = c->r; if(dofree) colcloseall(c); memmove(row->col+i, row->col+i+1, (row->ncol-i)*sizeof(Column*)); row->ncol--; row->col = realloc(row->col, row->ncol*sizeof(Column*)); if(row->ncol == 0){ draw(screen, r, display->white, nil, ZP); return; } if(i == row->ncol){ /* extend last column right */ c = row->col[i-1]; r.min.x = c->r.min.x; r.max.x = row->r.max.x; }else{ /* extend next window left */ c = row->col[i]; r.max.x = c->r.max.x; } draw(screen, r, display->white, nil, ZP); colresize(c, r); } Column* rowwhichcol(Row *row, Point p) { int i; Column *c; for(i=0; incol; i++){ c = row->col[i]; if(ptinrect(p, c->r)) return c; } return nil; } Text* rowwhich(Row *row, Point p) { Column *c; if(ptinrect(p, row->tag.all)) return &row->tag; c = rowwhichcol(row, p); if(c) return colwhich(c, p); return nil; } Text* rowtype(Row *row, Rune r, Point p) { Window *w; Text *t; clearmouse(); qlock(row); if(bartflag) t = barttext; else t = rowwhich(row, p); if(t!=nil && !(t->what==Tag && ptinrect(p, t->scrollr))){ w = t->w; if(w == nil) texttype(t, r); else{ winlock(w, 'K'); wintype(w, t, r); winunlock(w); } } qunlock(row); return t; } int rowclean(Row *row) { int clean; int i; clean = TRUE; for(i=0; incol; i++) clean &= colclean(row->col[i]); return clean; } void rowdump(Row *row, char *file) { int i, j, fd, m, n, dumped; uint q0, q1; Biobuf *b; char *buf, *a, *fontname; Rune *r; Column *c; Window *w, *w1; Text *t; if(row->ncol == 0) return; buf = fbufalloc(); if(file == nil){ if(home == nil){ warning(nil, "can't find file for dump: $home not defined\n"); goto Rescue; } sprint(buf, "%s/acme.dump", home); file = buf; } fd = create(file, OWRITE, 0600); if(fd < 0){ warning(nil, "can't open %s: %r\n", file); goto Rescue; } b = emalloc(sizeof(Biobuf)); Binit(b, fd, OWRITE); r = fbufalloc(); Bprint(b, "%s\n", wdir); Bprint(b, "%s\n", fontnames[0]); Bprint(b, "%s\n", fontnames[1]); for(i=0; incol; i++){ c = row->col[i]; Bprint(b, "%11d", 100*(c->r.min.x-row->r.min.x)/Dx(row->r)); if(i == row->ncol-1) Bputc(b, '\n'); else Bputc(b, ' '); } for(i=0; incol; i++){ c = row->col[i]; for(j=0; jnw; j++) c->w[j]->body.file->dumpid = 0; } for(i=0; incol; i++){ c = row->col[i]; for(j=0; jnw; j++){ w = c->w[j]; wincommit(w, &w->tag); t = &w->body; /* windows owned by others get special treatment */ if(w->nopen[QWevent] > 0) if(w->dumpstr == nil) continue; /* zeroxes of external windows are tossed */ if(t->file->ntext > 1) for(n=0; nfile->ntext; n++){ w1 = t->file->text[n]->w; if(w == w1) continue; if(w1->nopen[QWevent]) goto Continue2; } fontname = ""; if(t->reffont->f != font) fontname = t->reffont->f->name; if(t->file->nname) a = runetobyte(t->file->name, t->file->nname); else a = emalloc(1); if(t->file->dumpid){ dumped = FALSE; Bprint(b, "x%11d %11d %11d %11d %11d %s\n", i, t->file->dumpid, w->body.q0, w->body.q1, 100*(w->r.min.y-c->r.min.y)/Dy(c->r), fontname); }else if(w->dumpstr){ dumped = FALSE; Bprint(b, "e%11d %11d %11d %11d %11d %s\n", i, t->file->dumpid, 0, 0, 100*(w->r.min.y-c->r.min.y)/Dy(c->r), fontname); }else if(strlen(a) == 0){ /* don't save unnamed windows */ free(a); continue; }else if((w->dirty==FALSE && access(a, 0)==0) || w->isdir){ dumped = FALSE; t->file->dumpid = w->id; Bprint(b, "f%11d %11d %11d %11d %11d %s\n", i, w->id, w->body.q0, w->body.q1, 100*(w->r.min.y-c->r.min.y)/Dy(c->r), fontname); }else{ dumped = TRUE; t->file->dumpid = w->id; Bprint(b, "F%11d %11d %11d %11d %11d %11d %s\n", i, j, w->body.q0, w->body.q1, 100*(w->r.min.y-c->r.min.y)/Dy(c->r), w->body.file->nc, fontname); } free(a); winctlprint(w, buf); Bwrite(b, buf, strlen(buf)); m = min(RBUFSIZE, w->tag.file->nc); bufread(w->tag.file, 0, r, m); n = 0; while(nfile->nc; while(q0 < q1){ n = q1 - q0; if(n > BUFSIZE/UTFmax) n = BUFSIZE/UTFmax; bufread(t->file, q0, r, n); Bprint(b, "%.*S", n, r); q0 += n; } } if(w->dumpstr){ if(w->dumpdir) Bprint(b, "%s\n%s\n", w->dumpdir, w->dumpstr); else Bprint(b, "\n%s\n", w->dumpstr); } Continue2:; } } Bterm(b); close(fd); free(b); fbuffree(r); Rescue: fbuffree(buf); } static char* rdline(Biobuf *b, int *linep) { char *l; l = Brdline(b, '\n'); if(l) (*linep)++; return l; } void rowload(Row *row, char *file, int initing) { int i, j, line, percent, y, nr, nfontr, n, ns, ndumped, dumpid, x, fd; Biobuf *b, *bout; char *buf, *l, *t, *fontname; Rune *r, rune, *fontr; Column *c, *c1, *c2; uint q0, q1; Rectangle r1, r2; Window *w; buf = fbufalloc(); if(file == nil){ if(home == nil){ warning(nil, "can't find file for load: $home not defined\n"); goto Rescue1; } sprint(buf, "%s/acme.dump", home); file = buf; } b = Bopen(file, OREAD); if(b == nil){ warning(nil, "can't open load file %s: %r\n", file); goto Rescue1; } /* current directory */ line = 0; l = rdline(b, &line); if(l == nil) goto Rescue2; l[Blinelen(b)-1] = 0; if(chdir(l) < 0){ warning(nil, "can't chdir %s\n", l); goto Rescue2; } /* global fonts */ for(i=0; i<2; i++){ l = rdline(b, &line); if(l == nil) goto Rescue2; l[Blinelen(b)-1] = 0; if(*l && strcmp(l, fontnames[i])!=0) rfget(i, TRUE, i==0 && initing, estrdup(l)); } if(initing && row->ncol==0) rowinit(row, screen->clipr); l = rdline(b, &line); if(l == nil) goto Rescue2; j = Blinelen(b)/12; if(j<=0 || j>10) goto Rescue2; for(i=0; i=100) goto Rescue2; x = row->r.min.x+percent*Dx(row->r)/100; if(i < row->ncol){ if(i == 0) continue; c1 = row->col[i-1]; c2 = row->col[i]; r1 = c1->r; r2 = c2->r; r1.max.x = x; r2.min.x = x+Border; if(Dx(r1) < 50 || Dx(r2) < 50) continue; draw(screen, Rpt(r1.min, r2.max), display->white, nil, ZP); colresize(c1, r1); colresize(c2, r2); r2.min.x = x; r2.max.x = x+Border; draw(screen, r2, display->black, nil, ZP); } if(i >= row->ncol) rowadd(row, nil, x); } for(;;){ l = rdline(b, &line); if(l == nil) break; dumpid = 0; switch(l[0]){ case 'e': if(Blinelen(b) < 1+5*12+1) goto Rescue2; l = rdline(b, &line); /* ctl line; ignored */ if(l == nil) goto Rescue2; l = rdline(b, &line); /* directory */ if(l == nil) goto Rescue2; l[Blinelen(b)-1] = 0; if(*l == '\0'){ if(home == nil) r = bytetorune("./", &nr); else{ t = emalloc(strlen(home)+1+1); sprint(t, "%s/", home); r = bytetorune(t, &nr); free(t); } }else r = bytetorune(l, &nr); l = rdline(b, &line); /* command */ if(l == nil) goto Rescue2; t = emalloc(Blinelen(b)+1); memmove(t, l, Blinelen(b)); run(nil, t, r, nr, TRUE, nil, nil, FALSE); /* r is freed in run() */ continue; case 'f': if(Blinelen(b) < 1+5*12+1) goto Rescue2; fontname = l+1+5*12; ndumped = -1; break; case 'F': if(Blinelen(b) < 1+6*12+1) goto Rescue2; fontname = l+1+6*12; ndumped = atoi(l+1+5*12+1); break; case 'x': if(Blinelen(b) < 1+5*12+1) goto Rescue2; fontname = l+1+5*12; ndumped = -1; dumpid = atoi(l+1+1*12); break; default: goto Rescue2; } l[Blinelen(b)-1] = 0; fontr = nil; nfontr = 0; if(*fontname) fontr = bytetorune(fontname, &nfontr); i = atoi(l+1+0*12); j = atoi(l+1+1*12); q0 = atoi(l+1+2*12); q1 = atoi(l+1+3*12); percent = atoi(l+1+4*12); if(i<0 || i>10) goto Rescue2; if(i > row->ncol) i = row->ncol; c = row->col[i]; y = c->r.min.y+(percent*Dy(c->r))/100; if(yr.min.y || y>=c->r.max.y) y = -1; if(dumpid == 0) w = coladd(c, nil, nil, y); else w = coladd(c, nil, lookid(dumpid, TRUE), y); if(w == nil) continue; w->dumpid = j; l = rdline(b, &line); if(l == nil) goto Rescue2; l[Blinelen(b)-1] = 0; r = bytetorune(l+5*12, &nr); ns = -1; for(n=0; ntag, w->tag.file->nc, r+n+1, nr-(n+1), TRUE); free(r); if(ndumped >= 0){ /* simplest thing is to put it in a file and load that */ sprint(buf, "/tmp/d%d.%.4sacme", getpid(), getuser()); fd = create(buf, OWRITE|ORCLOSE, 0600); if(fd < 0){ warning(nil, "can't create temp file: %r\n"); goto Rescue2; } bout = emalloc(sizeof(Biobuf)); Binit(bout, fd, OWRITE); for(n=0; nbody, 0, buf, 1); close(fd); w->body.file->mod = TRUE; for(n=0; nbody.file->ntext; n++) w->body.file->text[n]->w->dirty = TRUE; winsettag(w); }else if(dumpid==0 && r[ns+1]!='+' && r[ns+1]!='-') get(&w->body, nil, nil, FALSE, XXX, nil, 0); if(fontr){ fontx(&w->body, nil, nil, 0, 0, fontr, nfontr); free(fontr); } if(q0>w->body.file->nc || q1>w->body.file->nc || q0>q1) q0 = q1 = 0; textshow(&w->body, q0, q1); w->maxlines = min(w->body.nlines, max(w->maxlines, w->body.maxlines)); } Bterm(b); Rescue1: fbuffree(buf); return; Rescue2: warning(nil, "bad load file %s:%d\n", file, line); Bterm(b); goto Rescue1; } void allwindows(void (*f)(Window*, void*), void *arg) { int i, j; Column *c; for(i=0; inw; j++) (*f)(c->w[j], arg); } } --upas-zotadcwcqqpcerqfscnrvgcvtg Content-Disposition: attachment; filename=text.c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit #include #include #include #include #include #include #include #include #include #include #include #include "dat.h" #include "fns.h" extern Reprog* ignoreregx; Image *tagcols[NCOL]; Image *textcols[NCOL]; enum{ TABDIR = 3 /* width of tabs in directory windows */ }; void textinit(Text *t, File *f, Rectangle r, Reffont *rf, Image *cols[NCOL]) { t->file = f; t->all = r; t->scrollr = r; t->scrollr.max.x = r.min.x+Scrollwid; t->lastsr = nullrect; r.min.x += Scrollwid+Scrollgap; t->eq0 = ~0; t->ncache = 0; t->reffont = rf; t->tabstop = maxtab; memmove(t->Frame.cols, cols, sizeof t->Frame.cols); textredraw(t, r, rf->f, screen, -1); } void textredraw(Text *t, Rectangle r, Font *f, Image *b, int odx) { int maxt; Rectangle rr; frinit(t, r, f, b, t->Frame.cols); rr = t->r; rr.min.x -= Scrollwid; /* back fill to scroll bar */ draw(t->b, rr, t->cols[BACK], nil, ZP); /* use no wider than 3-space tabs in a directory */ maxt = maxtab; if(t->what == Body){ if(t->w->isdir) maxt = min(TABDIR, maxtab); else maxt = t->tabstop; } t->maxtab = maxt*stringwidth(f, "0"); if(t->what==Body && t->w->isdir && odx!=Dx(t->all)){ if(t->maxlines > 0){ textreset(t); textcolumnate(t, t->w->dlp, t->w->ndl); textshow(t, 0, 0); } }else{ textfill(t); textsetselect(t, t->q0, t->q1); } } int textresize(Text *t, Rectangle r) { int odx; if(Dy(r) > 0) r.max.y -= Dy(r)%t->font->height; else r.max.y = r.min.y; odx = Dx(t->all); t->all = r; t->scrollr = r; t->scrollr.max.x = r.min.x+Scrollwid; t->lastsr = nullrect; r.min.x += Scrollwid+Scrollgap; frclear(t, 0); textredraw(t, r, t->font, t->b, odx); return r.max.y; } void textclose(Text *t) { free(t->cache); frclear(t, 1); filedeltext(t->file, t); t->file = nil; rfclose(t->reffont); if(argtext == t) argtext = nil; if(typetext == t) typetext = nil; if(seltext == t) seltext = nil; if(mousetext == t) mousetext = nil; if(barttext == t) barttext = nil; } int dircmp(void *a, void *b) { Dirlist *da, *db; int i, n; da = *(Dirlist**)a; db = *(Dirlist**)b; n = min(da->nr, db->nr); i = memcmp(da->r, db->r, n*sizeof(Rune)); if(i) return i; return da->nr - db->nr; } void textcolumnate(Text *t, Dirlist **dlp, int ndl) { int i, j, w, colw, mint, maxt, ncol, nrow; Dirlist *dl; uint q1; if(t->file->ntext > 1) return; mint = stringwidth(t->font, "0"); /* go for narrower tabs if set more than 3 wide */ t->maxtab = min(maxtab, TABDIR)*mint; maxt = t->maxtab; colw = 0; for(i=0; iwid; if(maxt-w%maxt < mint) w += mint; if(w % maxt) w += maxt-(w%maxt); if(w > colw) colw = w; } if(colw == 0) ncol = 1; else ncol = max(1, Dx(t->r)/colw); nrow = (ndl+ncol-1)/ncol; q1 = 0; for(i=0; ifile, q1, dl->r, dl->nr); q1 += dl->nr; if(j+nrow >= ndl) break; w = dl->wid; if(maxt-w%maxt < mint){ fileinsert(t->file, q1, L"\t", 1); q1++; w += mint; } do{ fileinsert(t->file, q1, L"\t", 1); q1++; w += maxt-(w%maxt); }while(w < colw); } fileinsert(t->file, q1, L"\n", 1); q1++; } } uint textload(Text *t, uint q0, char *file, int setqid) { Rune *rp; Dirlist *dl, **dlp; int fd, i, n, ndl, nulls; uint q, q1; Dir d, *dbuf; char tmp[NAMELEN+1]; Text *u; if(t->ncache!=0 || t->file->nc || t->w==nil || t!=&t->w->body || (t->w->isdir && t->file->nname==0)) error("text.load"); fd = open(file, OREAD); if(fd < 0){ warning(nil, "can't open %s: %r\n", file); return 0; } if(dirfstat(fd, &d) < 0){ warning(nil, "can't fstat %s: %r\n", file); goto Rescue; } nulls = FALSE; if(d.qid.path & CHDIR){ /* this is checked in get() but it's possible the file changed underfoot */ if(t->file->ntext > 1){ warning(nil, "%s is a directory; can't read with multiple windows on it\n", file); goto Rescue; } t->w->isdir = TRUE; t->w->filemenu = FALSE; if(t->file->name[t->file->nname-1] != '/'){ rp = runemalloc(t->file->nname+1); runemove(rp, t->file->name, t->file->nname); rp[t->file->nname] = '/'; winsetname(t->w, rp, t->file->nname+1); free(rp); } dlp = nil; ndl = 0; dbuf = (Dir*)fbufalloc(); while((n=dirread(fd, dbuf, BUFSIZE-(BUFSIZE)%sizeof(Dir))) > 0){ n /= sizeof(Dir); for(i=0; ir = bytetorune(tmp, &dl->nr); dl->wid = stringwidth(t->font, tmp); ndl++; dlp = realloc(dlp, ndl*sizeof(Dirlist*)); dlp[ndl-1] = dl; } } fbuffree(dbuf); qsort(dlp, ndl, sizeof(Dirlist*), dircmp); t->w->dlp = dlp; t->w->ndl = ndl; textcolumnate(t, dlp, ndl); q1 = t->file->nc; }else{ t->w->isdir = FALSE; t->w->filemenu = TRUE; q1 = q0 + fileload(t->file, q0, fd, &nulls); } if(setqid){ t->file->dev = d.dev; t->file->mtime = d.mtime; t->file->qidpath = d.qid.path; } close(fd); rp = fbufalloc(); for(q=q0; q RBUFSIZE) n = RBUFSIZE; bufread(t->file, q, rp, n); if(q < t->org) t->org += n; else if(q <= t->org+t->nchars) frinsert(t, rp, rp+n, q-t->org); if(t->lastlinefull) break; } fbuffree(rp); for(i=0; ifile->ntext; i++){ u = t->file->text[i]; if(u != t){ if(u->org > u->file->nc) /* will be 0 because of reset(), but safety first */ u->org = 0; textresize(u, u->all); textbacknl(u, u->org, 0); /* go to beginning of line */ } textsetselect(u, q0, q0); } if(nulls) warning(nil, "%s: NUL bytes elided\n", file); return q1-q0; Rescue: close(fd); return 0; } uint textbsinsert(Text *t, uint q0, Rune *r, uint n, int tofile, int *nrp) { Rune *bp, *tp, *up; int i, initial; if(t->what == Tag){ /* can't happen but safety first: mustn't backspace over file name */ Err: textinsert(t, q0, r, n, tofile); *nrp = n; return q0; } bp = r; for(i=0; i q0) initial = q0; q0 -= initial; textdelete(t, q0, q0+initial, tofile); } n = up-tp; textinsert(t, q0, tp, n, tofile); free(tp); *nrp = n; return q0; } goto Err; } void textinsert(Text *t, uint q0, Rune *r, uint n, int tofile) { int c, i; Text *u; if(tofile && t->ncache != 0) error("text.insert"); if(n == 0) return; if(tofile){ fileinsert(t->file, q0, r, n); if(t->what == Body){ t->w->dirty = TRUE; t->w->utflastqid = -1; } if(t->file->ntext > 1) for(i=0; ifile->ntext; i++){ u = t->file->text[i]; if(u != t){ u->w->dirty = TRUE; /* always a body */ textinsert(u, q0, r, n, FALSE); textsetselect(u, u->q0, u->q1); textscrdraw(u); } } } if(q0 < t->q1) t->q1 += n; if(q0 < t->q0) t->q0 += n; if(q0 < t->org) t->org += n; else if(q0 <= t->org+t->nchars) frinsert(t, r, r+n, q0-t->org); if(t->w){ c = 'i'; if(t->what == Body) c = 'I'; if(n <= EVENTSIZE) winevent(t->w, "%c%d %d 0 %d %.*S\n", c, q0, q0+n, n, n, r); else winevent(t->w, "%c%d %d 0 0 \n", c, q0, q0+n, n); } } void textfill(Text *t) { Rune *rp; int i, n, m, nl; if(t->lastlinefull || t->nofill) return; if(t->ncache > 0){ if(t->w != nil) wincommit(t->w, t); else textcommit(t, TRUE); } rp = fbufalloc(); do{ n = t->file->nc-(t->org+t->nchars); if(n == 0) break; if(n > 2000) /* educated guess at reasonable amount */ n = 2000; bufread(t->file, t->org+t->nchars, rp, n); /* * it's expensive to frinsert more than we need, so * count newlines. */ nl = t->maxlines-t->nlines; m = 0; for(i=0; i= nl) break; } } frinsert(t, rp, rp+i, t->nchars); }while(t->lastlinefull == FALSE); fbuffree(rp); } void textdelete(Text *t, uint q0, uint q1, int tofile) { uint n, p0, p1; int i, c; Text *u; if(tofile && t->ncache != 0) error("text.delete"); n = q1-q0; if(n == 0) return; if(tofile){ filedelete(t->file, q0, q1); if(t->what == Body){ t->w->dirty = TRUE; t->w->utflastqid = -1; } if(t->file->ntext > 1) for(i=0; ifile->ntext; i++){ u = t->file->text[i]; if(u != t){ u->w->dirty = TRUE; /* always a body */ textdelete(u, q0, q1, FALSE); textsetselect(u, u->q0, u->q1); textscrdraw(u); } } } if(q0 < t->q0) t->q0 -= min(n, t->q0-q0); if(q0 < t->q1) t->q1 -= min(n, t->q1-q0); if(q1 <= t->org) t->org -= n; else if(q0 < t->org+t->nchars){ p1 = q1 - t->org; if(p1 > t->nchars) p1 = t->nchars; if(q0 < t->org){ t->org = q0; p0 = 0; }else p0 = q0 - t->org; frdelete(t, p0, p1); textfill(t); } if(t->w){ c = 'd'; if(t->what == Body) c = 'D'; winevent(t->w, "%c%d %d 0 0 \n", c, q0, q1); } } Rune textreadc(Text *t, uint q) { Rune r; if(t->cq0<=q && qcq0+t->ncache) r = t->cache[q-t->cq0]; else bufread(t->file, q, &r, 1); return r; } int textbswidth(Text *t, Rune c) { uint q, eq; Rune r; int skipping; /* there is known to be at least one character to erase */ if(c == 0x08) /* ^H: erase character */ return 1; q = t->q0; skipping = TRUE; while(q > 0){ r = textreadc(t, q-1); if(r == '\n'){ /* eat at most one more character */ if(q == t->q0) /* eat the newline */ --q; break; } if(c == 0x17){ eq = isalnum(r); if(eq && skipping) /* found one; stop skipping */ skipping = FALSE; else if(!eq && !skipping) break; } --q; } return t->q0-q; } void texttype(Text *t, Rune r) { uint q0, q1; int nnb, nb, n, i; Text *u; if(t->what!=Body && r=='\n') return; switch(r){ case Kdown: case Kleft: case Kright: n = t->maxlines/2; q0 = t->org+frcharofpt(t, Pt(t->r.min.x, t->r.min.y+n*t->font->height)); textsetorigin(t, q0, FALSE); return; case Kup: n = t->maxlines/2; q0 = textbacknl(t, t->org, n); textsetorigin(t, q0, FALSE); return; } if(t->what == Body){ seq++; filemark(t->file); } if(t->q1 > t->q0){ if(t->ncache != 0) error("text.type"); cut(t, t, nil, TRUE, TRUE, nil, 0); t->eq0 = ~0; } textshow(t, t->q0, t->q0); switch(r){ case 0x1B: if(t->eq0 != ~0) textsetselect(t, t->eq0, t->q0); if(t->ncache > 0){ if(t->w != nil) wincommit(t->w, t); else textcommit(t, TRUE); } return; case 0x08: /* ^H: erase character */ case 0x15: /* ^U: erase line */ case 0x17: /* ^W: erase word */ if(t->q0 == 0) /* nothing to erase */ return; nnb = textbswidth(t, r); q1 = t->q0; q0 = q1-nnb; /* if selection is at beginning of window, avoid deleting invisible text */ if(q0 < t->org){ q0 = t->org; nnb = q1-q0; } if(nnb <= 0) return; for(i=0; ifile->ntext; i++){ u = t->file->text[i]; u->nofill = TRUE; nb = nnb; n = u->ncache; if(n > 0){ if(q1 != u->cq0+n) error("text.type backspace"); if(n > nb) n = nb; u->ncache -= n; textdelete(u, q1-n, q1, FALSE); nb -= n; } if(u->eq0==q1 || u->eq0==~0) u->eq0 = q0; if(nb && u==t) textdelete(u, q0, q0+nb, TRUE); if(u != t) textsetselect(u, u->q0, u->q1); else textsetselect(t, q0, q0); u->nofill = FALSE; } for(i=0; ifile->ntext; i++) textfill(t->file->text[i]); return; } /* otherwise ordinary character; just insert, typically in caches of all texts */ for(i=0; ifile->ntext; i++){ u = t->file->text[i]; if(u->eq0 == ~0) u->eq0 = t->q0; if(u->ncache == 0) u->cq0 = t->q0; else if(t->q0 != u->cq0+u->ncache) error("text.type cq1"); textinsert(u, t->q0, &r, 1, FALSE); if(u != t) textsetselect(u, u->q0, u->q1); if(u->ncache == u->ncachealloc){ u->ncachealloc += 10; u->cache = runerealloc(u->cache, u->ncachealloc); } u->cache[u->ncache++] = r; } textsetselect(t, t->q0+1, t->q0+1); if(r=='\n' && t->w!=nil) wincommit(t->w, t); } void textcommit(Text *t, int tofile) { if(t->ncache == 0) return; if(tofile) fileinsert(t->file, t->cq0, t->cache, t->ncache); if(t->what == Body){ t->w->dirty = TRUE; t->w->utflastqid = -1; } t->ncache = 0; } static Text *clicktext; static uint clickmsec; static Text *selecttext; static uint selectq; /* * called from frame library */ void framescroll(Frame *f, int dl) { if(f != &selecttext->Frame) error("frameselect not right frame"); textframescroll(selecttext, dl); } void textframescroll(Text *t, int dl) { uint q0; if(dl == 0){ scrsleep(100); return; } if(dl < 0){ q0 = textbacknl(t, t->org, -dl); if(selectq > t->org+t->p0) textsetselect(t, t->org+t->p0, selectq); else textsetselect(t, selectq, t->org+t->p0); }else{ if(t->org+t->nchars == t->file->nc) return; q0 = t->org+frcharofpt(t, Pt(t->r.min.x, t->r.min.y+dl*t->font->height)); if(selectq > t->org+t->p1) textsetselect(t, t->org+t->p1, selectq); else textsetselect(t, selectq, t->org+t->p1); } textsetorigin(t, q0, TRUE); } void textselect(Text *t) { uint q0, q1; int b, x, y; int state; selecttext = t; /* * To have double-clicking and chording, we double-click * immediately if it might make sense. */ b = mouse->buttons; q0 = t->q0; q1 = t->q1; selectq = t->org+frcharofpt(t, mouse->xy); if(clicktext==t && mouse->msec-clickmsec<500) if(q0==q1 && selectq==q0){ textdoubleclick(t, &q0, &q1); textsetselect(t, q0, q1); flushimage(display, 1); x = mouse->xy.x; y = mouse->xy.y; /* stay here until something interesting happens */ do readmouse(mousectl); while(mouse->buttons==b && abs(mouse->xy.x-x)<3 && abs(mouse->xy.y-y)<3); mouse->xy.x = x; /* in case we're calling frselect */ mouse->xy.y = y; q0 = t->q0; /* may have changed */ q1 = t->q1; selectq = q0; } if(mouse->buttons == b){ t->Frame.scroll = framescroll; frselect(t, mousectl); /* horrible botch: while asleep, may have lost selection altogether */ if(selectq > t->file->nc) selectq = t->org + t->p0; t->Frame.scroll = nil; if(selectq < t->org) q0 = selectq; else q0 = t->org + t->p0; if(selectq > t->org+t->nchars) q1 = selectq; else q1 = t->org+t->p1; } if(q0 == q1){ if(q0==t->q0 && clicktext==t && mouse->msec-clickmsec<500){ textdoubleclick(t, &q0, &q1); clicktext = nil; }else{ clicktext = t; clickmsec = mouse->msec; } }else clicktext = nil; textsetselect(t, q0, q1); flushimage(display, 1); state = 0; /* undo when possible; +1 for cut, -1 for paste */ while(mouse->buttons){ mouse->msec = 0; b = mouse->buttons; if(b & 6){ if(state==0 && t->what==Body){ seq++; filemark(t->w->body.file); } if(b & 2){ if(state==-1 && t->what==Body){ winundo(t->w, TRUE); textsetselect(t, q0, t->q0); state = 0; }else if(state != 1){ cut(t, t, nil, TRUE, TRUE, nil, 0); state = 1; } }else{ if(state==1 && t->what==Body){ winundo(t->w, TRUE); textsetselect(t, q0, t->q1); state = 0; }else if(state != -1){ paste(t, t, nil, TRUE, FALSE, nil, 0); state = -1; } } textscrdraw(t); clearmouse(); } flushimage(display, 1); while(mouse->buttons == b) readmouse(mousectl); clicktext = nil; } } void textshow(Text *t, uint q0, uint q1) { int qe; int nl; uint q; if(t->what != Body) return; if(t->w!=nil && t->maxlines==0) colgrow(t->col, t->w, 1); textsetselect(t, q0, q1); qe = t->org+t->nchars; if(t->org<=q0 && (q0file->nc+t->ncache))) textscrdraw(t); else{ if(t->w->nopen[QWevent] > 0) nl = 3*t->maxlines/4; else nl = t->maxlines/4; q = textbacknl(t, q0, nl); /* avoid going backwards if trying to go forwards - long lines! */ if(!(q0>t->org && qorg)) textsetorigin(t, q, TRUE); while(q0 > t->org+t->nchars) textsetorigin(t, t->org+1, FALSE); } } static int region(int a, int b) { if(a < b) return -1; if(a == b) return 0; return 1; } void selrestore(Frame *f, Point pt0, uint p0, uint p1) { if(p1<=f->p0 || p0>=f->p1){ /* no overlap */ frdrawsel0(f, pt0, p0, p1, f->cols[BACK], f->cols[TEXT]); return; } if(p0>=f->p0 && p1<=f->p1){ /* entirely inside */ frdrawsel0(f, pt0, p0, p1, f->cols[HIGH], f->cols[HTEXT]); return; } /* they now are known to overlap */ /* before selection */ if(p0 < f->p0){ frdrawsel0(f, pt0, p0, f->p0, f->cols[BACK], f->cols[TEXT]); p0 = f->p0; pt0 = frptofchar(f, p0); } /* after selection */ if(p1 > f->p1){ frdrawsel0(f, frptofchar(f, f->p1), f->p1, p1, f->cols[BACK], f->cols[TEXT]); p1 = f->p1; } /* inside selection */ frdrawsel0(f, pt0, p0, p1, f->cols[HIGH], f->cols[HTEXT]); } void textsetselect(Text *t, uint q0, uint q1) { int p0, p1; /* t->p0 and t->p1 are always right; t->q0 and t->q1 may be off */ t->q0 = q0; t->q1 = q1; /* compute desired p0,p1 from q0,q1 */ p0 = q0-t->org; p1 = q1-t->org; if(p0 < 0) p0 = 0; if(p1 < 0) p1 = 0; if(p0 > t->nchars) p0 = t->nchars; if(p1 > t->nchars) p1 = t->nchars; if(p0==t->p0 && p1==t->p1) return; /* screen disagrees with desired selection */ if(t->p1<=p0 || p1<=t->p0 || p0==p1 || t->p1==t->p0){ /* no overlap or too easy to bother trying */ frdrawsel(t, frptofchar(t, t->p0), t->p0, t->p1, 0); frdrawsel(t, frptofchar(t, p0), p0, p1, 1); goto Return; } /* overlap; avoid unnecessary painting */ if(p0 < t->p0){ /* extend selection backwards */ frdrawsel(t, frptofchar(t, p0), p0, t->p0, 1); }else if(p0 > t->p0){ /* trim first part of selection */ frdrawsel(t, frptofchar(t, t->p0), t->p0, p0, 0); } if(p1 > t->p1){ /* extend selection forwards */ frdrawsel(t, frptofchar(t, t->p1), t->p1, p1, 1); }else if(p1 < t->p1){ /* trim last part of selection */ frdrawsel(t, frptofchar(t, p1), p1, t->p1, 0); } Return: t->p0 = p0; t->p1 = p1; } uint; xselect(Frame *f, Mousectl *mc, Image *col, uint *p1p) /* when called, button is down */ { uint p0, p1, q, tmp; Point mp, pt0, pt1, qt; int reg, b; mp = mc->xy; b = mc->buttons; /* remove tick */ if(f->p0 == f->p1) frtick(f, frptofchar(f, f->p0), 0); p0 = p1 = frcharofpt(f, mp); pt0 = frptofchar(f, p0); pt1 = frptofchar(f, p1); reg = 0; frtick(f, pt0, 1); do{ q = frcharofpt(f, mc->xy); if(p1 != q){ if(p0 == p1) frtick(f, pt0, 0); if(reg != region(q, p0)){ /* crossed starting point; reset */ if(reg > 0) selrestore(f, pt0, p0, p1); else if(reg < 0) selrestore(f, pt1, p1, p0); p1 = p0; pt1 = pt0; reg = region(q, p0); if(reg == 0) frdrawsel0(f, pt0, p0, p1, col, display->white); } qt = frptofchar(f, q); if(reg > 0){ if(q > p1) frdrawsel0(f, pt1, p1, q, col, display->white); else if(q < p1) selrestore(f, qt, q, p1); }else if(reg < 0){ if(q > p1) selrestore(f, pt1, p1, q); else frdrawsel0(f, qt, q, p1, col, display->white); } p1 = q; pt1 = qt; } if(p0 == p1) frtick(f, pt0, 1); flushimage(f->display, 1); readmouse(mc); }while(mc->buttons == b); if(p1 < p0){ tmp = p0; p0 = p1; p1 = tmp; } pt0 = frptofchar(f, p0); if(p0 == p1) frtick(f, pt0, 0); selrestore(f, pt0, p0, p1); /* restore tick */ if(f->p0 == f->p1) frtick(f, frptofchar(f, f->p0), 1); flushimage(f->display, 1); *p1p = p1; return p0; } int textselect23(Text *t, uint *q0, uint *q1, Image *high, int mask) { uint p0, p1; int buts; p0 = xselect(t, mousectl, high, &p1); buts = mousectl->buttons; if((buts & mask) == 0){ *q0 = p0+t->org; *q1 = p1+t->org; } while(mousectl->buttons) readmouse(mousectl); return buts; } int textselect2(Text *t, uint *q0, uint *q1, Text **tp) { int buts; *tp = nil; buts = textselect23(t, q0, q1, but2col, 4); if(buts & 4) return 0; if(buts & 1){ /* pick up argument */ *tp = argtext; return 1; } return 1; } int textselect3(Text *t, uint *q0, uint *q1) { int h; h = (textselect23(t, q0, q1, but3col, 1|2) == 0); return h; } static Rune left1[] = { L'{', L'[', L'(', L'<', L'«', 0 }; static Rune right1[] = { L'}', L']', L')', L'>', L'»', 0 }; static Rune left2[] = { L'\n', 0 }; static Rune left3[] = { L'\'', L'"', L'`', 0 }; static Rune *left[] = { left1, left2, left3, nil }; static Rune *right[] = { right1, left2, left3, nil }; void textdoubleclick(Text *t, uint *q0, uint *q1) { int c, i; Rune *r, *l, *p; uint q; for(i=0; left[i]!=nil; i++){ q = *q0; l = left[i]; r = right[i]; /* try matching character to left, looking right */ if(q == 0) c = '\n'; else c = textreadc(t, q-1); p = runestrchr(l, c); if(p != nil){ if(textclickmatch(t, c, r[p-l], 1, &q)) *q1 = q-(c!='\n'); return; } /* try matching character to right, looking left */ if(q == t->file->nc) c = '\n'; else c = textreadc(t, q); p = runestrchr(r, c); if(p != nil){ if(textclickmatch(t, c, l[p-r], -1, &q)){ *q1 = *q0+(*q0file->nc && c=='\n'); *q0 = q; if(c!='\n' || q!=0 || textreadc(t, 0)=='\n') (*q0)++; } return; } } /* try filling out word to right */ while(*q1file->nc && isalnum(textreadc(t, *q1))) (*q1)++; /* try filling out word to left */ while(*q0>0 && isalnum(textreadc(t, *q0-1))) (*q0)--; } int textclickmatch(Text *t, int cl, int cr, int dir, uint *q) { Rune c; int nest; nest = 1; for(;;){ if(dir > 0){ if(*q == t->file->nc) break; c = textreadc(t, *q); (*q)++; }else{ if(*q == 0) break; (*q)--; c = textreadc(t, *q); } if(c == cr){ if(--nest==0) return 1; }else if(c == cl) nest++; } return cl=='\n' && nest==1; } uint textbacknl(Text *t, uint p, uint n) { int i, j; /* look for start of this line if n==0 */ if(n==0 && p>0 && textreadc(t, p-1)!='\n') n = 1; i = n; while(i-->0 && p>0){ --p; /* it's at a newline now; back over it */ if(p == 0) break; /* at 128 chars, call it a line anyway */ for(j=128; --j>0 && p>0; p--) if(textreadc(t, p-1)=='\n') break; } return p; } void textsetorigin(Text *t, uint org, int exact) { int i, a, fixup; Rune *r; uint n; if(org>0 && !exact){ /* org is an estimate of the char posn; find a newline */ /* don't try harder than 256 chars */ for(i=0; i<256 && orgfile->nc; i++){ if(textreadc(t, org) == '\n'){ org++; break; } org++; } } a = org-t->org; fixup = 0; if(a>=0 && anchars){ frdelete(t, 0, a); fixup = 1; /* frdelete can leave end of last line in wrong selection mode; it doesn't know what follows */ } else if(a<0 && -anchars){ n = t->org - org; r = runemalloc(n); bufread(t->file, org, r, n); frinsert(t, r, r+n, 0); free(r); }else frdelete(t, 0, t->nchars); t->org = org; textfill(t); textscrdraw(t); textsetselect(t, t->q0, t->q1); if(fixup && t->p1 > t->p0) frdrawsel(t, frptofchar(t, t->p1-1), t->p1-1, t->p1, 1); } void textreset(Text *t) { t->file->seq = 0; t->eq0 = ~0; /* do t->delete(0, t->nc, TRUE) without building backup stuff */ textsetselect(t, t->org, t->org); frdelete(t, 0, t->nchars); t->org = 0; t->q0 = 0; t->q1 = 0; filereset(t->file); bufreset(t->file); } --upas-zotadcwcqqpcerqfscnrvgcvtg-- From cse.psu.edu!9fans-admin Mon Nov 5 19:21:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:21:23 JST 2001 Received: (qmail 21641 invoked by uid 1020); 5 Nov 2001 19:21:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21637 invoked from network); 5 Nov 2001 19:21:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:21:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6F584199EE; Mon, 5 Nov 2001 05:21:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from subito.home.cs.york.ac.uk (host80-0-45-17.no-dns-yet.ntli.net [80.0.45.17]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id E0C8B199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:20:49 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] fs upgrade From: forsyth@caldo.demon.co.uk MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-rfqnrmryywjwqvsdlnnybqqpcb" Message-Id: <20011105102049.E0C8B199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:25:15 0000 This is a multi-part message in MIME format. --upas-rfqnrmryywjwqvsdlnnybqqpcb Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit you can concatenate the new device on the end, but if it's a pseudo-worm (f) you'll need to run a special kernel to initialise it first. it can normally be initialised only by ream, but of course you don't want to do that. i've probably got the code to do it somewhere since i've done it several times. --upas-rfqnrmryywjwqvsdlnnybqqpcb Content-Type: message/rfc822 Content-Disposition: inline Return-Path: <9fans-admin@cse.psu.edu> Received: from punt-2.mail.demon.net by mailstore for forsyth@caldo.demon.co.uk id 1004945790:20:26926:3; Mon, 05 Nov 2001 07:36:30 GMT Received: from psuvax1.cse.psu.edu ([130.203.4.6]) by punt-2.mail.demon.net id aa2124115; 5 Nov 2001 7:36 GMT Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id EEF8C19A02; Mon, 5 Nov 2001 02:36:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 510D7199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 02:35:08 -0500 (EST) To: 9fans@cse.psu.edu Subject: Re: [9fans] fs upgrade MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-bixjnokyicyflttuhamgaxzlni" Message-Id: <20011105073508.510D7199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 08:34:38 +0100 This is a multi-part message in MIME format. --upas-bixjnokyicyflttuhamgaxzlni Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I think you just have to copy the old device into the bigger one; the fs kernel would note a resize and simply adjust the new limits and keep on burning the worm. However, since I tried with two disks of the same size and they were ide, I'd wait for acks/nacks from others. --upas-bixjnokyicyflttuhamgaxzlni Content-Type: message/rfc822 Content-Disposition: inline Received: from gsyc.escet.urjc.es ([212.128.1.45]) by aquamar; Sun Nov 4 20:49:25 MET 2001 Received: from mail.cse.psu.edu (postfix@psuvax1.cse.psu.edu [130.203.4.6]) by gsyc.escet.urjc.es (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA11007; Sun, 4 Nov 2001 20:49:24 +0100 X-Authentication-Warning: gsyc.escet.urjc.es: Host postfix@psuvax1.cse.psu.edu [130.203.4.6] claimed to be mail.cse.psu.edu Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.16.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7791119A1C; Sun, 4 Nov 2001 14:49:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from cosym.net (peter.sys.9srv.net [64.7.3.116]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id B20E319A0D for <9fans@cse.psu.edu>; Sun, 4 Nov 2001 14:48:36 -0500 (EST) From: anothy@cosym.net To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Message-Id: <20011104194836.B20E319A0D@mail.cse.psu.edu> Subject: [9fans] fs upgrade Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 4 Nov 2001 14:48:23 -0500 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by gsyc.escet.urjc.es id UAA11007 okay, so i've got this file server. given my space and money constraints, it's a pseudo-worm, running off a single 36GB SCSI disk. said disk is nearing capacity. as one might imagine, i'd like to add capacity to my file server. how do i do so? i'm particularly interested in how to do so without loss of all my history, and, if possible, without wasting a disk of size equal to my current fs. i've heard tell on this list of people upgrading file servers, changing jukeboxes and retaining the history, and so on. the common response seems to be "it's not too hard." great. so please describe the procedure to someone interested in doing it. the above is a hypothetical question. i do actually have the disk and box, but havn't set up the file server yet. i want to know the process for upgrades before i set up my file server with _any_ set size for storage. so... anyone? =E3=82=A2 --upas-bixjnokyicyflttuhamgaxzlni-- --upas-rfqnrmryywjwqvsdlnnybqqpcb-- From cse.psu.edu!9fans-admin Mon Nov 5 19:25:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:25:23 JST 2001 Received: (qmail 21700 invoked by uid 1020); 5 Nov 2001 19:25:24 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21696 invoked from network); 5 Nov 2001 19:25:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:25:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id CDA3F19A05; Mon, 5 Nov 2001 05:25:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id AB2D7199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:24:34 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gry-000317-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:20:42 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Matt Senecal Message-ID: <9runr0$9g5$1@newpoisson.nosc.mil> Organization: SPAWAR Systems Center, San Diego, CA 92147 Subject: [9fans] Possible to network via modem? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:20:24 GMT Is it possible to network two Plan 9 systems via modem? From cse.psu.edu!9fans-admin Mon Nov 5 19:25:49 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:25:49 JST 2001 Received: (qmail 21710 invoked by uid 1020); 5 Nov 2001 19:25:50 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21706 invoked from network); 5 Nov 2001 19:25:49 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:25:49 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.20.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2855B19A0C; Mon, 5 Nov 2001 05:25:19 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E830A199FA for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:24:35 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gtD-0003Bp-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:21:59 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87u1wduiex.fsf@becket.becket.net> Organization: University of California, Irvine Content-Type: text/plain; charset=us-ascii References: <20011102172614.8CF92199B9@mail.cse.psu.edu> Subject: Re: [9fans] Plan 9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:21:01 GMT rsc@plan9.bell-labs.com (Russ Cox) writes: > Now, now, be fair. The real problem is that we don't have a USB > driver at boot, we require a floppy disk to install, and your laptop's > floppy drive is USB. There is no dependency on Microsoft operating > systems whatever (though our boot floppy happens to use their > file system format), and what we ``forgot'' was the ability to boot > out of extended partitions that are pretending to be a floppy disk, > which no one else does either. There are some bugs in fdisk's > extended partition table parsing too, but we didn't get far. I'm not trying to be unfair; you did bend over backwards to try and get it working, and sadly it just doesn't. I wasn't trying to poke fun or anything like that. By dependency on Microdreck, I meant the dependency on the filesystem that you mention. From cse.psu.edu!9fans-admin Mon Nov 5 19:26:11 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:26:11 JST 2001 Received: (qmail 21728 invoked by uid 1020); 5 Nov 2001 19:26:11 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21724 invoked from network); 5 Nov 2001 19:26:10 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:26:10 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id CF9A219A19; Mon, 5 Nov 2001 05:25:32 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 14B5D199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:24:38 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gvB-0003TJ-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:24:01 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Donn Cave Message-ID: <1004904906.522561@yabetcha.sttl.drizzle.com> Organization: Ye 'Ol Disorganized NNTPCache groupie Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] installer partition magic Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:22:04 GMT I managed to screw up the disk partitions on my laptop a second time in a row this morning with the 9disk.9fd installer, and I expect it would do it every time. After "partdisk" I had partition block offsets, 63 2345490 4707045 7068600 and I used my NetBSD install disk to move them to 63 2345490 4717504 7076224 so I can boot the original partitions. I can't remember by now how I set those partitions up, whether it was NetBSD or (more likely) the Partition Magic installer from BeOS 4.0 distribution. I notice that the Plan 9 fdisk presents partition sizes in cylinders, where the Partition Magic uses megabytes. I don't know if that's it - 9fdisk is forcing partitions to cylinder alignment - or what. The Plan 9 installation went on the first partition, which seems to have retained its dimensions. I seem to have some network problem, because the download timed out (no error message though.) I saved the install state and, if I try again, it won't rewrite the partition map this time, right? While I'm complaining about partdisk, I should mention that the procedure assures me that it's going to locate a partition on its own and just tell me, and then it comes back and says it can't find a suitable partition. The ideal thing from my point of view, would be for it to just ask me. Donn Cave, donn@drizzle.com From cse.psu.edu!9fans-admin Mon Nov 5 19:26:34 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:26:34 JST 2001 Received: (qmail 21737 invoked by uid 1020); 5 Nov 2001 19:26:35 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21732 invoked from network); 5 Nov 2001 19:26:34 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:26:34 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 8D59219A28; Mon, 5 Nov 2001 05:25:45 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id D97B4199FA for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:24:39 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gtj-0003GQ-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:22:31 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "martin.m.dowie" Message-ID: Organization: ntlworld News Service References: Subject: [9fans] Re: Plan9 and Ada95? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:21:29 GMT "Caffienator" wrote in message news:FxXC7.205641$K6.100988476@news2... > I know C and C++, but my preferred tool for building reliable software is > Ada95. Are there any Ada95 compilers available for the Plan9 platform? > If not, would a port of the GNAT compiler to Plan9 interest anyone? I'm interested! Though I'm still struggling to actually get my plan9 to boot... :-( From cse.psu.edu!9fans-admin Mon Nov 5 19:28:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:28:23 JST 2001 Received: (qmail 21754 invoked by uid 1020); 5 Nov 2001 19:28:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21750 invoked from network); 5 Nov 2001 19:28:23 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:28:23 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1BF3B19A27; Mon, 5 Nov 2001 05:28:08 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from nautilus.escet.urjc.es (nautilus.escet.urjc.es [212.128.4.207]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id D971F199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:27:18 -0500 (EST) From: Fco.J.Ballesteros To: 9fans@cse.psu.edu Subject: Re: [9fans] fs upgrade MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20011105102718.D971F199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 11:27:06 +0100 Wouldn't a ream on the target device followed by a raw copy of the source into the target work? From cse.psu.edu!9fans-admin Mon Nov 5 19:33:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:33:23 JST 2001 Received: (qmail 21804 invoked by uid 1020); 5 Nov 2001 19:33:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21800 invoked from network); 5 Nov 2001 19:33:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:33:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 234CE19A29; Mon, 5 Nov 2001 05:33:08 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 41154199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:32:01 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gtU-0003EK-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:22:16 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Matt Senecal Message-ID: <50ecc828.0111022056.782b3e0@posting.google.com> Organization: http://groups.google.com/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: [9fans] Help: Manually set Plan 9 as Win 9x boot option? Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:21:16 GMT Is there any way to manually setup Plan 9 as a Win9x boot option? The primary drive on my system is an Ultra-100 DMA drive, and requires a special card (by Promise Technology) to run on this system. The Plan 9 installer cannot see this drive. Plan 9 was installed on an older IDE drive, the primary slave, which is plugged into the primary IDE bus. I tried setting Plan 9 as a win9x boot option, but the installer couldn't see my boot drive, so that didn't work. Is there any way I can set this up manually? I tried creating a boot disk, but it didn't work, either. This is my second Plan 9 system, and I'm hoping to network the two together. From cse.psu.edu!9fans-admin Mon Nov 5 19:33:44 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:33:44 JST 2001 Received: (qmail 21813 invoked by uid 1020); 5 Nov 2001 19:33:44 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21809 invoked from network); 5 Nov 2001 19:33:44 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:33:44 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id CB53A19A30; Mon, 5 Nov 2001 05:33:20 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7AC26199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:32:12 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gu4-0003JC-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:22:52 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Jonadab the Unsightly One Message-ID: Organization: bright.net Ohio Content-Type: text/plain; charset=us-ascii References: <017501c15d0e$adda8870$f9b9c6d4@SOMA>, Subject: Re: [9fans] Alpha success (w/ clock.c bugfix and ether2114x.c update) Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:21:50 GMT aam396@mail.usask.ca (andrey mirtchovski) writes: > incidentally #248622 is exactly the size of my xmahjong executable on this > machine... weird (or maybe that's what you had in mind?) > > 42 seems like a much more meaningful number to me :) 248622 is a higher resonance of 42. First off, 24 is 42 backwards, then you have 86, and the arithmetic mean of 8 and 6 is 4. Then you have 2 2s. See? 248622 is 42 all over, from beginning to end. From cse.psu.edu!9fans-admin Mon Nov 5 19:34:09 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 19:34:09 JST 2001 Received: (qmail 21820 invoked by uid 1020); 5 Nov 2001 19:34:09 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 21816 invoked from network); 5 Nov 2001 19:34:09 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 19:34:09 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.23.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 166D819A31; Mon, 5 Nov 2001 05:33:33 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 13923199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 05:32:17 -0500 (EST) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 160gs9-00032Z-00 for 9fans@cse.psu.edu; Mon, 05 Nov 2001 10:20:53 +0000 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87y9lpuih4.fsf@becket.becket.net> Organization: University of California, Irvine Content-Type: text/plain; charset=us-ascii References: <20011102135323.938F819A04@mail.cse.psu.edu> Subject: Re: [9fans] Plan 9 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 10:20:38 GMT rob@plan9.bell-labs.com (rob pike) writes: > Any 'link' can be per-process in Plan 9, but in practice only those ones > that need to be are invested with the trouble to make them so. Otherwise, > I would have to write down somewhere what all the default links would > be for a process when it starts running, and that would be a huge > list of information and also unpredictable since I can't say what resources > the process is likely to need dynamically. Right, that's what I meant by "leave aside implementation for the moment". :) I understand why it might be challenging to do it efficiently. > In other words, in Plan 9 all links *can* be per-process but only those > that *need* to be actually are. Why do it differently? > > Or perhaps I don't understand what you're asking. In a logical sense then, every link *is* per-process. (Because if it can be, then in a very real sense, it already is, even if all processes happen to agree about it.) So in that case, in Plan 9 there are at least four different sets of tools for making a new link--at least. Some sample places that links get specified: * Default links go in the fileserver's data structures on disk, and are manipulated by a host of cooperating programs and syscalls. * Other defaults go in the file that specifies the initial contents of users' mount tables. * Users have startup files that fill their mount tables with links. * Shell commands and syscalls are available to change the mount tables transiently. Now by far the easiest is the first (if only because there are so many tools to manipulate such links). (If you wonder what I'm asking, it's because I'm trying to home in on a concept, not that I already have it full developed.) So perhaps part of the issue is a unification of the different kinds of links, and a reduction in the number of tools and places that all manipulate and store information about what links there are. There are two things about links that seem important: * Is the link shared between processes/users, and how? * Is the link transient or permanent? You are certainly correct that most links will be shared among most users; having on-disk data structures that represent them is a perfectly decent implementation strategy, but now I hope it's clear that this is just an implementation detail, and need not directly influence the appearance of the system to the user. Thomas From cse.psu.edu!9fans-admin Mon Nov 5 20:46:22 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 20:46:22 JST 2001 Received: (qmail 22774 invoked by uid 1020); 5 Nov 2001 20:46:22 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 22770 invoked from network); 5 Nov 2001 20:46:21 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 20:46:21 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id B29E219A05; Mon, 5 Nov 2001 06:46:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from smtp.noos.fr (camus.noos.net [212.198.2.70]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 2F663199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 06:45:56 -0500 (EST) Received: (qmail 97349760 invoked by uid 0); 5 Nov 2001 11:45:53 -0000 Received: from unknown (HELO SOMA) ([212.198.185.249]) (envelope-sender ) by 212.198.2.70 (qmail-ldap-1.03) with SMTP for <9fans@cse.psu.edu>; 5 Nov 2001 11:45:53 -0000 Message-ID: <004801c165ee$e4cb11e0$f9b9c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <017501c15d0e$adda8870$f9b9c6d4@SOMA>, Subject: Re: [9fans] Alpha success (w/ clock.c bugfix and ether2114x.c update) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 12:42:05 +0100 > 248622 is a ... It was my Digital badge #. The thread was about research in Digital IIRC. From cse.psu.edu!9fans-admin Mon Nov 5 22:19:23 JST 2001 remote from ar Received: from vega.aichi-u.ac.jp ([202.16.124.3]) by ar; Mon Nov 5 22:19:23 JST 2001 Received: (qmail 23720 invoked by uid 1020); 5 Nov 2001 22:19:23 +0900 Delivered-To: arisawa@aichi-u.ac.jp Received: (qmail 23716 invoked from network); 5 Nov 2001 22:19:22 +0900 Received: from psuvax1.cse.psu.edu (HELO mail.cse.psu.edu) (postfix@130.203.4.6) by vega.aichi-u.ac.jp with SMTP; 5 Nov 2001 22:19:22 +0900 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.6.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id DCA2119A05; Mon, 5 Nov 2001 08:19:06 -0500 (EST) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (plan9.bell-labs.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 713B1199B5 for <9fans@cse.psu.edu>; Mon, 5 Nov 2001 08:18:58 -0500 (EST) From: presotto@closedmind.org To: 9fans@cse.psu.edu Subject: Re: [9fans] Help: Manually set Plan 9 as Win 9x boot option? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-ssikzggmgnghqyopbyliuxrprd" Message-Id: <20011105131858.713B1199B5@mail.cse.psu.edu> Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Nov 2001 08:18:55 -0500 This is a multi-part message in MIME format. --upas-ssikzggmgnghqyopbyliuxrprd Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Yes, here's some examples: % cat /n/c:/autoexec.bat: @ECHO OFF GOTO %config% :plan9 C:\PLAN9\LD.COM sdC0!dos!plan9/9load GOTO end :dos GOTO end :windows C:\WINDOWS\COMMAND\DOSKEY.COM SET Path=C:\PROGRA~1\THINKPAD\UTILIT~1; REM The following line creates the hibernation file. if not exist C:\save2dsk.bin C:\PROGRA~1\THINKPAD\UTILIT~1\phdisk /c /f