]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
3 years agopc/devarch: use m->cpumhz instead of recalculatin it
cinap_lenrek [Sat, 20 Feb 2021 12:08:59 +0000 (13:08 +0100)]
pc/devarch: use m->cpumhz instead of recalculatin it

3 years ago9boot: handle automatic length for 64-bit values in hexfmt() for framebuffer address...
cinap_lenrek [Sat, 20 Feb 2021 11:55:42 +0000 (12:55 +0100)]
9boot: handle automatic length for 64-bit values in hexfmt() for framebuffer address (thanks Michael Forney)

3 years ago/sys/src/cmd/ndb/dns.h:
sl [Sat, 20 Feb 2021 02:29:55 +0000 (21:29 -0500)]
/sys/src/cmd/ndb/dns.h:

---

To: 9front@9front.org
Date: Sun, 07 Feb 2021 14:56:39 +0100
From: kvik@a-b.xyz
Subject: Re: [9front] transient dns errors cause smtp failure
Reply-To: 9front@9front.org
I think I found a reason for DNS failing on known good domains.

/sys/src/cmd/ndb/dns.h:156,157
/* tune; was 60*1000; keep it short */
Maxreqtm= 8*1000, /* max. ms to process a request */

So, 8 seconds is how much the resolver will bother with a request it
has been handed, before dropping it on the floor with little
explanation.

It seems quite possible that this is too short a timeout on a machine
during a spam queue run, which predictably stresses the compute and
network resources.

In turn, negative response caching might explain why a particular
unlucky domain would basically stop receiveing any mail for a while.

I'm dying to know if bumping this limit would clear up the queue of
such DNS errors.

---

[narrator: it did.]

3 years agosam/{address.c, sam.h}: bump STRSIZE to 512MB (thanks, Ori_B)
sl [Sat, 20 Feb 2021 02:15:15 +0000 (21:15 -0500)]
sam/{address.c, sam.h}: bump STRSIZE to 512MB (thanks, Ori_B)

3 years agolibstdio: sync bits of vfprintf from APE
kvik [Fri, 19 Feb 2021 22:04:09 +0000 (23:04 +0100)]
libstdio: sync bits of vfprintf from APE

* Add the %ll length modifier,
* Convert nil to "<nil>" under %s (not in APE),
* Cast void* to uintptr under %p,
* Use "0x" hex prefix under %p,
* Fix manual page mentions of %P to %p,
* Fix empty result for fp conversions,
* Fix zero padding of left-aligned fp conversions,
* Remove deprecated #pragma ref uses.

Most of these were introduced in APE prior to 9front.

I've omitted the %z conversion specifier since Plan 9 code
rarely uses the usize type. This may need to be added later
for the benefit of native ports of alien code.

3 years agonan(2): document isInf(x, 0) matching +∞ and -∞
kvik [Thu, 18 Feb 2021 20:40:30 +0000 (21:40 +0100)]
nan(2): document isInf(x, 0) matching +∞ and -∞

3 years agoaudio/flacenc: fix usage
Sigrid [Thu, 18 Feb 2021 14:13:25 +0000 (15:13 +0100)]
audio/flacenc: fix usage

3 years agogames/snes: use enum constants KON and ENDX instead of their values
Michael Forney [Wed, 17 Feb 2021 10:20:13 +0000 (11:20 +0100)]
games/snes: use enum constants KON and ENDX instead of their values

3 years agogames/snes: implement DSP echo
Michael Forney [Wed, 17 Feb 2021 10:20:05 +0000 (11:20 +0100)]
games/snes: implement DSP echo

3 years agogames/snes: implement DSP noise
Michael Forney [Wed, 17 Feb 2021 10:19:50 +0000 (11:19 +0100)]
games/snes: implement DSP noise

I'm not sure if this LFSR is the same one used by the hardware or is
arbitrary, but it matches the noise sequence used by all other snes
emulators I looked at.

3 years agogames/snes: fix BRR decoding with filters 2 and 3
Michael Forney [Wed, 17 Feb 2021 10:19:39 +0000 (11:19 +0100)]
games/snes: fix BRR decoding with filters 2 and 3

