diff options
-rw-r--r-- | lib/theo | 44 | ||||
-rw-r--r-- | lib/troll (renamed from sys/games/lib/trolls) | 3 | ||||
-rwxr-xr-x | rc/bin/memory | 16 | ||||
-rwxr-xr-x | rc/bin/theo | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | rc/bin/troll | 2 | ||||
-rw-r--r-- | sys/games/lib/fortunes | 5 | ||||
-rw-r--r-- | sys/man/1/fortune | 21 | ||||
-rw-r--r-- | sys/src/9/pc/sdide.c | 63 | ||||
-rw-r--r-- | sys/src/cmd/acid/acid.h | 1 | ||||
-rw-r--r-- | sys/src/cmd/acid/main.c | 27 |
10 files changed, 128 insertions, 56 deletions
diff --git a/lib/theo b/lib/theo new file mode 100644 index 000000000..e6faa8f1e --- /dev/null +++ b/lib/theo @@ -0,0 +1,44 @@ +On December 20 [1994], Theo de Raadt was asked to resign from the NetBSD Project by the remaining members of 'core'. This was a very difficult decision to make, and resulted from Theo's long history of rudeness towards and abuse of users and developers of NetBSD. -- Adam Glass, NetBSD mailing list, December 23, 1994 +Admittedly, I was apprehensive about interviewing Theo de Raadt. -- Julie Bresnick, Newsforge, January 30, 2001 +It's widely claimed that I'm "the one" who ejected Theo from the NetBSD community. That is false. At that time in NetBSD's history, Chris G. Demetriou was playing the role of alpha male, and I wasn't even given a choice. I was certain it was going to bite us in the ass. I think the question for historians is not whether it did bite us in the ass, but how many times and how hard. -- Charles M. Hannum, ONLamp.com, September 14, 2006 +The X documentation is full of lies. +The world doesn't live off jam and fancy perfumes - it lives off bread and meat and potatoes. Nothing changes. All the big fancy stuff is sloppy stuff that crashes. I don't need dancing baloney - I need stuff that works. That's not as pretty, and just as hard. +I actually am fairly uncomfortable about it, even if our firm stipulation was that they cannot tell us what to do. We are simply doing what we do anyways -- securing software -- and they have no say in the matter. I try to convince myself that our grant means a half of a cruise missile doesn't get built. +Low code quality keeps haunting our entire industry. That, and sloppy programmers who don't understand the frameworks they work within. They're like plumbers high on glue. +Hardware donations do not come from vendors who use OpenSSH on parts of their stuff. They come from individuals. The hardware vendors who use OpenSSH on all of their products have given us a total of one laptop since we developed OpenSSH five years ago. And asking them for that laptop took a year. That was IBM. +So the HP guy comes up to me (at the Melbourne conference) and he says, 'If you say nasty things like that to vendors you're not going to get anything'. I said 'no, in eight years of saying nothing, we've got nothing, and I'm going to start saying nasty things, in the hope that some of these vendors will start giving me money so I'll shut up'. +This is a software monopoly but at least it was written by people who care about security, so it's not like Microsoft's monopoly. +It's terrible, everyone is using it, and they don't realize how bad it is. And the Linux people will just stick with it and add to it rather than stepping back and saying, 'This is garbage and we should fix it. +Linux people do what they do because they hate Microsoft. We do what we do because we love Unix. +I think it is astounding that people could argue for "you just must trust someone else to fix it" instead of "you could fix it yourself, or hire someone to fix it." There is a contractor base out there that can solve these problems as well as or better than the major vendors could. But I think the major vendors are still having more luck at getting the ear of the press. +Well, we do not do this so that other players can make profit. We've actually been doing this for a long time and I do not know of anyone who specifically makes money off OpenBSD. They may, at best, save some money by not having to re-engineer the same software that we have already written. It is not exactly that we are letting them make a profit, but that we are doing a proper job and saving someone else from having to do the same job in a corporate setting. In our eyes, that is perhaps a waste of planet-wide engineer talents, rewriting the same thing over and over. Why can\u2019t we just get it right once? +What's so exciting is to be able to just take something and polish it so much that hopefully in the future people will start borrowing things from it. +...you are being the usual slimy hypocritical asshole... You may have had value ten years ago, but people will see that you don't anymore. +The only way to make it clear to him that he should not come here to our lists in the future, is to teach him a hard lesson, and that is done by continually re-adding cc's back to him -- because the mails talk about him -- even when his friends come our mailing lists and delete the his address from the cc list. Like this message, which adds him back in. Richard, you are a lying cheating hypocrite. +Buttons are for idiots. +A solid systems's approach should not be based on "but it works". Yet, time and time again, we see that for most people this is the case. They don't care about good software, only about "good enough" software. So the programmers can continue to make such mistakes. +Why are you guys so fork paranoid? Do you want everyone to vote for the same political party, too? +I think your computer science teachers are still teaching you from books written in the 80's, when the word "micro-kernel" was associated with a future utopia. +But software which OpenBSD uses and redistributes must be free to all (be they people or companies), for any purpose they wish to use it, including modification, use, peeing on, or even integration into baby mulching machines or atomic bombs to be dropped on Australia. +Do you trust glibc? OK, perhaps that snide remark is overstating things a bit, but secure software only happens when all the pieces have 100% correct behavior. +I say things as they are. Slackers are called slackers, people who can't read manual pages are called losers, and in general, calling things what they are results in developers wasting less time. +You did not create these mailing lists, so you can take your opinions about why these lists were created and shove them up your ass. +We don't normally recommend that you use it over another operating system. Or even under, or beside, or even near. "Instead of " -- that describes how we use it ;) +It's the little things that make Freedom become Not Freedom. +I am simply astounded at some of the things people keep repeating. I don't mean this applies to everyone, but is there a high quantity of attention deficit disorder in our user community? Or retards? Or is it just the same old trolling? OpenBSD does not incorporate non-free software. +They may want to use some GPL'd build tools but if they start putting GPL parts directly into X, then that is going to cause another X split. I promise. +Scaling isn't really our concern; I barely know what the word means. There is one group of people who we do know scales. Whiners. They scale really well. +I am very easy to get along with, but I don't have time to waste being nice to people who are being stupid. +In the Unix system view, anything which needs to talk to raw devices INSTEAD OF THE KERNEL DOING SO is broken. There are no apologies to be made. Period. If you want X to talk to IO devices, what next? ls? +Hardly surprising. Apple. They build crap and make you pay extra. +Complexity does not avert risk. Ever. Period. +You are absolutely deluded, if not stupid, if you think that a worldwide collection of software engineers who can't write operating systems or applications without security holes, can then turn around and suddenly write virtualization layers without security holes. +Shut up and hack. +I could live in a tent and be happy, but all the ISP's want fixed addresses.... +I started working on OpenBSD, and many earlier projects, because I have always felt that vendor systems were not designed for quality. +I work on OpenBSD fulltime, as the project leader. I set some directions, increase communication between the developers, and try to be involved in nearly every aspect of the base system. +In some industry markets, high quality can be tied to making more money, but I am sure by now all of us know the computer industry is not like that. +The primary goal of a vendor is to make money. +As I read the news, it comes to me that these days companies in the United States appear to have more rights than either individuals or nonprofit organizations, so I am not surprised. +I think it is entirely a U.S. trend, and you should look at how the legal system has changed in your country over the last few years. +Thank you for thinking about this. diff --git a/sys/games/lib/trolls b/lib/troll index ddd7c42f1..ba5003e39 100644 --- a/sys/games/lib/trolls +++ b/lib/troll @@ -4,3 +4,6 @@ the wii is actually a pretty technically-advanced console compared to the ps3 lighttpd is a great drop-in replacement for apache you shouldn't really run hdd speed tests under plan9 because the controller drivers are hacked-together open-source shit, something closed-source but official like windows would give a more accurate result the british empire had the right idea when they enslaved all those damn niggers +ken is an idiot, he could have learned C++ instead of inventing Go +transparent terminals provide a huge productivity boost +Cirno is the official 9front mascot and the best you could ever think of diff --git a/rc/bin/memory b/rc/bin/memory new file mode 100755 index 000000000..35ad94d44 --- /dev/null +++ b/rc/bin/memory @@ -0,0 +1,16 @@ +#!/bin/rc +awk ' +function human(name, n) { + printf "%-15s", name + if(n >= 1000000000) printf "%.3g GB\n", n / 1073741824 + else if(n >= 1000000) printf "%.3g MB\n", n / 1048576 + else if(n >= 1000) printf "%.3g KB\n", n / 1024 + else printf "%d B\n", n +} +$2 == "memory" { human("total", $1) } +$2 == "pagesize" { pagesize = $1 } +$2 == "kernel" && NF == 2 { human("total kernel", $1 * pagesize) } +$2 == "user" { split($1, a, "/"); human("total user", a[2] * pagesize); print ""; human("used user", a[1] * pagesize) } +$2 == "kernel" && $3 == "malloc" { split($1, a, "/"); human("used kernel", a[1]) } +$2 == "kernel" && $3 == "draw" { split($1, a, "/"); human("used draw", a[1]) } +' < /dev/swap diff --git a/rc/bin/theo b/rc/bin/theo new file mode 100755 index 000000000..fc82ae514 --- /dev/null +++ b/rc/bin/theo @@ -0,0 +1,2 @@ +#!/bin/rc +fortune /lib/theo diff --git a/rc/bin/troll b/rc/bin/troll index f114cce63..a8f6d9c07 100755..100644 --- a/rc/bin/troll +++ b/rc/bin/troll @@ -1,2 +1,2 @@ #!/bin/rc -fortune /sys/games/lib/trolls +fortune /lib/troll diff --git a/sys/games/lib/fortunes b/sys/games/lib/fortunes index d2455f382..b9adaeaf8 100644 --- a/sys/games/lib/fortunes +++ b/sys/games/lib/fortunes @@ -4535,3 +4535,8 @@ The cast spent three weeks learning how to type, rollerblade and got to know eac I knew nothing about the PowerPC and had no idea how to modify my software to run on it. One August night, after dinner, two guys showed up to announce that they would camp out in my office until the modification was done. The three of us spent the next six hours editing fifty thousand lines of code. The secret to programming is having smart friends. -- Former Apple engineer <sl> at least he's not sexist. +(#cat-v) <aiju> it's hard not to get trolled in #go-nuts +Dickerson explained the change today on Etsy's blog, saying that his focus as the new CEO will be to impel Etsy to move faster "and more purposefully", and re-prioritize risk-taking and "learning by doing" and "iterating." +(#cat-v) <cinap_lenrek> aiju: i had the correct code in my head +Connection to Microsoft Exchange has been restored. +/* ok for now. */ diff --git a/sys/man/1/fortune b/sys/man/1/fortune index 96349ebef..b3a9eb874 100644 --- a/sys/man/1/fortune +++ b/sys/man/1/fortune @@ -1,16 +1,15 @@ .TH FORTUNE 1 .SH NAME -fortune, troll \- sample lines from a file +fortune, theo, troll \- sample lines from a file .SH SYNOPSIS .B fortune [ .I file ] .br +.B theo +.br .B troll -[ -.I file -] .SH DESCRIPTION .I Fortune prints a one-line aphorism chosen at random. @@ -25,16 +24,28 @@ Troll is more specific than .I fortune; it specializes in inflammatory rhetoric. +.LP +.I +Theo +is more specific than +.I troll; +it presents quotes from OpenBSD founder +Theo de Raadt. .SH FILES .B /sys/games/lib/fortunes .br .B /sys/games/lib/fortunes.index \ \ fast lookup table, maintained automatically .br -.B /sys/games/lib/trolls +.B /lib/theo +.br +.B /lib/troll .SH SOURCE .B /sys/src/cmd/fortune.c .br +.br +.B /rc/bin/theo +.br .B /rc/bin/troll .SH AUTHORS Some initial trolls were provided by ChrisPBS. diff --git a/sys/src/9/pc/sdide.c b/sys/src/9/pc/sdide.c index c4334d190..5aded108f 100644 --- a/sys/src/9/pc/sdide.c +++ b/sys/src/9/pc/sdide.c @@ -259,7 +259,7 @@ typedef struct Prd { /* Physical Region Descriptor */ } Prd; enum { - BMspan = 64*1024, /* must be power of 2 <= 64*1024 */ + BMspan = 32*1024, /* must be power of 2 <= 64*1024 */ Nprd = SDmaxio/BMspan+2, }; @@ -272,6 +272,7 @@ typedef struct Ctlr { int bmiba; /* bus master interface base address */ int maxio; /* sector count transfer maximum */ int span; /* don't span this boundary with dma */ + int maxdma; /* don't attempt dma transfers bigger than this */ Pcidev* pcidev; void (*ienable)(Ctlr*); @@ -1019,6 +1020,8 @@ atadmasetup(Drive* drive, int len) pa = PCIWADDR(drive->data); if(pa & 0x03) return -1; + if(ctlr->maxdma && len > ctlr->maxdma) + return -1; /* * Sometimes drives identify themselves as being DMA capable @@ -1047,7 +1050,7 @@ atadmasetup(Drive* drive, int len) prd++; } if(i == Nprd) - (prd-1)->count |= PrdEOT; + return -1; bmiba = ctlr->bmiba; outl(bmiba+Bmidtpx, PCIWADDR(ctlr->prdt)); @@ -1134,6 +1137,8 @@ atapktinterrupt(Drive* drive) break; case 0: + if(drive->pktdma) + goto Pktdma; len = (inb(cmdport+Bytehi)<<8)|inb(cmdport+Bytelo); if(drive->data+len > drive->limit){ atanop(drive, 0); @@ -1144,6 +1149,8 @@ atapktinterrupt(Drive* drive) break; case Io: + if(drive->pktdma) + goto Pktdma; len = (inb(cmdport+Bytehi)<<8)|inb(cmdport+Bytelo); if(drive->data+len > drive->limit){ atanop(drive, 0); @@ -1154,9 +1161,10 @@ atapktinterrupt(Drive* drive) break; case Io|Cd: - if(drive->pktdma) + if(drive->pktdma){ + Pktdma: atadmainterrupt(drive, drive->dlen); - else + } else ctlr->done = 1; break; } @@ -1186,26 +1194,25 @@ atapktio0(Drive *drive, SDreq *r) return SDnostatus; ilock(ctlr); - if(drive->dlen && drive->dmactl && !atadmasetup(drive, drive->dlen)) + if(drive->dlen && drive->dmactl && !atadmasetup(drive, drive->dlen)){ drive->pktdma = Dma; - else + len = 0; /* bytecount should be 0 for dma */ + }else{ drive->pktdma = 0; - + if(drive->secsize) + len = 16*drive->secsize; + else + len = 0x8000; + } outb(cmdport+Features, drive->pktdma); outb(cmdport+Count, 0); outb(cmdport+Sector, 0); - if(drive->secsize) - len = 16*drive->secsize; - else - len = 0x8000; outb(cmdport+Bytelo, len); outb(cmdport+Bytehi, len>>8); outb(cmdport+Dh, drive->dev); ctlr->done = 0; ctlr->curdrive = drive; ctlr->command = Cpkt; /* debugging */ - if(drive->pktdma) - atadmastart(ctlr, drive->write); outb(cmdport+Command, Cpkt); if((drive->info[Iconfig] & Mdrq) != 0x0020){ @@ -1219,23 +1226,22 @@ atapktio0(Drive *drive, SDreq *r) }else atapktinterrupt(drive); } + if(drive->pktdma) + atadmastart(ctlr, drive->write); iunlock(ctlr); if(iowait(drive, 20*1000, 1) <= 0){ ilock(ctlr); - if(!drive->error){ - ataabort(drive, 0); - if(drive->pktdma){ - atadmastop(ctlr); - drive->dmactl = 0; - } - } - if(drive->error){ - drive->status |= Chk; - ctlr->curdrive = nil; - } - iunlock(ctlr); + ataabort(drive, 0); + } else + ilock(ctlr); + if(drive->error){ + if(drive->pktdma) + atadmastop(ctlr); + drive->status |= Chk; + ctlr->curdrive = nil; } + iunlock(ctlr); if(drive->status & Chk) rv = SDcheck; @@ -2001,7 +2007,7 @@ static SDev* atapnp(void) { char *s; - int channel, map, ispc87415, maxio, pi, r, span, tbdf; + int channel, map, ispc87415, maxio, pi, r, span, maxdma, tbdf; Ctlr *ctlr; Pcidev *p; SDev *sdev, *head, *tail; @@ -2034,6 +2040,7 @@ atapnp(void) pi = p->ccrp; map = 3; ispc87415 = 0; + maxdma = 0; maxio = 0; if(s = getconf("*idemaxio")) maxio = atoi(s); @@ -2172,9 +2179,10 @@ atapnp(void) case (0x2366<<16)|0x197b: /* jmicron jmb366 */ case (0x2368<<16)|0x197b: /* jmicron jmb368 */ break; - case (0x1230<<16)|0x8086: /* 82371FB (PIIX) */ case (0x7010<<16)|0x8086: /* 82371SB (PIIX3) */ + case (0x1230<<16)|0x8086: /* 82371FB (PIIX) */ case (0x7111<<16)|0x8086: /* 82371[AE]B (PIIX4[E]) */ + maxdma = 0x20000; break; case (0x2411<<16)|0x8086: /* 82801AA (ICH) */ case (0x2421<<16)|0x8086: /* 82801AB (ICH0) */ @@ -2246,6 +2254,7 @@ atapnp(void) ctlr->tbdf = tbdf; ctlr->pcidev = p; ctlr->maxio = maxio; + ctlr->maxdma = maxdma; ctlr->span = span; ctlr->irqack = irqack; if(pi & 0x80) diff --git a/sys/src/cmd/acid/acid.h b/sys/src/cmd/acid/acid.h index ef398e7b8..a050bc51b 100644 --- a/sys/src/cmd/acid/acid.h +++ b/sys/src/cmd/acid/acid.h @@ -27,7 +27,6 @@ typedef struct Type Type; typedef struct Frtype Frtype; Extern int kernel; -Extern int remote; Extern int text; Extern int silent; Extern Fhdr fhdr; diff --git a/sys/src/cmd/acid/main.c b/sys/src/cmd/acid/main.c index 89fc4c636..f5b67bd05 100644 --- a/sys/src/cmd/acid/main.c +++ b/sys/src/cmd/acid/main.c @@ -60,19 +60,11 @@ main(int argc, char *argv[]) case 'q': quiet = 0; break; - case 'r': - pid = 1; - remote++; - kernel++; - break; default: usage(); }ARGEND if(argc > 0) { - if(remote) - aout = argv[0]; - else if(isnumeric(argv[0])) { pid = strtol(argv[0], 0, 0); snprint(prog, sizeof(prog), "/proc/%d/text", pid); @@ -89,9 +81,7 @@ main(int argc, char *argv[]) } aout = argv[0]; } - } else - if(remote) - aout = "/mips/9ch"; + } fmtinstall('x', xfmt); fmtinstall('L', Lfmt); @@ -258,7 +248,6 @@ readtext(char *s) Value *v; uvlong length; Symbol sym; - extern Machdata mipsmach; if(mtype != 0){ symmap = newmap(0, 1); @@ -274,8 +263,6 @@ readtext(char *s) return; } - machdata = &mipsmach; - if(!crackhdr(text, &fhdr)) { print("can't decode file header\n"); return; @@ -553,15 +540,11 @@ system(void) static char *kernel; cpu = getenv("cputype"); - if(cpu == 0) { - cpu = "mips"; - print("$cputype not set; assuming %s\n", cpu); - } + if(cpu == 0) + sysfatal("$cputype not set"); p = getenv("terminal"); - if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0) { - p = "ch"; - print("missing or bad $terminal; assuming %s\n", p); - } + if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0) + sysfatal("$terminal not set"); else{ p++; q = strchr(p, ' '); |