]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
4 years agopc, pc64: fix cputemp decimal handling in amd10temprd (thanks Robert Ransom)
Alex Musolino [Thu, 19 Dec 2019 04:49:02 +0000 (15:19 +1030)]
pc, pc64: fix cputemp decimal handling in amd10temprd (thanks Robert Ransom)

4 years agoflate(2): fix typos (thanks rgl)
Alex Musolino [Tue, 17 Dec 2019 22:31:38 +0000 (09:01 +1030)]
flate(2): fix typos (thanks rgl)

4 years agoip(3): document special null-address hack for accepting all incoming connections
cinap_lenrek [Sun, 15 Dec 2019 12:59:08 +0000 (13:59 +0100)]
ip(3): document special null-address hack for accepting all incoming connections

4 years agodate: make ISO 8601 time output compatible to RFC3339
cinap_lenrek [Sat, 14 Dec 2019 16:09:14 +0000 (17:09 +0100)]
date: make ISO 8601 time output compatible to RFC3339

RFC3339 is a stricter subset of ISO 8601, in particular
the timezone offset needs to be specified as +HH:MM while
in ISO 8601 the colon is optional.

4 years agonormalize error messages in yacc, stop writing to closed fd.
Ori Bernstein [Thu, 12 Dec 2019 07:26:15 +0000 (23:26 -0800)]
normalize error messages in yacc, stop writing to closed fd.

4 years agomerge
cinap_lenrek [Wed, 11 Dec 2019 22:53:10 +0000 (23:53 +0100)]
merge

4 years agodevcons: fix write length of writebintime() (thanks BurnZeZ)
cinap_lenrek [Wed, 11 Dec 2019 22:52:05 +0000 (23:52 +0100)]
devcons: fix write length of writebintime() (thanks BurnZeZ)

4 years agoremove unused code.
Ori Bernstein [Wed, 11 Dec 2019 07:13:25 +0000 (23:13 -0800)]
remove unused code.

4 years agoonly ensurecache() on doplumb().
Ori Bernstein [Wed, 11 Dec 2019 07:01:06 +0000 (23:01 -0800)]
only ensurecache() on doplumb().

4 years agomerge
Ori Bernstein [Wed, 11 Dec 2019 02:21:05 +0000 (18:21 -0800)]
merge

4 years agocrop(1): remove duplicate -b option in synopsis
Alex Musolino [Tue, 10 Dec 2019 04:43:44 +0000 (15:13 +1030)]
crop(1): remove duplicate -b option in synopsis

4 years agoupas/fs plumb flag changes.
Ori Bernstein [Mon, 9 Dec 2019 20:46:27 +0000 (12:46 -0800)]
upas/fs plumb flag changes.

This patch makes 3 changes:

- It makes upas/fs send plumb messages when a message
  changes in the background (eg, someone on another imap
  connection opens a message and sets the read flag)
- It makes faces not complain when it gets one of these
  new modify messages.
- It makes acme/Mail update the flags in the display
  when it gets one of these messages.

4 years agoriostart: when system uses serial console, provide a system shell on it
cinap_lenrek [Mon, 9 Dec 2019 17:08:02 +0000 (18:08 +0100)]
riostart: when system uses serial console, provide a system shell on it

on systems with serial console and graphics such as the raspberry pi,
it is nice to get a system shell on the serial console even when no
monitor is connected.

4 years agoconsole(8): add console command and manpage
cinap_lenrek [Mon, 9 Dec 2019 16:44:28 +0000 (17:44 +0100)]
console(8): add console command and manpage

the console command runs a command or the system shell under
a new instance of kbdfs, optionally providing a serial console
when $console environment variable is set.

4 years agomerge
cinap_lenrek [Mon, 9 Dec 2019 01:03:10 +0000 (02:03 +0100)]
merge

4 years agohgfs: fix loadrevinfo() breakage on long lines using libbio (thanks deuterion)
cinap_lenrek [Mon, 9 Dec 2019 01:01:12 +0000 (02:01 +0100)]
hgfs: fix loadrevinfo() breakage on long lines using libbio (thanks deuterion)

4 years agohack around timezone issues.
Ori Bernstein [Sun, 8 Dec 2019 19:58:52 +0000 (11:58 -0800)]
hack around timezone issues.

4 years agomerge
Ori Bernstein [Sun, 8 Dec 2019 19:58:19 +0000 (11:58 -0800)]
merge

4 years agofix filetype detecton by suffix so that multiple dots dont confuse it. (thanks kvik)
Ori Bernstein [Sun, 8 Dec 2019 19:54:59 +0000 (11:54 -0800)]
fix filetype detecton by suffix so that multiple dots dont confuse it. (thanks kvik)

4 years agopc: replace duplicated and broken mmu flush code in vunmap()
cinap_lenrek [Sat, 7 Dec 2019 01:19:14 +0000 (02:19 +0100)]
pc: replace duplicated and broken mmu flush code in vunmap()

comparing m with MACHP() is wrong as m is a constant on 386.

add procflushothers(), which flushes all processes except up
using common procflushmmu() routine.

4 years agokernel: avoid useless mmu flushes, implement better wait condition for procflushmmu()
cinap_lenrek [Sat, 7 Dec 2019 01:13:51 +0000 (02:13 +0100)]
kernel: avoid useless mmu flushes, implement better wait condition for procflushmmu()

procflushmmu() returns once all *OTHER* processors that had
matching processes running on them flushed ther tlb/mmu state.
the caller of procflush...() takes care of flushing "up" by
calling flushmmu() later.

if the current process matched, then that means m->flushmmu
would be set, and hzclock() would call flushmmu() again.

to avoid this, we now check up->newtlb in addition to m->flushmmu
in hzclock() before calling flushmmu().

we also maintain information on which process on what processor
to wait for locally, which helps making progress when multiple
procflushmmu()'s are running concurrently.

in addition, this makes the wait condition for procflushmmu()
more sophisticated, by validating if the processor still runs
the selected process and only if it matchatches, considers
the MACHP(nm)->flushmmu flag.