s1 and s2 should store the last and next to last output, but were set
in the wrong order, causing them both to be the last output. This
breaks filters 2 and 3, which both utilize s2.

3 years agomothra: tune up entry control logic for easier text editing
Sigrid [Tue, 16 Feb 2021 21:04:50 +0000 (22:04 +0100)]
mothra: tune up entry control logic for easier text editing

3 years ago9boot: mark efi boot and runtime service regions as reserved
cinap_lenrek [Mon, 15 Feb 2021 00:49:30 +0000 (01:49 +0100)]
9boot: mark efi boot and runtime service regions as reserved

despite the kernel never doing any efi runtime service calls,
overriding the runtime service regions makes some machines
lock up. so consider them reserved.

the boot service regions should also, in theory, be usable
by the os, but linux says otherwise...

3 years agondb/dns: implement RFC6844 certificate authority authorization record type
cinap_lenrek [Sun, 14 Feb 2021 13:25:41 +0000 (14:25 +0100)]
ndb/dns: implement RFC6844 certificate authority authorization record type

3 years ago[9front] audio/flacenc: fix error check for fseeko
Michael Forney [Thu, 11 Feb 2021 08:37:36 +0000 (09:37 +0100)]
[9front] audio/flacenc: fix error check for fseeko
fseeko returns 0 on success, not the new stream position.

This allows flacenc to update the streaminfo block when it is finished
(for example to set the number of samples and checksum).

3 years agofont/terminus: you can't run a font, silly
Ori Bernstein [Wed, 10 Feb 2021 23:42:18 +0000 (15:42 -0800)]
font/terminus: you can't run a font, silly

Remove the execute bit from the fonts.

3 years agonusb: don't create rw iso endpoints (by Michael Forney)
cinap_lenrek [Wed, 10 Feb 2021 19:08:13 +0000 (20:08 +0100)]
nusb: don't create rw iso endpoints (by Michael Forney)

There may be two iso endpoints with the same ID if it is asynchronous
or adaptive (one for data, one for feedback), and rw iso endpoints are
unusable (error out with "iso i/o is half-duplex").

3 years agonusb: don't create rw iso endpoints (by Michael Forney)
cinap_lenrek [Wed, 10 Feb 2021 18:52:00 +0000 (19:52 +0100)]
nusb: don't create rw iso endpoints (by Michael Forney)

There may be two iso endpoints with the same ID if it is asynchronous
or adaptive (one for data, one for feedback), and rw iso endpoints are
unusable (error out with "iso i/o is half-duplex").

3 years agomerge
Ori Bernstein [Wed, 10 Feb 2021 18:21:06 +0000 (10:21 -0800)]
merge

3 years agofortunes: That depends on how you define native. -- Andre Garzia
sl [Wed, 10 Feb 2021 04:11:08 +0000 (23:11 -0500)]
fortunes: That depends on how you define native. -- Andre Garzia

3 years agonewt: remove fn f, replace with walk
sl [Wed, 10 Feb 2021 03:50:31 +0000 (22:50 -0500)]
newt: remove fn f, replace with walk

3 years agostdio: remove erronous assert in dtoa
Ori Bernstein [Tue, 9 Feb 2021 21:57:38 +0000 (13:57 -0800)]
stdio: remove erronous assert in dtoa

The value of `k` in dtoa() is an estimate of
floor(log10(d)), where `d` is the number being
converted. The code was asserting that 'k' was
less than 100, but the full range of a double
goes to 10^308 or so.

This means that the majority of the range of
a double would trigger that assert.

3 years ago[9front] mimetype: add entry for .patch extension
Michael Forney [Tue, 9 Feb 2021 05:09:17 +0000 (21:09 -0800)]
[9front] mimetype: add entry for .patch extension
This way, upas/vf won't flag .patch files as suspicious by default.

3 years ago[9front] upas/vf: exclude mime boundary from temporary attachment files
Michael Forney [Tue, 9 Feb 2021 04:59:01 +0000 (20:59 -0800)]
[9front] upas/vf: exclude mime boundary from temporary attachment files
validateattachment has no business with the mime boundary; it is not
part of the attachment itself.

Also, it causes the boundary to be dropped in the message output from
upas/vf, effectively dropping the following attachment (though the
content is still present after the last boundary of the wrapped first
attachment part).

Consider the following sequence of events:
1. upas/vf is run on a message containing two attachments.
2. The first attachment does not have a known extension, so is saved
   to a temporary file *including* the following mime boundary.
3. This file is opened as p->tmpbuf, which is used for subsequent
   reads until switching back to stdin.
4. The attachment fails validateattachment, so upas/vf wraps it in a
   multipart with a warning message.
5. problemchild() calls passbody(p, 0), which copies from p->tmpbuf
   until it hits the outer boundary line, which it excludes, seeks
   back one line, then returns the outer multipart.
6. problemchild() then writes its own boundary, and then copies one
   line from *stdin* to stdout, expecting the outer boundary.
   However, this boundary was already read from stdin in 2, so it ends
   up reading the first line of the subsequent part instead.

To fix this, pass 0 to passbody() in save() to exclude it from the
attachment file and make it available in stdin when expected.

3 years agoape/lib9: sync arm getfcr.s implementation
Ori Bernstein [Tue, 9 Feb 2021 00:07:09 +0000 (16:07 -0800)]
ape/lib9: sync arm getfcr.s implementation

The arm assembler supports movw to handle
getfcr and setfcr now, no need to hack it
with macros; sync from plan9 libc.

3 years agoape: sync flaot.h macros with u.h
Ori Bernstein [Mon, 8 Feb 2021 23:45:11 +0000 (15:45 -0800)]
ape: sync flaot.h macros with u.h

The float.h macros got out of sync with u.h,
some of them missing and some of them being
incorrect. This change brings them back in
line.

3 years agoMail: correct rendering of nested multipart messages
Ori Bernstein [Mon, 8 Feb 2021 04:30:04 +0000 (20:30 -0800)]
Mail: correct rendering of nested multipart messages

Reading nested subparts of messages into the root
message array allows deeply nested multipart trees
of messages to show correctly in the message view.

3 years ago[9front] upas/vf: remove debugging print statements
Michael Forney [Mon, 8 Feb 2021 04:17:06 +0000 (20:17 -0800)]
[9front] upas/vf: remove debugging print statements
These messages aren't useful and were presumably left over from
someone debugging this code.

3 years agogames/gb: fix reversed audio channels
Michael Forney [Mon, 8 Feb 2021 03:58:49 +0000 (04:58 +0100)]
games/gb: fix reversed audio channels
The high bits correspond to the left channel, and the low bits to the
right channel.

Reference: https://gbdev.io/pandocs/#sound-control-registers

Tested with pokemon crystal.

3 years agogames/gb: various HDMA fixes
Michael Forney [Mon, 8 Feb 2021 03:58:41 +0000 (04:58 +0100)]
games/gb: various HDMA fixes
H-blank DMA should only transfer 16 bytes per h-blank, rather than
waiting for the first h-blank and then transferring the whole size.

HDMAC should read 0xff when the transfer is finished, and 0 in the
high bit when the transfer is ongoing. Also, if 0 is written in the
high bit, the current transfer should be aborted.

Introduce two flags, DMAREADY and DMAHBLANK rather than special
constants 1 and -1. If dma is non-zero, there is an ongoing DMA. If
DMAREADY is set, the next chunk is ready to transfer.

Reference: https://gbdev.io/pandocs/#ff55-hdma5-cgb-mode-only-new-dma-length-mode-start

Tested with pokemon crystal.

What was happening is that when the game was loading N background tiles
into vram (each 16 bytes, so one per h-blank), it did something like
this:
- start an hdma transfer for N+1 tiles
- after the Nth tile is transferred, it would read HDMA5, clear the
high bit, then write it back to abort the transfer.

games/gb would instead transfer all N+1 tiles at once, overwriting one
extra tile with whatever was 1 past the end of the source array, and
then would interpret the cancel request as the start of a new transfer
of 16 bytes, which would copy an additional tile past the end. The end
result is that every transfer would end up copying N+2 tiles instead
of just N, overwriting certain tiles with whatever was after the end
of the source data.