4 years agofix some acme memory leaks
Ori Bernstein [Fri, 6 Dec 2019 20:08:00 +0000 (12:08 -0800)]
fix some acme memory leaks

(imported from plan9port 7ca1c90109e17dced4b38fbaadea9d2cf39871b7,
some tag restoration lines not relevant.)

4 years agohoc: don't nest calls to follow() when lexing ++/+= and --/-= (#287)
Ori Bernstein [Fri, 6 Dec 2019 19:53:44 +0000 (11:53 -0800)]
hoc: don't nest calls to follow() when lexing ++/+= and --/-= (#287)

The code had a nested use of the follow() function that could cause +=+
and -=- to register as ++ and --.  The first follow() to execute could
consume a character and match and then the second follow() could consume
another character and match.  For example i-=-10 would result in a syntax
error and i-=- would decrement i.

(imported from plan9port commit f1dd3f065a97f57bf59db2e3284868e181734159)

4 years agowords: transgender
Sigrid [Fri, 6 Dec 2019 14:20:35 +0000 (15:20 +0100)]
words: transgender

4 years agodelete obsolete comments (replies are flagged elsewhere)
Ori Bernstein [Thu, 5 Dec 2019 08:16:15 +0000 (00:16 -0800)]
delete obsolete comments (replies are flagged elsewhere)

4 years agomerge
cinap_lenrek [Wed, 4 Dec 2019 21:04:12 +0000 (22:04 +0100)]
merge

4 years agobcm: use extended small pages so XN bit can work
cinap_lenrek [Wed, 4 Dec 2019 21:02:51 +0000 (22:02 +0100)]
bcm: use extended small pages so XN bit can work

the change to support no-execute bits broke the original
raspberry pi1, as it uses backwards compatible page table
format.

to use the XN bit, subpage AP bits have to be disabled
using the XP bit in CP15 Control Register c1 Bit 23.

4 years ago9/boot/net.rc: suppress error from grep if ethernet ifstats file is not found
cinap_lenrek [Wed, 4 Dec 2019 20:56:13 +0000 (21:56 +0100)]
9/boot/net.rc: suppress error from grep if ethernet ifstats file is not found

this can happen with nusb/ether, which does not implement ifstats file.