3 years agogames/gb: fix timer divider for input clock 0
Michael Forney [Mon, 8 Feb 2021 03:58:02 +0000 (04:58 +0100)]
games/gb: fix timer divider for input clock 0
According to [0], input clock 0 should divide by 1024=2¹⁰, not 2¹².
This caused audio to run at quarter-speed in one game I tried.

[0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w

Tested with zelda: oracle of seasons, and dr. mario
---

3 years ago[9front] upas/vf: install %τ format specifier
Michael Forney [Sun, 7 Feb 2021 16:02:36 +0000 (08:02 -0800)]
[9front] upas/vf: install %τ format specifier
upas/vf was converted to use tmdate, but the formatter was never
installed.  This caused it to send attachments to validateattachment
with header `From virusfilter %τ%`, which always failed since upas/fs
would just skip over the message.

3 years agomerge
cinap_lenrek [Sat, 6 Feb 2021 12:50:06 +0000 (13:50 +0100)]
merge

3 years agobcm64: get inbound and outbound pci window base address from device tree
cinap_lenrek [Sat, 6 Feb 2021 12:47:45 +0000 (13:47 +0100)]
bcm64: get inbound and outbound pci window base address from device tree

On the pi400, the xhci reset firmware mailbox request
assumes that the pci windows match the ones specified
in the device tree. The inbound window (pcidmawin)
also varies now depending on the amount of memory
installed.

It is all pretty ridiculous, as the firmware could as
well just read the pci controllers hardware register
to determine the window configuration and the os could
keep a nice simple 1:1 mapping (with pci dma addresses
== physical addresses).

3 years agopc: increase number of Conf.mem[] entries from 4 to 16
cinap_lenrek [Sat, 6 Feb 2021 12:33:58 +0000 (13:33 +0100)]
pc: increase number of Conf.mem[] entries from 4 to 16

3 years agopc, pc64: warn when running out of conf.mem[] entries in meminit()
cinap_lenrek [Sat, 6 Feb 2021 12:33:27 +0000 (13:33 +0100)]
pc, pc64: warn when running out of conf.mem[] entries in meminit()

3 years agotest: fix expression parser
Alex Musolino [Sat, 6 Feb 2021 05:21:09 +0000 (15:51 +1030)]
test: fix expression parser

The old parser code was rubbish and only worked for trivial
expressions.  The new code properly handles complex expressions,
including short circuit evaluation.

As such, the BUGS section has been removed from the test(1) man page.
The description of an unimplemented feature has also been removed.

3 years agolibdraw: enter/eenter: fix ^W removing the text on the right side of the tick
Sigrid [Thu, 4 Feb 2021 09:57:37 +0000 (10:57 +0100)]
libdraw: enter/eenter: fix ^W removing the text on the right side of the tick

3 years agolibdraw: enter/eenter: fix Kleft for non-ascii text
Sigrid [Thu, 4 Feb 2021 09:45:52 +0000 (10:45 +0100)]
libdraw: enter/eenter: fix Kleft for non-ascii text

3 years ago[9front] [PATCH] audiohda: add PCI ID for Intel C610/X99
Michael Forney [Thu, 4 Feb 2021 00:19:57 +0000 (16:19 -0800)]
[9front] [PATCH] audiohda: add PCI ID for Intel C610/X99
---
Tested and seems to work fine.

3 years agoacmemail(1): Nail => Mail
Ori Bernstein [Wed, 3 Feb 2021 19:09:43 +0000 (11:09 -0800)]
acmemail(1): Nail => Mail

Forgot to change the program name when importing
the rewrite.

3 years agomklib, upas/common: clean up libcommon properly (thanks mikan)
Ori Bernstein [Wed, 3 Feb 2021 16:10:11 +0000 (08:10 -0800)]
mklib, upas/common: clean up libcommon properly (thanks mikan)

Despite pervious efforts, mk clean still doesn't remove libcommon.a*
files from cmd/upas/common/. To fix this, let's tell cmd/mklib to do
the job instead.

3 years agoacme: fix use after free in warning() call (thanks igor)
cinap_lenrek [Wed, 3 Feb 2021 00:19:19 +0000 (01:19 +0100)]
acme: fix use after free in warning() call (thanks igor)

3 years agomerge
Ori Bernstein [Tue, 2 Feb 2021 15:21:47 +0000 (07:21 -0800)]
merge

3 years agorunq: clean up code, fix error handling.
Ori Bernstein [Tue, 2 Feb 2021 14:52:00 +0000 (06:52 -0800)]
runq: clean up code, fix error handling.

Runq spawns a number of processes, and wait()s for them
in 2 different places. Because of the way that the exit
handling is done, the wait can get the wrong message.

It turns out that only one place in the code needs to
wait for the child, and in all other cases, it's just
muddling the problem.

This change adds the RFNOWAIT call to all the processes
we don't need to wait for, so that the places that do
need wait will always get the correct child.

3 years agofortunes: SATAN
Sigrid [Tue, 2 Feb 2021 11:51:22 +0000 (12:51 +0100)]
fortunes: SATAN

3 years agowinwatch: always reflow when possible (thanks telephil9)
Sigrid [Tue, 2 Feb 2021 10:56:45 +0000 (11:56 +0100)]
winwatch: always reflow when possible (thanks telephil9)

3 years agoMail: only clear upas-maintained flags on change (thanks deuteron)
Ori Bernstein [Tue, 2 Feb 2021 04:38:40 +0000 (20:38 -0800)]
Mail: only clear upas-maintained flags on change (thanks deuteron)

When message flags change, Mail would clear all the flags and
recompute them. This would clobber internal flags like Ftodel.
So, don't do that.

3 years agomothra: don't insert newline after div (thanks phil9)
Ori Bernstein [Sun, 31 Jan 2021 20:25:03 +0000 (12:25 -0800)]
mothra: don't insert newline after div (thanks phil9)

3 years agoape/libm: implement log2 in libc
Ori Bernstein [Sat, 30 Jan 2021 17:19:57 +0000 (09:19 -0800)]
ape/libm: implement log2 in libc

3 years agoMail: fix inverted reply-all condition
Ori Bernstein [Sat, 30 Jan 2021 02:29:01 +0000 (18:29 -0800)]
Mail: fix inverted reply-all condition

3 years agoMail: rewrite.
Ori Bernstein [Sat, 30 Jan 2021 01:34:47 +0000 (17:34 -0800)]
Mail: rewrite.

Acme mail made it hard to do threading, so I wrote a new one.

3 years agoscreenlock: use initdisplay(2), top the window (thanks stuart morrow)
Ori Bernstein [Fri, 29 Jan 2021 02:07:48 +0000 (18:07 -0800)]
screenlock: use initdisplay(2), top the window (thanks stuart morrow)

Screenlock should use libdraw(2) to init the display
and create the window, instead of looking at the screen
file directly. Also, to prevent new windows from popping
up over screenlock, bring it to the top periodically.

3 years agonews: make -a and -n get along (thanks lyndon)
Ori Bernstein [Wed, 27 Jan 2021 02:07:04 +0000 (18:07 -0800)]
news: make -a and -n get along (thanks lyndon)

currently, -a and -n are mutually exclusive.
this change allows them to be used together.

3 years agocc: mk clean should delete cc.a$O
Ori Bernstein [Sun, 24 Jan 2021 17:58:39 +0000 (09:58 -0800)]
cc: mk clean should delete cc.a$O

It's surprising when 'mk clean' doesn't actually
do a clean build in cc -- fix this.

3 years ago5l: fix shifts by zero
Ori Bernstein [Sun, 24 Jan 2021 04:36:09 +0000 (20:36 -0800)]
5l: fix shifts by zero

on arm32, we can do one of 4 shifts
by a constant:

reg<<(0..31)
reg>>(1..32)
((u32int)reg)>>(1..32)
reg ROT (0..31)

There's no way to encode a 0 bit right
shift,  so when encoding reg>>0, flip
it to the equivalent nop reg<<0, which
can be encoded.

3 years agoape/libm: add back fmod, remove modf
Ori Bernstein [Sun, 24 Jan 2021 04:03:07 +0000 (20:03 -0800)]
ape/libm: add back fmod, remove modf

We removed the wrong file. Put it back.

3 years ago[9front] ape: remove _SUSV2_SOURCE guard from inttypes.h
Michael Forney [Sun, 24 Jan 2021 03:47:12 +0000 (19:47 -0800)]
[9front] ape: remove _SUSV2_SOURCE guard from inttypes.h
inttypes.h was added to C99, and this is the only header that used
_SUSV2_SOURCE.

Also, remove now unneeded _SUSV2_SOURCE from python mkfile.

3 years ago[9front] nusb(4): fix typo
Michael Forney [Sun, 24 Jan 2021 03:46:57 +0000 (19:46 -0800)]
[9front] nusb(4): fix typo

3 years ago[9front] cc: fix comparison warning with constant LHS
Michael Forney [Sun, 24 Jan 2021 02:28:08 +0000 (18:28 -0800)]
[9front] cc: fix comparison warning with constant LHS
This prevents an incorrect warning for a comparison such as `0 < x`,
where x is an unsigned type.  Previously, this would get normalized as
`x >= 0` rather than `x > 0` when checking the comparison.

3 years ago[9front] cc: remove unnecessary 128-bit add function
Michael Forney [Sun, 24 Jan 2021 02:26:34 +0000 (18:26 -0800)]
[9front] cc: remove unnecessary 128-bit add function
Instead, just change the comparisons from <=/>= to </>.

3 years agoupas/fs: fix swapped argument, dead code
Ori Bernstein [Sun, 24 Jan 2021 02:02:46 +0000 (18:02 -0800)]
upas/fs: fix swapped argument, dead code

With ntlm auth, we were trying to set 0 bytes of
the auth struct to its size. The args were clearly
swapped. Fix it.

While we're here, remove some dead code.

3 years agoupas/runq: fix typo
Ori Bernstein [Sun, 24 Jan 2021 00:38:32 +0000 (16:38 -0800)]
upas/runq: fix typo

one slipped in to the last commit.

3 years agoupas/runq: bring back -a
Ori Bernstein [Sun, 24 Jan 2021 00:05:21 +0000 (16:05 -0800)]
upas/runq: bring back -a

Turns out -a is useful in crontab, so bring
back a simplified version of it. This only
iterates through directories one at a time.

3 years agoape: update mkfile for removed fmod.c
qwx [Sat, 23 Jan 2021 23:58:47 +0000 (00:58 +0100)]
ape: update mkfile for removed fmod.c

3 years agovnc: I don't like your face.
Ori Bernstein [Sat, 23 Jan 2021 21:20:09 +0000 (13:20 -0800)]
vnc: I don't like your face.

Cosmetic improvements to vnc auth code.
Should not have user-visible changes.

3 years agoupas/runq: support parallel queue processing, drop -a
Ori Bernstein [Sat, 23 Jan 2021 19:03:05 +0000 (11:03 -0800)]
upas/runq: support parallel queue processing, drop -a

When running a mail queue, it's useful to run it with limited
parallelism. This helps mailing lists process messages in a
reasonable time.

At the same time, we can remove the load balancing from runq,
since the kinds of systems that this matters on no longer
exist, and running multiple queues at once can be better
done through xargs.

3 years agovt(1): document optional command argument (thanks sl)
cinap_lenrek [Sat, 23 Jan 2021 17:42:46 +0000 (18:42 +0100)]
vt(1): document optional command argument (thanks sl)

3 years agoape: apply infinite recursion in fmod() fix (thanks jxy and ality)
cinap_lenrek [Sat, 23 Jan 2021 14:53:56 +0000 (15:53 +0100)]
ape: apply infinite recursion in fmod() fix (thanks jxy and ality)

Apply changeset 2880:cab2b9d13a73 to ape's fmod() implementation.

Remove the unused math/fmod.c copy.

3 years agosyscall: don't rely on . being in $path (thanks Silas)
cinap_lenrek [Sat, 23 Jan 2021 14:06:30 +0000 (15:06 +0100)]
syscall: don't rely on . being in $path (thanks Silas)

3 years agonusb/kb: correct Mod4 scancode (125 → 91, to match what kbdfs has)
Sigrid [Fri, 22 Jan 2021 16:48:41 +0000 (17:48 +0100)]
nusb/kb: correct Mod4 scancode (125 → 91, to match what kbdfs has)

3 years agoaux/acpi: do not expose empty files
Sigrid [Fri, 22 Jan 2021 09:57:43 +0000 (10:57 +0100)]
aux/acpi: do not expose empty files

3 years agostats: don't query battery and temp as often when using acpi
Sigrid [Fri, 22 Jan 2021 09:15:36 +0000 (10:15 +0100)]
stats: don't query battery and temp as often when using acpi

Querying battery (or temperature) using ACPI takes quite some
resources, which makes the battery discharge faster.  It doesn't make
much sense to have it queried as often either.  So, when using ACPI:

1) set battery query period to 10s minimum
2) set temperature query period to 5s minimum

3 years agoape/libap: fix _startbuf, check rfork return (thanks pixelherodev)
Ori Bernstein [Wed, 20 Jan 2021 03:56:38 +0000 (19:56 -0800)]
ape/libap: fix _startbuf, check rfork return (thanks pixelherodev)

When _startbuf is invoked, it would crash on the second invocation
if creating a mux segment failed. This is because the first attempt
would assign the return value -1 to the global mux variable, and
the second attempt would notice that the global mux was not nil,
and would attempt to use it.

This change only assigns to the global variable if the allocation
of the segment was a success.

While we're here, we should also check the return of the rfork call.

3 years agowebcookies: remove straggling custom date parser
Ori Bernstein [Wed, 20 Jan 2021 02:14:53 +0000 (18:14 -0800)]
webcookies: remove straggling custom date parser

One place missed in the tmdate purge.

3 years agoupas/ml: touch the artwork
Ori Bernstein [Wed, 20 Jan 2021 02:12:30 +0000 (18:12 -0800)]
upas/ml: touch the artwork

Global variables deserve more greppable names,
since I'm likely to know where they're used.

3 years agodd(1): update manpage to match program
Ori Bernstein [Tue, 19 Jan 2021 23:18:57 +0000 (15:18 -0800)]
dd(1): update manpage to match program