4 years agoacme: Apply each -/+ only once (#156)
Ori Bernstein [Wed, 4 Dec 2019 20:55:03 +0000 (12:55 -0800)]
acme: Apply each -/+ only once (#156)

When plumbing an address like `3-`, Acme selects line 1,
and similarly `3+` selects line 5.
The same problem can be observed for character addresses (`#123+`)
but _not_ for ones like `+`, `.+` or `/foo/+`:
The problem only occurs when a number is followed by a direction (`-`/`+`).

Following along with the example `3-` through `address` (in addr.c):
We read `3` into `c` and match the `case` on line 239.
The `while` loop on line 242ff reads additional digits into `c`
and puts the first non-digit back by decrementing the index `q`.
Then we find the range for line 3 on line 251 and continue.

On the next iteration, we set `prevc` to the last `c`,
but since that part read ahead _into `c`_,
`c` is currently the _next_ character we will read, `-`,
and now `prevc` is too.

Then in the case block (line 210) the condition on line 211 holds
and Acme believes that it has read two `-` in sequence
and modifies the range to account for the “first” `-`.
The “second” `-` gets applied after the loop is done, on line 292.

So the general problem is:
While reading numbers, Acme reads the next character after the number into `c`.
It decrements the counter to ensure it will read it again on the next iteration,
but it still uses it to update `prevc`.

This change solves the problem by reading digits into `nc` instead.
This variable is used to similar effect in the block for directions (line 212)
and fills the role of “local `c` that we can safely use to read ahead” nicely.

(imported from plan9front a82a8b6368274d77d42f526e379b74e79c137e26)

4 years agoacme: avoid division by zero when resizing col (#189)
Ori Bernstein [Wed, 4 Dec 2019 20:37:07 +0000 (12:37 -0800)]
acme: avoid division by zero when resizing col (#189)

To reproduce, create a column with at least two windows and resize
acme to have almost zero height.

(imported from plan9port commit 76b9347a5fa3a0970527c6ee1b97ef1c714f636b)

4 years agoacme, sam: handle >1GB files correctly
Ori Bernstein [Wed, 4 Dec 2019 19:46:42 +0000 (11:46 -0800)]
acme, sam: handle >1GB files correctly

imported from plan9port, edfe3c016fe6ef10c55f7a17aab668214ec21efc

4 years agomerge
cinap_lenrek [Tue, 3 Dec 2019 19:57:01 +0000 (20:57 +0100)]
merge

4 years agocmd(3): fix typo, Close -> Closed (thanks kivik)
cinap_lenrek [Tue, 3 Dec 2019 19:55:57 +0000 (20:55 +0100)]
cmd(3): fix typo, Close -> Closed (thanks kivik)

4 years agorio(4): fix bad cross-reference format
Alex Musolino [Tue, 3 Dec 2019 08:02:30 +0000 (18:32 +1030)]
rio(4): fix bad cross-reference format

4 years agoseconds(1): add SOURCE section
Alex Musolino [Tue, 3 Dec 2019 07:55:24 +0000 (18:25 +1030)]
seconds(1): add SOURCE section

4 years agoalways zero initialize Tm structure for tm2sec()
cinap_lenrek [Tue, 3 Dec 2019 07:22:02 +0000 (08:22 +0100)]
always zero initialize Tm structure for tm2sec()

4 years agoRemove reply print.
Ori Bernstein [Mon, 2 Dec 2019 22:50:53 +0000 (14:50 -0800)]
Remove reply print.

4 years agomerge
cinap_lenrek [Mon, 2 Dec 2019 22:33:29 +0000 (23:33 +0100)]
merge

4 years agopc, pc64: clear debug watchpoint registers on exec and exit
cinap_lenrek [Mon, 2 Dec 2019 22:32:24 +0000 (23:32 +0100)]
pc, pc64: clear debug watchpoint registers on exec and exit

when a process does an exec syscall, procsetup() is called and
we have to disable the debug watchpoint registers. just clearing
p->dr is not enougth as we are not going thru a procsave() and
procrestore() cycle which would disable and reload the saved
debug registers.

instead of clearing debug registers in procfork(), we should
clear the saved debug registers before a process goes to die
(pexit() calls sched() with up->state = Moribund) as the Proc
structure can get reused for kernel processes (kproc) which
never call procfork() and would therefore have debug registers
loaded.

4 years agoremove debug print
Ori Bernstein [Mon, 2 Dec 2019 21:56:15 +0000 (13:56 -0800)]
remove debug print

4 years agosimplify flag parsing.
Ori Bernstein [Mon, 2 Dec 2019 21:53:57 +0000 (13:53 -0800)]
simplify flag parsing.

we've only got a few flags, a linear search is good enough,
and is obviously correct; the old search wasn't.

4 years agoos(1): fix a typo
Sigrid [Mon, 2 Dec 2019 15:55:53 +0000 (17:55 +0200)]
os(1): fix a typo

4 years agomerge
cinap_lenrek [Mon, 2 Dec 2019 07:27:49 +0000 (08:27 +0100)]
merge

4 years agovgai81x: remove unused mach0 variable
cinap_lenrek [Mon, 2 Dec 2019 07:26:34 +0000 (08:26 +0100)]
vgai81x: remove unused mach0 variable

4 years agopc: fix ldt memory leak in procsetup()
cinap_lenrek [Mon, 2 Dec 2019 06:43:45 +0000 (07:43 +0100)]
pc: fix ldt memory leak in procsetup()

4 years agokernel: add missing FPillegal definition for kw and omap kernels
cinap_lenrek [Mon, 2 Dec 2019 06:35:25 +0000 (07:35 +0100)]
kernel: add missing FPillegal definition for kw and omap kernels

4 years agofix typo: we don't have cache insurance.
Ori Bernstein [Mon, 2 Dec 2019 01:24:02 +0000 (17:24 -0800)]
fix typo: we don't have cache insurance.

4 years agoshow and update flags in acme mail
Ori Bernstein [Mon, 2 Dec 2019 01:14:13 +0000 (17:14 -0800)]
show and update flags in acme mail

now, it's possible to tell whether you've read or replied
to a message.

4 years agoupas/fs imap fixes and improvements
Ori Bernstein [Mon, 2 Dec 2019 01:12:19 +0000 (17:12 -0800)]
upas/fs imap fixes and improvements

do incremental imap fetches after startup, fixes validity handling,
record flags correctly when we aren't in the process of directly
updating a message, fixes off by one in flag parsing, fixes
mis-indexing messages in sync when we get an unsolicited fetch
response.

4 years agokernel: improve diagnostics by reversing the roles of Proc.parentpid and Proc.parent
cinap_lenrek [Sun, 1 Dec 2019 16:57:14 +0000 (17:57 +0100)]
kernel: improve diagnostics by reversing the roles of Proc.parentpid and Proc.parent

for better system diagnostics, we *ALWAYS* want to record the parent
pid of a user process, regardless of if the child will post a wait
record on exit or not.

for that, we reverse the roles of Proc.parent and Proc.parentpid so
Proc.parentpid will always be set on rfork() and the Proc.parent
pointer will point to the parent's Proc structure or is set to nil
when no wait record should be posted on exit (RFNOWAIT flag).

this means that we can get the pid of the original parent process
from /proc, regardless of the the child having rforked with the
RFNOWAIT flag. this improves the output of pstree(1) somewhat if
the parent is still alive. note that theres no guarantee that the
parent pid is still valid.

the conditions are unchanged:

a user process that will post wait record has:

up->kp == 0 && up->parent != nil && up->parent->pid == up->parentpid

the boot process is:

up->kp == 0 && up->parent == nil && up->parentpid == 0

and kproc's have:

up->kp != 0 && up->parent == nil && up->parentpid == 0

4 years agopc, pc64: merge adjacent e820 map entries of same type
cinap_lenrek [Sun, 1 Dec 2019 13:06:30 +0000 (14:06 +0100)]
pc, pc64: merge adjacent e820 map entries of same type

some machines give us over 300 e820 ram entries that are
all adjacent to each other causing us to run out of Map
end Emap entries.

this change adds e820clean() function, which sorts the
current e820 map and discards unusable entries and merges
adjacent entries. e820clean() is called after we parsed
the *e820= boot parameter or when we run out of entries.

an example of such a broken e820 map (thanks mischief):

*e820=1 0000000000000000 0000000000008000 1 0000000000008000 000000000000c000 1 000000000000c000 000000000003f000 1 000000000003f000 0000000000040000 1 0000000000040000 00000000000a0000 1 0000000000100000 0000000001000000 1 0000000001000000 0000000001020000 1 0000000001020000 0000000009d82000 2 0000000009d82000 000000000a000000 1 000000000a000000 000000000a200000 4 000000000a200000 000000000a20b000 1 000000000a20b000 000000000b000000 2 000000000b000000 000000000b020000 1 000000000b020000 0000000010000000 1 0000000010000000 000000001000b000 1 000000001000b000 00000000d9634000 1 00000000d9634000 00000000d96be000 1 00000000d96be000 00000000d96cc000 1 00000000d96cc000 00000000d96db000 1 00000000d96db000 00000000d97df000 1 00000000d97df000 00000000d97ed000 1 00000000d97ed000 00000000d9837000 1 00000000d9837000 00000000d9844000 1 00000000d9844000 00000000d985e000 1 00000000d985e000 00000000d9865000 1 00000000d9865000 00000000d9897000 1 00000000d9897000 00000000d98d7000 1 00000000d98d7000 00000000d98db000 1 00000000d98db000 00000000d98dd000 1 00000000d98dd000 00000000d999d000 1 00000000d999d000 00000000d9a8e000 1 00000000d9a8e000 00000000d9add000 1 00000000d9add000 00000000d9ae2000 1 00000000d9ae2000 00000000d9af3000 1 00000000d9af3000 00000000d9af4000 1 00000000d9af4000 00000000d9af6000 1 00000000d9af6000 00000000d9af7000 1 00000000d9af7000 00000000d9af8000 1 00000000d9af8000 00000000d9af9000 1 00000000d9af9000 00000000d9b5e000 1 00000000d9b5e000 00000000d9b60000 1 00000000d9b60000 00000000d9b8c000 1 00000000d9b8c000 00000000d9b8d000 1 00000000d9b8d000 00000000d9c85000 1 00000000d9c85000 00000000d9c8a000 1 00000000d9c8a000 00000000d9caf000 1 00000000d9caf000 00000000d9cb5000 1 00000000d9cb5000 00000000d9cc1000 1 00000000d9cc1000 00000000d9cc2000 1 00000000d9cc2000 00000000da986000 1 00000000da986000 00000000daeb6000 1 00000000daeb6000 00000000daed7000 1 00000000daed7000 00000000daed8000 1 00000000daed8000 00000000daf61000 1 00000000daf61000 00000000daf7c000 1 00000000daf7c000 00000000db3e6000 1 00000000db3e6000 00000000db4ea000 1 00000000db4ea000 00000000db57d000 1 00000000db57d000 00000000db587000 1 00000000db587000 00000000db58a000 1 00000000db58a000 00000000db58b000 1 00000000db58b000 00000000db591000 1 00000000db591000 00000000db5a7000 1 00000000db5a7000 00000000db5b2000 1 00000000db5b2000 00000000db5ba000 1 00000000db5ba000 00000000db5bb000 1 00000000db5bb000 00000000db5c6000 1 00000000db5c6000 00000000db5c7000 1 00000000db5c7000 00000000db5c8000 1 00000000db5c8000 00000000db5c9000 1 00000000db5c9000 00000000db5cb000 1 00000000db5cb000 00000000db5d0000 1 00000000db5d0000 00000000db5e8000 1 00000000db5e8000 00000000db5ea000 1 00000000db5ea000 00000000db5eb000 1 00000000db5eb000 00000000db5ee000 1 00000000db5ee000 00000000db601000 1 00000000db601000 00000000db602000 1 00000000db602000 00000000db60e000 1 00000000db60e000 00000000db610000 1 00000000db610000 00000000db612000 1 00000000db612000 00000000db614000 1 00000000db614000 00000000db61d000 1 00000000db61d000 00000000db645000 1 00000000db645000 00000000db64c000 1 00000000db64c000 00000000db650000 1 00000000db650000 00000000db651000 1 00000000db651000 00000000db653000 1 00000000db653000 00000000db658000 1 00000000db658000 00000000db659000 1 00000000db659000 00000000db661000 1 00000000db661000 00000000db662000 1 00000000db662000 00000000db665000 1 00000000db665000 00000000db677000 1 00000000db677000 00000000db69d000 1 00000000db69d000 00000000db6a0000 1 00000000db6a0000 00000000db6a8000 1 00000000db6a8000 00000000db6ae000 1 00000000db6ae000 00000000db6c2000 1 00000000db6c2000 00000000db6d4000 1 00000000db6d4000 00000000db6de000 1 00000000db6de000 00000000db6e0000 1 00000000db6e0000 00000000db6e2000 1 00000000db6e2000 00000000db6ef000 1 00000000db6ef000 00000000db6f0000 1 00000000db6f0000 00000000db6f2000 1 00000000db6f2000 00000000db6f3000 1 00000000db6f3000 00000000db810000 1 00000000db810000 00000000db815000 1 00000000db815000 00000000db81f000 1 00000000db81f000 00000000db821000 1 00000000db821000 00000000db85d000 1 00000000db85d000 00000000db869000 1 00000000db869000 00000000db881000 1 00000000db881000 00000000db889000 1 00000000db889000 00000000db88e000 1 00000000db88e000 00000000db88f000 1 00000000db88f000 00000000db891000 1 00000000db891000 00000000db899000 1 00000000db899000 00000000db8a9000 1 00000000db8a9000 00000000db8ab000 1 00000000db8ab000 00000000db8af000 1 00000000db8af000 00000000db8b1000 1 00000000db8b1000 00000000db8b5000 1 00000000db8b5000 00000000db8b7000 1 00000000db8b7000 00000000db8be000 1 00000000db8be000 00000000db8c2000 1 00000000db8c2000 00000000db8c7000 1 00000000db8c7000 00000000db8cf000 1 00000000db8cf000 00000000db8e0000 1 00000000db8e0000 00000000db8e1000 1 00000000db8e1000 00000000db8e2000 1 00000000db8e2000 00000000db8e6000 1 00000000db8e6000 00000000db8e8000 1 00000000db8e8000 00000000db8f4000 1 00000000db8f4000 00000000db904000 1 00000000db904000 00000000db90c000 1 00000000db90c000 00000000db91c000 1 00000000db91c000 00000000db91d000 1 00000000db91d000 00000000db922000 1 00000000db922000 00000000db923000 1 00000000db923000 00000000db929000 1 00000000db929000 00000000db92b000 1 00000000db92b000 00000000db92d000 1 00000000db92d000 00000000db92f000 1 00000000db92f000 00000000db933000 1 00000000db933000 00000000db934000 1 00000000db934000 00000000db936000 1 00000000db936000 00000000db937000 1 00000000db937000 00000000db952000 1 00000000db952000 00000000db96b000 1 00000000db96b000 00000000db998000 1 00000000db998000 00000000db9a1000 1 00000000db9a1000 00000000db9a2000 1 00000000db9a2000 00000000db9a3000 1 00000000db9a3000 00000000db9a4000 1 00000000db9a4000 00000000db9a5000 1 00000000db9a5000 00000000db9a7000 1 00000000db9a7000 00000000db9a8000 1 00000000db9a8000 00000000db9aa000 1 00000000db9aa000 00000000db9ba000 1 00000000db9ba000 00000000db9da000 1 00000000db9da000 00000000db9f7000 1 00000000db9f7000 00000000dba00000 1 00000000dba00000 00000000dba0a000 1 00000000dba0a000 00000000dba11000 1 00000000dba11000 00000000dba12000 1 00000000dba12000 00000000dba51000 1 00000000dba51000 00000000dba5d000 1 00000000dba5d000 00000000dba6c000 1 00000000dba6c000 00000000dba88000 1 00000000dba88000 00000000dba92000 1 00000000dba92000 00000000dba94000 1 00000000dba94000 00000000dbac0000 1 00000000dbac0000 00000000dbac6000 1 00000000dbac6000 00000000dbad2000 1 00000000dbad2000 00000000dbad9000 1 00000000dbad9000 00000000dbae0000 1 00000000dbae0000 00000000dbaeb000 1 00000000dbaeb000 00000000dbaf6000 1 00000000dbaf6000 00000000dbb01000 1 00000000dbb01000 00000000dbb17000 1 00000000dbb17000 00000000dbb1f000 1 00000000dbb1f000 00000000dbb20000 1 00000000dbb20000 00000000dbb23000 1 00000000dbb23000 00000000dbb24000 1 00000000dbb24000 00000000dbb25000 1 00000000dbb25000 00000000dbb3a000 1 00000000dbb3a000 00000000dbb3d000 1 00000000dbb3d000 00000000dbb43000 1 00000000dbb43000 00000000dbb45000 1 00000000dbb45000 00000000dbb49000 1 00000000dbb49000 00000000dbb4c000 1 00000000dbb4c000 00000000dbb4e000 1 00000000dbb4e000 00000000dbb51000 1 00000000dbb51000 00000000dbb54000 1 00000000dbb54000 00000000dbb5a000 1 00000000dbb5a000 00000000dbb5e000 1 00000000dbb5e000 00000000dbb62000 1 00000000dbb62000 00000000dbb67000 1 00000000dbb67000 00000000dbb91000 1 00000000dbb91000 00000000dbb93000 1 00000000dbb93000 00000000dbb94000 1 00000000dbb94000 00000000dbb9d000 1 00000000dbb9d000 00000000dbb9f000 1 00000000dbb9f000 00000000dbbcf000 1 00000000dbbcf000 00000000dbbd0000 1 00000000dbbd0000 00000000dbbd1000 1 00000000dbbd1000 00000000dbbd5000 1 00000000dbbd5000 00000000dbbd6000 1 00000000dbbd6000 00000000dbbd7000 1 00000000dbbd7000 00000000dbbd8000 1 00000000dbbd8000 00000000dbbd9000 1 00000000dbbd9000 00000000dbbdd000 1 00000000dbbdd000 00000000dbbdf000 1 00000000dbbdf000 00000000dbbe1000 1 00000000dbbe1000 00000000dbbeb000 1 00000000dbbeb000 00000000dbbec000 1 00000000dbbec000 00000000dbbef000 1 00000000dbbef000 00000000dbbff000 1 00000000dbbff000 00000000dbc01000 1 00000000dbc01000 00000000dbc05000 1 00000000dbc05000 00000000dbc0f000 1 00000000dbc0f000 00000000dbc11000 1 00000000dbc11000 00000000dbc12000 1 00000000dbc12000 00000000dbc14000 1 00000000dbc14000 00000000dbc15000 1 00000000dbc15000 00000000dbc20000 1 00000000dbc20000 00000000dbc21000 1 00000000dbc21000 00000000dbc22000 1 00000000dbc22000 00000000dbc2a000 1 00000000dbc2a000 00000000dbc2c000 1 00000000dbc2c000 00000000dbc2d000 1 00000000dbc2d000 00000000dbc2f000 1 00000000dbc2f000 00000000dbc30000 1 00000000dbc30000 00000000dbc42000 1 00000000dbc42000 00000000dbc44000 1 00000000dbc44000 00000000dbc54000 1 00000000dbc54000 00000000dbc5c000 1 00000000dbc5c000 00000000dbc5e000 1 00000000dbc5e000 00000000dbc60000 1 00000000dbc60000 00000000dbc64000 1 00000000dbc64000 00000000dbc6d000 1 00000000dbc6d000 00000000dbc7f000 1 00000000dbc7f000 00000000dbc85000 1 00000000dbc85000 00000000dbca3000 1 00000000dbca3000 00000000dbca6000 1 00000000dbca6000 00000000dbcb9000 1 00000000dbcb9000 00000000dbcba000 1 00000000dbcba000 00000000dbcbb000 1 00000000dbcbb000 00000000dbcbc000 1 00000000dbcbc000 00000000dbcbd000 1 00000000dbcbd000 00000000dbcd5000 1 00000000dbcd5000 00000000dbcd8000 1 00000000dbcd8000 00000000dbcd9000 1 00000000dbcd9000 00000000dbcda000 1 00000000dbcda000 00000000dbce1000 1 00000000dbce1000 00000000dbce3000 1 00000000dbce3000 00000000dbce4000 1 00000000dbce4000 00000000dbd06000 1 00000000dbd06000 00000000dbd07000 1 00000000dbd07000 00000000dbd0a000 1 00000000dbd0a000 00000000dbd0b000 1 00000000dbd0b000 00000000dbd0c000 1 00000000dbd0c000 00000000dbd0e000 1 00000000dbd0e000 00000000dbd10000 1 00000000dbd10000 00000000dbd12000 1 00000000dbd12000 00000000dbd15000 1 00000000dbd15000 00000000dbd17000 1 00000000dbd17000 00000000dbd19000 1 00000000dbd19000 00000000dbd1b000 1 00000000dbd1b000 00000000dbd44000 1 00000000dbd44000 00000000dbd46000 1 00000000dbd46000 00000000dbd60000 1 00000000dbd60000 00000000dbd70000 1 00000000dbd70000 00000000dbd79000 1 00000000dbd79000 00000000dbd7a000 1 00000000dbd7a000 00000000dbd7c000 1 00000000dbd7c000 00000000dbd7d000 1 00000000dbd7d000 00000000dbd90000 1 00000000dbd90000 00000000dbd93000 1 00000000dbd93000 00000000dbd97000 1 00000000dbd97000 00000000dbd9a000 1 00000000dbd9a000 00000000dbd9b000 1 00000000dbd9b000 00000000dbd9e000 1 00000000dbd9e000 00000000dbda1000 1 00000000dbda1000 00000000dbda5000 1 00000000dbda5000 00000000dbda9000 1 00000000dbda9000 00000000dbdaf000 1 00000000dbdaf000 00000000dbdb3000 1 00000000dbdb3000 00000000dbdb4000 1 00000000dbdb4000 00000000dbdbe000 1 00000000dbdbe000 00000000dbdbf000 1 00000000dbdbf000 00000000dbdc0000 1 00000000dbdc0000 00000000dbdc1000 1 00000000dbdc1000 00000000dbdc2000 1 00000000dbdc2000 00000000dbdc5000 1 00000000dbdc5000 00000000dbdc6000 1 00000000dbdc6000 00000000dbdc7000 1 00000000dbdc7000 00000000dbdcb000 1 00000000dbdcb000 00000000dbdcf000 1 00000000dbdcf000 00000000dbdd5000 1 00000000dbdd5000 00000000dbdd8000 1 00000000dbdd8000 00000000dbddf000 1 00000000dbddf000 00000000dbde1000 1 00000000dbde1000 00000000dbde5000 1 00000000dbde5000 00000000dbde8000 1 00000000dbde8000 00000000dbded000 1 00000000dbded000 00000000dbdf0000 1 00000000dbdf0000 00000000dbdf4000 1 00000000dbdf4000 00000000dbdf7000 1 00000000dbdf7000 00000000dbdfb000 1 00000000dbdfb000 00000000dbe1e000 1 00000000dbe1e000 00000000dbe20000 1 00000000dbe20000 00000000dbe23000 1 00000000dbe23000 00000000dbe27000 1 00000000dbe27000 00000000dbe28000 1 00000000dbe28000 00000000dbe2a000 1 00000000dbe2a000 00000000dbe2b000 1 00000000dbe2b000 00000000dc24d000 1 00000000dc24d000 00000000dc25c000 1 00000000dc25c000 00000000dc25d000 1 00000000dc25d000 00000000dc25e000 1 00000000dc25e000 00000000dc273000 1 00000000dc273000 00000000dc274000 1 00000000dc274000 00000000dc275000 1 00000000dc275000 00000000dc276000 1 00000000dc276000 00000000dc27a000 1 00000000dc27a000 00000000dc27e000 1 00000000dc27e000 00000000dc283000 1 00000000dc283000 00000000dc284000 1 00000000dc284000 00000000dc2a2000 1 00000000dc2a2000 00000000dc2a6000 1 00000000dc2a6000 00000000dd163000 2 00000000dd163000 00000000dd2a8000 1 00000000dd2a8000 00000000dd42a000 4 00000000dd42a000 00000000dd83e000 1 00000000dd83e000 00000000de38b000 1 00000000de38b000 00000000de430000 1 00000000de430000 00000000de733000 1 00000000de733000 00000000de74f000 1 00000000de74f000 00000000de770000 1 00000000de770000 00000000de77d000 1 00000000de77d000 00000000de783000 1 00000000de783000 00000000de78b000 1 00000000de78b000 00000000de7a4000 1 00000000de7a4000 00000000de7b4000 1 00000000de7b4000 00000000de7c9000 1 00000000de7c9000 00000000de7e0000 1 00000000de7e0000 00000000deff9000 1 00000000deff9000 00000000df000000 1 0000000100000000 000000021f380000 2 00000000000a0000 0000000000100000 2 00000000df000000 00000000e0000000 2 00000000f8000000 00000000fc000000 2 00000000fd000000 0000000100000000

4 years agoos(1): add c implementation of inferno os command and cmd(3) device manpages
cinap_lenrek [Sat, 30 Nov 2019 19:10:08 +0000 (20:10 +0100)]
os(1): add c implementation of inferno os command and cmd(3) device manpages

this is a reimplementation of infernos os(1) command, which
allows running commands in the underhying host operating
system when inferno runs in hosted mode (emu). but unlike
inferno, we want to use it to run commands on the client
side of a inferno or drawterm session from the plan9 cpu
server, so it defaults to /mnt/term/cmd for the mountpoint.

4 years agosd53c8xx: fix the driver for amd64, fix alignment/padding issues, fix freechain handling
cinap_lenrek [Sun, 24 Nov 2019 20:56:54 +0000 (21:56 +0100)]
sd53c8xx: fix the driver for amd64, fix alignment/padding issues, fix freechain handling

4 years agoupas/fs: remove useless loop in rf822()
cinap_lenrek [Sun, 24 Nov 2019 02:46:53 +0000 (03:46 +0100)]
upas/fs: remove useless loop in rf822()

4 years agofix ref822 again: remove uniqarray(), fix case with many entries in 'n'.
Ori Bernstein [Sat, 23 Nov 2019 16:23:21 +0000 (08:23 -0800)]
fix ref822 again: remove uniqarray(), fix case with many entries in 'n'.

4 years agoupas/marshal: fix printinreplyto function
Alex Musolino [Fri, 22 Nov 2019 06:59:35 +0000 (17:29 +1030)]
upas/marshal: fix printinreplyto function

According to RFC822, the message identifier (msg-id) in a
"In-Reply-To" header must start with a '<' and end with a '>'.

4 years agofix ref882 reference parsing.
Ori Bernstein [Fri, 22 Nov 2019 01:17:54 +0000 (17:17 -0800)]
fix ref882 reference parsing.

we were getting nils in the list when there were many references.
this fixes and simplifies the copying loop and makes the code rhyme.

4 years agoshow urls in html messages.
Ori Bernstein [Thu, 21 Nov 2019 18:48:13 +0000 (10:48 -0800)]
show urls in html messages.

sometimes, I get phishing emails with links that I have an unstoppable
urge to click.

4 years agogrep: error if sbrk fails
BurnZeZ [Thu, 21 Nov 2019 16:44:41 +0000 (16:44 +0000)]
grep: error if sbrk fails

4 years agomerge
Ori Bernstein [Thu, 21 Nov 2019 00:12:21 +0000 (16:12 -0800)]
merge

4 years agoimprove language in delay(9)
Ori Bernstein [Thu, 21 Nov 2019 00:05:52 +0000 (16:05 -0800)]
improve language in delay(9)

give the reader enough context to know when to use and not
use the delay family of functions.

4 years agomerge
cinap_lenrek [Wed, 20 Nov 2019 23:40:15 +0000 (00:40 +0100)]
merge

4 years agovac(1): assimilate manpage additions from plan9port and complete usage lines (thanks...
cinap_lenrek [Wed, 20 Nov 2019 23:39:07 +0000 (00:39 +0100)]
vac(1): assimilate manpage additions from plan9port and complete usage lines (thanks joe9)

the usage lines in vac where out of sync with the implementation
and the manpages.

document the -a and -x options, from:

https://github.com/9fans/plan9port/blob/master/man/man1/vac.1

4 years agomail(1): fix typo
Alex Musolino [Wed, 20 Nov 2019 07:16:29 +0000 (17:46 +1030)]
mail(1): fix typo

4 years agotimezones: change DST timezone string for South Australia
Alex Musolino [Wed, 20 Nov 2019 01:19:16 +0000 (11:49 +1030)]
timezones: change DST timezone string for South Australia

Use "CDT" for DST as distinct from "CST" for non-DST.

4 years agomerge
Ori Bernstein [Tue, 19 Nov 2019 20:31:42 +0000 (12:31 -0800)]
merge

4 years agoadd start of section 9 manpages (thanks rgl)
Ori Bernstein [Tue, 19 Nov 2019 20:30:40 +0000 (12:30 -0800)]
add start of section 9 manpages (thanks rgl)

this change adds some of the kernel manpages from 9legacy,
fixed and updated to match the changes in 9front.

4 years agorio: fix cons read breakage from previous commit
cinap_lenrek [Tue, 19 Nov 2019 08:03:45 +0000 (09:03 +0100)]
rio: fix cons read breakage from previous commit

4 years agorio(4): update description of wctl file format
Alex Musolino [Tue, 19 Nov 2019 02:13:53 +0000 (12:43 +1030)]
rio(4): update description of wctl file format

State strings are now padded to 12-characters.  Remove ambiguous
reference to "12-character style", instead referring the reader to
image(6).

4 years agorio: pad window status strings in wctl files
Alex Musolino [Tue, 19 Nov 2019 02:10:53 +0000 (12:40 +1030)]
rio: pad window status strings in wctl files

This makes it possible to read the entire initial contents of the wctl
files without blocking.

4 years agorio: fix bug causing short reads of wctl files
Alex Musolino [Tue, 19 Nov 2019 02:08:13 +0000 (12:38 +1030)]
rio: fix bug causing short reads of wctl files

Previously, reads of wctl files would return one byte less than
requested as the returned string must be null terminated.  Now we pass
the actual size of the allocated buffer to the handler, which is large
enough to accommodate a trailing partial rune and terminating null
byte.

4 years agodocument 'T' flag misbehavior (thanks rgl)
Ori Bernstein [Mon, 18 Nov 2019 09:06:02 +0000 (01:06 -0800)]
document 'T' flag misbehavior (thanks rgl)

4 years agoSpecifiy the restrictions on 9boot file names more clearly.
Ori Bernstein [Mon, 18 Nov 2019 00:17:15 +0000 (16:17 -0800)]
Specifiy the restrictions on 9boot file names more clearly.

4 years agoDocument 9bootfat limitation.
Ori Bernstein [Mon, 18 Nov 2019 00:08:48 +0000 (16:08 -0800)]
Document 9bootfat limitation.

4 years agosdiahci: implement reset timeout for ahciencreset(), make blink() never block, fix...
cinap_lenrek [Sun, 17 Nov 2019 20:19:55 +0000 (21:19 +0100)]
sdiahci: implement reset timeout for ahciencreset(), make blink() never block, fix map[] access in ledkproc()

Ori_B reports that his controller gets stuck in the ahciencreset()
wait loop. so we implement a 1000 ms timeout. we replace delay()
with esleep() as we are always called from the ledkproc().

blink() could enter infinite delay loop as well, so instead of
waiting for the message to get transmitted we exit making it
non-blocking (we will get called again anyway).

the access to the controller map[] was wrong in ledkproc(). the
index is the controller number, not the drive number!

4 years agobootrc: for wireless netbooting, set the WPA/WPA2 preshard key with wpapsk=password...
cinap_lenrek [Sun, 17 Nov 2019 18:04:38 +0000 (19:04 +0100)]
bootrc: for wireless netbooting, set the WPA/WPA2 preshard key with wpapsk=password boot parameter

this allows automatic netbooting without password prompt
for the wirelss network.

4 years agoParse global pax header in the right place.
Ori Bernstein [Fri, 15 Nov 2019 21:26:25 +0000 (13:26 -0800)]
Parse global pax header in the right place.

4 years agoAdd pax extended header support to tar.
Ori Bernstein [Thu, 14 Nov 2019 21:52:41 +0000 (13:52 -0800)]
Add pax extended header support to tar.

Support for 'path=', 'uname=', 'gname=', 'size=', and 'atime=' pax
headers is useful.  Others are ignored, possibly with a warning.

We were running into missing support with the 'go' extraction.

At the same time, this cleans up the way that we handle paths,
getting rid of static buffers with hidden space at the front.

4 years agothread(2): fix manpage typos (thanks rgl)
Ori Bernstein [Tue, 12 Nov 2019 21:01:38 +0000 (13:01 -0800)]
thread(2): fix manpage typos (thanks rgl)

4 years agodraw(2): fix manpage typo (thanks rgl)
Ori Bernstein [Mon, 11 Nov 2019 21:35:47 +0000 (13:35 -0800)]
draw(2): fix manpage typo (thanks rgl)

4 years agodevip: use the routing table for local source ip address selection
cinap_lenrek [Sun, 10 Nov 2019 18:50:46 +0000 (19:50 +0100)]
devip: use the routing table for local source ip address selection

when making outgoing connections, the source ip was selected
by just iterating from the first to the last interface and
trying each local address until a route was found. the result
was kind of hard to predict as it depends on the interface
order.

this change replaces the algorithm with the route lookup algorithm
that we already have which takes more specific desination and
source prefixes into account. so the order of interfaces does
not matter anymore.

4 years agoFix directory heuristic for long file names.
Ori Bernstein [Tue, 5 Nov 2019 18:48:51 +0000 (10:48 -0800)]
Fix directory heuristic for long file names.

Tar specifies that a filename ending with '/' is a directory. We were
incorrectly looking at the short name. This meant that when we have long
filenames with a '/' at the 100th character, we would decide it was a
directory.

This change uses the long name when deciding the size for extraction,
and trusts the header size when just skipping forward in the stream.

4 years agogames/turtle: do exit instead of crash in redraw() when there where no lines drawn
cinap_lenrek [Sun, 3 Nov 2019 14:20:57 +0000 (15:20 +0100)]
games/turtle: do exit instead of crash in redraw() when there where no lines drawn

4 years agoadd games/linden and turtle to mkfile
aiju [Sun, 3 Nov 2019 13:54:26 +0000 (13:54 +0000)]
add games/linden and turtle to mkfile

4 years agoadd games/linden and games/turtle
aiju [Sun, 3 Nov 2019 13:49:23 +0000 (13:49 +0000)]
add games/linden and games/turtle

4 years agotar: fix memory corruption in extract1 (thanks petter)
cinap_lenrek [Sat, 2 Nov 2019 13:17:34 +0000 (14:17 +0100)]
tar: fix memory corruption in extract1 (thanks petter)

extract1() expects two extra bytes to be avilabe before
fname buffer so it can prepend ./ before the name. this
used to be the case with name(), but was violated when
long name support was added and getname() was used in
place of name() which did not reserve the 2 extra bytes.

this change reserves two extra bytes in the getname()'s
static buffer and also removes the extra copy as name()
already makes a copy.

4 years agoupasfs(4): fix manpage typo (thanks rgl)
cinap_lenrek [Sat, 2 Nov 2019 11:52:39 +0000 (12:52 +0100)]
upasfs(4): fix manpage typo (thanks rgl)

4 years agofile: add (very) basic support for detecting mpeg4 formats
Alex Musolino [Fri, 1 Nov 2019 01:35:11 +0000 (12:05 +1030)]
file: add (very) basic support for detecting mpeg4 formats

4 years agoupas/fs: fix handling of numeric timezone offsets in strtotm
Alex Musolino [Wed, 30 Oct 2019 23:11:03 +0000 (09:41 +1030)]
upas/fs: fix handling of numeric timezone offsets in strtotm

Since numeric timezone offsets are relative to GMT, initialise zone to
GMT so tm2sec(2) does not assume local time.

Note that if strtotm encounters a timezone *string* and consequently
overwrites zone then we will end up in the same mess since tm2sec(2)
only deals with GMT or local time.

4 years agoCheck if 'm' is null when updating messages.
Ori Bernstein [Mon, 28 Oct 2019 21:12:44 +0000 (14:12 -0700)]
Check if 'm' is null when updating messages.

4 years agobcm: fix software cursor avoidance for loadimage() case (thanks bitmapper)
cinap_lenrek [Sun, 27 Oct 2019 22:51:11 +0000 (23:51 +0100)]
bcm: fix software cursor avoidance for loadimage() case (thanks bitmapper)

4 years agoip/dhcpd: prevent client from increasing max reply size beyond the reply buffer capacity
cinap_lenrek [Tue, 22 Oct 2019 04:53:50 +0000 (06:53 +0200)]
ip/dhcpd: prevent client from increasing max reply size beyond the reply buffer capacity

4 years agoMake ctrl+g focus text windows and cycle zeroxed copies (thanks kvik)
Ori Bernstein [Mon, 21 Oct 2019 22:29:07 +0000 (15:29 -0700)]
Make ctrl+g focus text windows and cycle zeroxed copies (thanks kvik)

4 years ago/sys/lib/plumb/basic: open nedmail windows with -noscroll
Alex Musolino [Mon, 21 Oct 2019 21:48:20 +0000 (08:18 +1030)]
/sys/lib/plumb/basic: open nedmail windows with -noscroll

This preserves the desired behaviour of *not* scrolling to the bottom
of plumbed messages even when rio(1) is invoked with the -s flag.

4 years agondb/dns: handle empty $DNSSERVER
cinap_lenrek [Sun, 13 Oct 2019 07:02:04 +0000 (09:02 +0200)]
ndb/dns: handle empty $DNSSERVER

when $DNSSERVER is empty, query ndb for local dns servers
instead of not using any at all.

4 years agobackup: Set execution bits in backup scripts
Roberto E. Vargas Caballero [Sun, 13 Oct 2019 08:20:10 +0000 (10:20 +0200)]
backup: Set execution bits in backup scripts

4 years agoether82563: fix multicast for i210
cinap_lenrek [Fri, 11 Oct 2019 19:38:12 +0000 (21:38 +0200)]
ether82563: fix multicast for i210

MTA has 128 entries, according to section 8.10.15 in the datasheet.
this fixes ipv6 in apu2 which has 3x i210 (8086/157b).

4 years agoFetch IMAP flags from server. This makes us sync read/answered/... flags with unix.
Ori Bernstein [Thu, 10 Oct 2019 18:52:22 +0000 (11:52 -0700)]
Fetch IMAP flags from server. This makes us sync read/answered/... flags with unix.

4 years agoawk: make empty FS unicodely-correct.
Ori Bernstein [Thu, 10 Oct 2019 00:36:02 +0000 (17:36 -0700)]
awk: make empty FS unicodely-correct.

4 years agosdiahci: force Hudson SATA Controller to AHCI mode
cinap_lenrek [Tue, 8 Oct 2019 11:53:57 +0000 (13:53 +0200)]
sdiahci: force Hudson SATA Controller to AHCI mode