Document the dd changes

3 years agodd: error with invalid size suffixes, add 'm'
Ori Bernstein [Tue, 19 Jan 2021 23:15:12 +0000 (15:15 -0800)]
dd: error with invalid size suffixes, add 'm'

When invoking with dd with an invalid size suffix, we
silently accept the suffix. This can lead to confusion,
because lines like:

dd -bs 1K
dd -bs 1m

will silently copy in 1-byte increments. This has caught
people by surprise. While we're at it, megabytes are
convenient, so let's have them too.

3 years agomothra: linkify text starting with gemini:// and ftp://
Sigrid [Tue, 19 Jan 2021 14:04:40 +0000 (15:04 +0100)]
mothra: linkify text starting with gemini:// and ftp://

3 years agomothra: resolve urls on middle click. helps with snarfing of relative urls
Sigrid [Tue, 19 Jan 2021 13:14:28 +0000 (14:14 +0100)]
mothra: resolve urls on middle click. helps with snarfing of relative urls

3 years agoacme(1): add references to appropriate manpages
Ori Bernstein [Tue, 19 Jan 2021 01:55:01 +0000 (17:55 -0800)]
acme(1): add references to appropriate manpages

3 years agopasswd: make legacy mode explicit
Ori Bernstein [Mon, 18 Jan 2021 02:01:53 +0000 (18:01 -0800)]
passwd: make legacy mode explicit

Passwd used to produce a very confusing error
about DES not being enabled whenever the password
was mistyped. This happened because we attempted
to guess what authentication method to use, and
preseneted the error from the wrong one on failure.

This puts the legacy mode behind a flag, so that
we don't even try the old method unless it's
explicitly requested.

3 years agoaudiohda: Add AMD Starship/Matisse HD Audio Controller (thanks uramekus)
cinap_lenrek [Sun, 17 Jan 2021 23:51:20 +0000 (00:51 +0100)]
audiohda: Add  AMD Starship/Matisse HD Audio Controller (thanks uramekus)

3 years agoplan9.ini(8): document *nohpet= option
cinap_lenrek [Sun, 17 Jan 2021 20:28:45 +0000 (21:28 +0100)]
plan9.ini(8): document *nohpet= option

3 years agomerge
cinap_lenrek [Sun, 17 Jan 2021 20:22:23 +0000 (21:22 +0100)]
merge

3 years agopc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies
cinap_lenrek [Sun, 17 Jan 2021 20:21:12 +0000 (21:21 +0100)]
pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequencies

This adds the new function pointer PCArch.clockinit(),
which is a timer dependent initialization routine.
It also takes over the job of guesscpuhz(). This way, the
architecture ident code can switch between different
timers (i8253, HPET and XEN timer).

3 years agoseconds: remove junk from usage
Ori Bernstein [Sun, 17 Jan 2021 19:12:18 +0000 (11:12 -0800)]
seconds: remove junk from usage

3 years agodpost prologue: update /radicalex to fix square displacement (thanks umbraticus and...
Sigrid [Sun, 17 Jan 2021 13:02:17 +0000 (14:02 +0100)]
dpost prologue: update /radicalex to fix square displacement (thanks umbraticus and Ethan)

3 years agousbehci: use 64-bit base address, remove resetlck, simplify scanpci()
cinap_lenrek [Sun, 17 Jan 2021 10:55:39 +0000 (11:55 +0100)]
usbehci: use 64-bit base address, remove resetlck, simplify scanpci()

3 years agousbuhci: remove resetlk, simplify scanpci()
cinap_lenrek [Sun, 17 Jan 2021 10:53:50 +0000 (11:53 +0100)]
usbuhci: remove resetlk, simplify scanpci()

3 years agousbohci: use 64-bit io base address, disable interrupts before reset, remove resetlck
cinap_lenrek [Sun, 17 Jan 2021 10:51:59 +0000 (11:51 +0100)]
usbohci: use 64-bit io base address, disable interrupts before reset, remove resetlck

3 years agozerotrunc(8): add manpage
Ori Bernstein [Sun, 17 Jan 2021 00:17:27 +0000 (16:17 -0800)]
zerotrunc(8): add manpage

3 years agotroff2png(1): add manpage
Ori Bernstein [Sun, 17 Jan 2021 00:17:10 +0000 (16:17 -0800)]
troff2png(1): add manpage

3 years agotmdate(2): correct example in manpage
Ori Bernstein [Sat, 16 Jan 2021 22:24:32 +0000 (14:24 -0800)]
tmdate(2): correct example in manpage

add missing tmdate() call around %τ format.

3 years agotweak: support showdata plumb action (thanks sirjofri)
Sigrid [Sat, 16 Jan 2021 17:30:50 +0000 (18:30 +0100)]
tweak: support showdata plumb action (thanks sirjofri)

3 years ago9fs: bell labs is very dead
Sigrid [Fri, 15 Jan 2021 18:32:02 +0000 (19:32 +0100)]
9fs: bell labs is very dead

3 years agocal: use Sa/Su in all cases, also simplify the code
Sigrid [Tue, 12 Jan 2021 20:08:12 +0000 (21:08 +0100)]
cal: use Sa/Su in all cases, also simplify the code

3 years agocal: fix -s 7
Sigrid [Tue, 12 Jan 2021 12:32:38 +0000 (13:32 +0100)]
cal: fix -s 7

3 years agocal: add -s option to specify the starting day of the week
Sigrid [Tue, 12 Jan 2021 12:23:37 +0000 (13:23 +0100)]
cal: add -s option to specify the starting day of the week

3 years agoaudio/flacenc: missed an argument in fprintf()
Sigrid [Tue, 12 Jan 2021 10:15:18 +0000 (11:15 +0100)]
audio/flacenc: missed an argument in fprintf()