]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
2 years agoaudiohda: fix syntax error front
qwx [Mon, 30 Aug 2021 16:55:30 +0000 (16:55 +0000)]
audiohda: fix syntax error

2 years agoaudiohda: add ztom z36*/z37* device id
Sigrid Solveig Haflínudóttir [Sun, 29 Aug 2021 23:59:45 +0000 (23:59 +0000)]
audiohda: add ztom z36*/z37* device id

2 years agoether8169: support rtl8402 variant
Sigrid Solveig Haflínudóttir [Sun, 29 Aug 2021 23:12:33 +0000 (23:12 +0000)]
ether8169: support rtl8402 variant

2 years agodate(1): sync with reality
Ori Bernstein [Sun, 29 Aug 2021 01:00:36 +0000 (01:00 +0000)]
date(1): sync with reality

'date -m' was removed, but evidence of its
existence was left in the manpage.

2 years agogit(1): "see also" consistency (thanks sirjofri)
Ori Bernstein [Fri, 27 Aug 2021 14:13:11 +0000 (14:13 +0000)]
git(1): "see also" consistency (thanks sirjofri)

adds commas between "see also" entries to
make it consistent with other man pages.

2 years ago/rc/bin/9fs: 9front.org files now live on port 9000.
glenda [Fri, 27 Aug 2021 01:09:12 +0000 (01:09 +0000)]
/rc/bin/9fs: 9front.org files now live on port 9000.

2 years agobring games/swar from 1ed sources.
rodri [Thu, 26 Aug 2021 20:04:59 +0000 (20:04 +0000)]
bring games/swar from 1ed sources.

2 years agogit/serve: add a '\n' after HEAD
Ori Bernstein [Wed, 25 Aug 2021 22:15:34 +0000 (22:15 +0000)]
git/serve: add a '\n' after HEAD

Per the docs:

the sender SHOULD include a LF, but the
receiver MUST NOT complain if it is not
present.

I typoed away the SHOULD, and got missed the
MUST NOT.

thanks qbit.

2 years agogit/compat: add support for ls-remote [-d]
Ori Bernstein [Wed, 25 Aug 2021 02:24:15 +0000 (02:24 +0000)]
git/compat: add support for ls-remote [-d]

This is used by 'go get' sometimes, so add it.

2 years agoman page fixes (thanks stuart morrow)
qwx [Tue, 24 Aug 2021 21:45:37 +0000 (21:45 +0000)]
man page fixes (thanks stuart morrow)

2 years agogit/diff: clean up diffs
Ori Bernstein [Mon, 23 Aug 2021 01:22:04 +0000 (01:22 +0000)]
git/diff: clean up diffs

We were overzealous about showing the changed
header, as well as setting a junk variable for
files that didn't exist; fix both.

2 years agogit/commit: remove trailing 'subst -g'
Ori Bernstein [Mon, 23 Aug 2021 00:22:04 +0000 (00:22 +0000)]
git/commit: remove trailing 'subst -g'

the subst utility no longer supports a '-g'
flag, but this was left behind in commit;

this means that the lines listing modified
files were not correctly commented in the
commit header.

This is mostly harmless, but when using an
editor like sam to edit the commit message,
the modified lines would have to be removed
manually.

2 years agorevert 8c228a123fa0c6062570964011854302bbf57242: accidental commit
Ori Bernstein [Sun, 22 Aug 2021 17:47:38 +0000 (17:47 +0000)]
revert 8c228a123fa0c6062570964011854302bbf57242: accidental commit

was testing out the git/import tweaks and accidentally
pushed this commit. No comment on whether we want it,
but it definitely wasn't ready for merge.

Oops.

2 years agogit/{diff,import}: make it easier to handle manually-asembled patch emails
ori@eigenstate.org [Sun, 22 Aug 2021 17:18:35 +0000 (17:18 +0000)]
git/{diff,import}: make it easier to handle manually-asembled patch emails
Often, people (including myself) will write emails that
can almost be applied with git/import.  This changes
git/diff and git/import so that things will generally
work even when assembling diffs by hand:

1. git/import becomes slightly more lax:

^diff ...
^--- ...

will both be detected as the start of a patch.

2.  git/diff produces the same format of diff
as git/export, starting with paths:

--- a/path/to/file
+++ b/path/to/file

which means that the 'ape/patch -p1' used
within git/import will just work.

So with this, if you send an email to the mailing list,
write up a committable description, and append the
output of git/diff to the end of the email, git/import
should just work.

[this patch was send through the mailing list using the
above procedure, and will be committed with git/import
to verify that it works as advertised]

2 years agoexportfs, oexportfs, iostats: make -d log to stderr
amavect [Wed, 18 Aug 2021 17:51:40 +0000 (17:51 +0000)]
exportfs, oexportfs, iostats: make -d log to stderr

exportfs -d logs 9p traffic to /tmp/exportdb.
-f allows writing to a different file.
exportfs silently continues if it doesn't have
permissions to create or write to /tmp/exportdb.
These are poor behaviors.

A better default is to write to stderr, since it
is 9P debug info that is better immediately printed,
and not user info that is better handled by syslog().
As a result, -f is obsolete and thus removed.
Redirect responsibility is now on rc.
As a side effect, rc will fail if it doesn't
have permissions to write.

exportfs(4) is updated to reflect all changes
and with a better Synopsis.

oexportfs is changed to match exportfs.
oexportfs(4) is updated to reflect all changes.
The Synopsis is not changed due to the number of flags.

Removed -f from iostats.
iostats(4) is updated to reflect all changes.
---

2 years agomk for only supported archs
unobe@cpan.org [Tue, 17 Aug 2021 14:00:47 +0000 (14:00 +0000)]
mk for only supported archs
http://fqa.9front.org/fqa1.html#1.2 states the supported archs.
However, clean and nuke also remove build files for 0 (spim) and q
(power).  'mk all' using those archs fails; 'mk kernels' also tries to
build all the kernels, even those which are not supported.  For
example, I tried to build the power arch (qc, qa, ql) and without
surprise it failed (when building dtracy): ...
mk dtracy
qc -FTVw dtracy.c
yacc -v -d -D1 parse.y
qc -FTVw cgen.c
qc -FTVw act.c
qc -FTVw type.c
 == regfree ==
REGISTER R0 <11> STRUCT DTAct cgen.c:302
 == regfree ==

REGISTER R0 <11> STRUCT DTAct act.c:266

 == regfree ==
qc -FTVw agg.c
cgen.c:299 unknown type in regalloc: STRUCT DTAct
cgen.c:299 bad opcode in gmove INT -> STRUCT DTAct
cgen.c:302 unknown type in regalloc: STRUCT DTAct
cgen.c:302 bad opcode in gmove INT -> STRUCT DTAct
cgen.c:302 error in regfree: 0 [0]
REGISTERmk: qc -FTVw cgen.c  : exit status=rc 387386: qc 387392: error R0
 <11> STRUCT DTAct act.c:269

act.c:250 unknown type in regalloc: STRUCT DTAct
act.c:250 bad opcode in gmove INT -> STRUCT DTAct
act.c:266 unknown type in regalloc: STRUCT DTAct
act.c:266 bad opcode in gmove INT -> STRUCT DTAct
act.c:266 error in regfree: 0 [0]
act.c:269 unknown type in regalloc: STRUCT DTAct
act.c:269 bad opcode in gmove INT -> STRUCT DTAct
act.c:269 error in regfree: 0 [0]
act.c:274 unknown type in regalloc: STRUCT DTAct
act.c:274 bad opcode in gmove INT -> STRUCT DTAct
act.c:274 error in regfree: 0 [0]
too many errors
mk: for(i in cc ...  : exit status=rc 382748: rc 387379: mk 387381: error
mk: date for (i ...  : exit status=rc 373781: rc 382226: mk 382227: error
cpu%

The patch below skips over non-supported architectures.  Is that
something we want?  This way, 'mk kernels' should work without a
problem (tested on amd64).  Then if someone works on getting those
architectures supported again in the future, they can be added back
in.

2 years agoventi: fix memory layers
Noam Preil [Wed, 21 Jul 2021 05:06:05 +0000 (05:06 +0000)]
venti: fix memory layers

2 years agomixfs: add reading (audio loopback)
Sigrid Solveig Haflínudóttir [Sat, 21 Aug 2021 22:51:11 +0000 (22:51 +0000)]
mixfs: add reading (audio loopback)

2 years agoaudio(1): replace references to juke(7) and playlistfs(7) with zuke(1) (thanks unobe)
Alex Musolino [Fri, 20 Aug 2021 04:07:37 +0000 (04:07 +0000)]
audio(1): replace references to juke(7) and playlistfs(7) with zuke(1) (thanks unobe)

2 years agosnoopy: ... and fix the memory leak for new dns rr types
cinap_lenrek [Wed, 18 Aug 2021 19:37:44 +0000 (19:37 +0000)]
snoopy: ... and fix the memory leak for new dns rr types

2 years agosnoopy: fix dns nil pointer crashes when formating dns packets (thanks sl)
cinap_lenrek [Wed, 18 Aug 2021 17:59:50 +0000 (17:59 +0000)]
snoopy: fix dns nil pointer crashes when formating dns packets (thanks sl)

snoopy shares ndb/dns's dns parser code, but has its own
copy of rralloc() function, which is responsible to allocating
auxiolary data structures on an RR depending on the type.

ndb/dns gained some support for some new types, but snoopy's
copy of rralloc() was not updated, resulting the auxiolary
structures to be nil, and the shared parsing routines crashes
when trying to dereference them.

this just syncs the copies, we might consider moving rralloc()
into its own file so it can be completely shared.

2 years agoexportfs: revert e524e8d65a7573c46d7beb49e77bfc2d55a5563d
Ori Bernstein [Wed, 18 Aug 2021 14:44:29 +0000 (14:44 +0000)]
exportfs: revert e524e8d65a7573c46d7beb49e77bfc2d55a5563d

It turns out that the '-f' flag was being used, and removing
it broke things.

2 years agogit: better handling of absolute paths, regex metachars
Ori Bernstein [Tue, 17 Aug 2021 04:31:15 +0000 (04:31 +0000)]
git: better handling of absolute paths, regex metachars

Git currently gets a bit confused if you try to
manipulate files by absolute path.  There were also a
number of places where user-controlled file paths ended
up getting passed to regex interpretation, which could
confuse things.

This change mainly does 2 things:

- Adds a 'drop' function which drops
  a non-regex prefix from a string, and uses
  that to manipulate paths, simplifies 'subst',
  and removes 'subst -g', which was only used
  with fixed regexes; sed does this job fine.
- When getting a path from a user, we
  make it absolute and then strip out the head

Along the way it cleans up a couple of stupids:

- 'for(f in $list) if(! ~ $#f 0) use $f:
  $f can't be a nil list because of
  list flattening.
- removes a useless substitution here:

  all=`$nl{{git/query -c $1 $2; git/query -c $2 $3} | sed 's/^..//' | \
gsubst '^('$ourbr'|'$basebr'|'$theirbr')/*' | sort | uniq}

  where git/query -c doesn't produce
  paths prefixed with the query.

2 years agoexportfs: make -d log to stderr
amavect [Sat, 14 Aug 2021 19:50:23 +0000 (19:50 +0000)]
exportfs: make -d log to stderr

exportfs -d logs 9p traffic to /tmp/exportdb.
-f allows writing to a different file.
exportfs silently continues if it doesn't have
permissions to create or write to /tmp/exportdb.
These are poor behaviors.

A better default is to write to stderr, since it
is 9P debug info that is better immediately printed,
and not user info that is better handled by syslog().
As a result, -f is obsolete and thus removed.
Redirect responsibility is now on rc.
As a side effect, rc will fail if it doesn't
have permissions to write.

exportfs(4) is updated to reflect all changes
and with a better Synopsis.

2 years agoether82563: add 0x15bd i219-lm variant (thanks crab1)
Sigrid Solveig Haflínudóttir [Mon, 16 Aug 2021 14:28:59 +0000 (14:28 +0000)]
ether82563: add 0x15bd i219-lm variant (thanks crab1)

2 years agotinc: fix spelling and update manpage (thanks unobe)
cinap_lenrek [Sun, 15 Aug 2021 09:54:09 +0000 (09:54 +0000)]
tinc: fix spelling and update manpage (thanks unobe)

 Update tinc(8) man page to:
    1.  state the implementation aligns with 1.0.36 of tinc.org;
    2.  use same hostname as mentioned in usage line.
  Fix typos in tinc.c.

2 years agogit/branch: make '-n' use HEAD when '-b' unspecified
Ori Bernstein [Fri, 13 Aug 2021 05:16:50 +0000 (05:16 +0000)]
git/branch: make '-n' use HEAD when '-b' unspecified

This brings the behavior in line with the manual page,
and makes things less surprising for users.

2 years agodate: remove '-m' flag
Ori Bernstein [Fri, 13 Aug 2021 01:27:17 +0000 (01:27 +0000)]
date: remove '-m' flag

It's only ever been used by git, and is obsoleted
by 'date -f'. Remove it.

2 years agogit/export: use 'date -f' instead of 'date -m'
Ori Bernstein [Thu, 12 Aug 2021 14:42:47 +0000 (14:42 +0000)]
git/export: use 'date -f' instead of 'date -m'

The '-m' flag was added to date largely
to support git scripts. It predates the
tmdate code, which is why it exists, but
it's a recent enough addition that nothing
I'm aware of uses it, other than git.

As a result, it would be good to remove
it, so let's do that.

2 years agogit: fix non-interruptible temporary warning
Ori Bernstein [Wed, 11 Aug 2021 15:00:48 +0000 (15:00 +0000)]
git: fix non-interruptible temporary warning

harmless, but annoying.

2 years agoqsort: ...forgot to include headers in the commit.
Ori Bernstein [Wed, 11 Aug 2021 13:10:14 +0000 (13:10 +0000)]
qsort: ...forgot to include headers in the commit.

2 years agoqsort: allow usize-sized arrays.
Ori Bernstein [Wed, 11 Aug 2021 02:27:48 +0000 (02:27 +0000)]
qsort: allow usize-sized arrays.

As part of the transition to 64 bit userspace
APIs, we need to make our libc functions which
take arrays all accept and deal with large sizes.

This does the work for qsort.

2 years agox509: encode empty sequence as constructed
Ori Bernstein [Mon, 9 Aug 2021 15:33:16 +0000 (15:33 +0000)]
x509: encode empty sequence as constructed

According to the ASN.1 BER spec, we should be encoding
all sequences (including empty ones) as constructed:

8.9.1 The encoding of a sequence value shall be constructed.
8.10.1 The encoding of a sequence-of value shall be constructed.
8.11.1 The encoding of a set value shall be constructed.
8.12.1 The encoding of a set-of value shall be constructed.

However, we were only setting them as constructed when the
list was non-empty.

This changes it, and makes letsencrypt happy with the CSRs that
we generate.

2 years agogit/save: leave submodules unmangled
Ori Bernstein [Sat, 7 Aug 2021 18:01:22 +0000 (18:01 +0000)]
git/save: leave submodules unmangled

When modifying a submodule, we would garble the
mode, leading to an apparently dangling object.

This fixes the issue.

2 years agoetheriwl: fix botched merge...
cinap_lenrek [Fri, 6 Aug 2021 10:05:23 +0000 (10:05 +0000)]
etheriwl: fix botched merge...

2 years agomerge
cinap_lenrek [Thu, 5 Aug 2021 22:31:37 +0000 (22:31 +0000)]
merge

2 years agoetheriwl: add support for wireless ac 7260 (thanks kemal!)
cinap_lenrek [Thu, 5 Aug 2021 22:25:50 +0000 (22:25 +0000)]
etheriwl: add support for wireless ac 7260 (thanks kemal!)

2 years agoaux/cddb: include album name and correct track number key
Jacob Moody [Thu, 5 Aug 2021 15:54:29 +0000 (15:54 +0000)]
aux/cddb: include album name and correct track number key

2 years ago9p(2): fix a typo (thanks humm)
Sigrid Solveig Haflínudóttir [Thu, 5 Aug 2021 13:01:35 +0000 (13:01 +0000)]
9p(2): fix a typo (thanks humm)

2 years agocat: remove stupid long cast
cinap_lenrek [Wed, 4 Aug 2021 17:21:54 +0000 (17:21 +0000)]
cat: remove stupid long cast

2 years agolibpanel: rename to match clean rule
Ori Bernstein [Tue, 3 Aug 2021 02:10:10 +0000 (02:10 +0000)]
libpanel: rename to match clean rule

when running 'mk clean', we get a stray
libpanel.$O.a, because our 'mk clean'
rule expects libpanel.a$O.

This causes build failures after mk clean
on a symbol change.

2 years ago[PATCH] Support for igfx on Celeron(R) 2957U (thanks Lorenzo Bivens)
cinap_lenrek [Sat, 31 Jul 2021 12:05:29 +0000 (12:05 +0000)]
[PATCH] Support for igfx on Celeron(R) 2957U (thanks Lorenzo Bivens)

> After some tinkering I managed to get igfx working on this device.
> hw cursor works.
> The only caveat is that I can only get video over hdmi...
> will revisit displayport later

2 years agokernel: fix off by one for $cputype buffer (thanks anthony martin)
cinap_lenrek [Wed, 28 Jul 2021 22:55:17 +0000 (22:55 +0000)]
kernel: fix off by one for $cputype buffer (thanks anthony martin)

2 years agokernel: increase bootfs.paq compression level and blocksize
cinap_lenrek [Wed, 28 Jul 2021 00:38:00 +0000 (00:38 +0000)]
kernel: increase bootfs.paq compression level and blocksize

With the intel wifi firmware, this saves around 3MB of the
kernel image size.

2 years agokernel: simplify /boot/boot: 28K down to less than 4K.
cinap_lenrek [Tue, 27 Jul 2021 18:21:08 +0000 (18:21 +0000)]
kernel: simplify /boot/boot: 28K down to less than 4K.

- avoid print() format routines (saves alot of code)
- avoid useless opens of /dev/cons (already done by initcode)
- avoid useless binds of /env and /dev (already done by initcode)
- do bind of /shr in bootrc, it is not needed by us
- we'r pid 1 so kernel will print the exit message for us

2 years agogit/fetch: be more robust
Ori Bernstein [Tue, 27 Jul 2021 15:05:45 +0000 (15:05 +0000)]
git/fetch: be more robust

currently, git/fetch prints the refs
to update before it fully fetches the
pack files; this can lead to updates
to the refs before we're 100% certain
that the objects are present.

This change prints the updates after
the packfile has been successfully
indexed.

2 years agodial(2): dial returns an open data file, not a ctl one. also fixed little typo.
rodri [Sun, 25 Jul 2021 18:27:59 +0000 (18:27 +0000)]
dial(2): dial returns an open data file, not a ctl one. also fixed little typo.

2 years agolibc: use usize for sbrk() increment
cinap_lenrek [Sun, 25 Jul 2021 16:03:14 +0000 (16:03 +0000)]
libc: use usize for sbrk() increment

2 years agolibc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize
cinap_lenrek [Sun, 25 Jul 2021 15:54:22 +0000 (15:54 +0000)]
libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize

2 years agobcm64: make the kernel use virtual timer counter register for cycles()
cinap_lenrek [Sun, 25 Jul 2021 14:12:17 +0000 (14:12 +0000)]
bcm64: make the kernel use virtual timer counter register for cycles()

2 years agokernel: page counts a ulong, not usize
cinap_lenrek [Sun, 25 Jul 2021 14:03:12 +0000 (14:03 +0000)]
kernel: page counts a ulong, not usize

2 years agoarm64: use generic timer virtual counter for cycles()
cinap_lenrek [Fri, 23 Jul 2021 15:10:01 +0000 (15:10 +0000)]
arm64: use generic timer virtual counter for cycles()

We used to use performance cycle counter for cycles(),
but it is kind of useless in userspace as each core
has its own counter and hence not comparable between
cores. Also, the cycle counter stops counting when
the cores are idle.

Most callers expect cycles() to return a high resolution
timestamp instead, so do the best we can do here
and enable the userspace generic timer virtual counter.

2 years ago/sys/src/9/mkfile: add bcm64 (thanks stuart morrow)
cinap_lenrek [Thu, 22 Jul 2021 18:30:38 +0000 (18:30 +0000)]
/sys/src/9/mkfile: add bcm64 (thanks stuart morrow)

2 years agogzip, bzip2: add -n flag to suppress modification timestamp
cinap_lenrek [Wed, 21 Jul 2021 17:36:02 +0000 (17:36 +0000)]
gzip, bzip2: add -n flag to suppress modification timestamp

2 years agossh: fix typo (thanks izaki)
Jacob Moody [Wed, 21 Jul 2021 16:16:29 +0000 (16:16 +0000)]
ssh: fix typo (thanks izaki)

2 years agobrk(2): .... we define lowest addres not used by the program above, so use that instead
cinap_lenrek [Tue, 20 Jul 2021 21:49:30 +0000 (21:49 +0000)]
brk(2): .... we define lowest addres not used by the program above, so use that instead

2 years agobrk(2): sbrk(0) returns end address, not the base
cinap_lenrek [Tue, 20 Jul 2021 21:44:34 +0000 (21:44 +0000)]
brk(2): sbrk(0) returns end address, not the base

sbrk(0) returns the current end address of the BSS segment,
not the base. This might have been confused with the behaviour
of segbrk(), which when given a zero address returns the base.

2 years agomerge
cinap_lenrek [Sun, 18 Jul 2021 20:21:06 +0000 (20:21 +0000)]
merge

2 years agoscreenlock: don't poll to top window (thanks Stuart Morrow)
cinap_lenrek [Sun, 18 Jul 2021 19:54:58 +0000 (19:54 +0000)]
screenlock: don't poll to top window (thanks Stuart Morrow)

> String becomes stringbg so we have guaranteed max contrast in case the
> user changes the picture. (If you don't change the picture, it's
> white-on-black-on-black (sic) and you would never notice the change.)

2 years agoauth/rsa2jwk: add code to produce jwk rsa keys
Ori Bernstein [Sun, 18 Jul 2021 15:30:35 +0000 (15:30 +0000)]
auth/rsa2jwk: add code to produce jwk rsa keys

This is useful for acmed, and possibly other web
technologies.

2 years agogit/fetch: fix overly eager 's/pack/idx/g' in refactor
Ori Bernstein [Sun, 18 Jul 2021 14:59:51 +0000 (14:59 +0000)]
git/fetch: fix overly eager 's/pack/idx/g' in refactor

This would break pulling. We would try to index into
a place that didn't exist.

2 years agoaux/cddb: Provide -e option to print commands to rip audio with tags.
Jacob Moody [Sat, 17 Jul 2021 18:56:11 +0000 (18:56 +0000)]
aux/cddb: Provide -e option to print commands to rip audio with tags.

Also parse title/track artist and year.

2 years agogit/fetch: ensure we clean packfiles on failure
Ori Bernstein [Sat, 17 Jul 2021 00:10:44 +0000 (00:10 +0000)]
git/fetch: ensure we clean packfiles on failure

When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

thanks to Anthony Martin for spotting the bug.
git/fetch: ensure we clean packfiles on failure

When pulling into a git repository that is group
writable as a non-owner, the pack file is left
in place because we do not have permission to
remove it.

We also leave it behind if we bail out early due
to an error, or due to only listing the changes.

This pushes down the creation of the file, and
cleans it up on error.

Also, while we're here, clean up index caching,
and ensure we close the fd in all cases.

thanks to Anthony Martin for spotting the bug.

2 years agokbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.
cinap_lenrek [Fri, 16 Jul 2021 23:36:40 +0000 (23:36 +0000)]
kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.

2 years agowebfs(4): fix typos
kvik [Thu, 15 Jul 2021 18:53:42 +0000 (18:53 +0000)]
webfs(4): fix typos

2 years agolegal: mercurial -> git
cinap_lenrek [Thu, 15 Jul 2021 16:46:16 +0000 (16:46 +0000)]
legal: mercurial -> git

2 years agolegal: remove references to python and mercurial
cinap_lenrek [Thu, 15 Jul 2021 16:43:12 +0000 (16:43 +0000)]
legal: remove references to python and mercurial

THIS IS AN EX PYTHON!!

2 years agoarchacpi: make *acpi=1 the default
cinap_lenrek [Thu, 15 Jul 2021 16:07:54 +0000 (16:07 +0000)]
archacpi: make *acpi=1 the default

2 years agoether82563: add pci id for i219-LM from ThinkPad P17 Gen1 Professional Mobile Worksta...
cinap_lenrek [Thu, 15 Jul 2021 07:50:56 +0000 (07:50 +0000)]
ether82563: add pci id for i219-LM from ThinkPad P17 Gen1 Professional Mobile Workstation (thanks tschak909)

2 years agographics(2): fix typo
kvik [Wed, 14 Jul 2021 20:38:12 +0000 (20:38 +0000)]
graphics(2): fix typo

2 years agopc, pc64: increase confmem slots to 64
cinap_lenrek [Wed, 14 Jul 2021 17:06:28 +0000 (17:06 +0000)]
pc, pc64: increase confmem slots to 64

Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation
comes up with around 36 separate memory ranges.

ridiculous!

2 years agolibaml: fix gc bug, need to amltake()/amldrop() temporary buffer
cinap_lenrek [Wed, 14 Jul 2021 17:04:40 +0000 (17:04 +0000)]
libaml: fix gc bug, need to amltake()/amldrop() temporary buffer

we have to protect the temporary buffer allocated by rwfield()
as rwreg() calls amlmapio() which might cause further aml code
execution causing gc() which frees it under us (as it is not
referenced from the interpreter state).

this fixes a panic on boot of a

Lenovo Thinkpad P17 Gen1 Professional Mobile Workstation

2 years agofs(4): describe the noauth toggle better (thanks izaki)
Ori Bernstein [Mon, 12 Jul 2021 23:47:06 +0000 (23:47 +0000)]
fs(4): describe the noauth toggle better (thanks izaki)

2 years agostrcat(2): 0 → nil in manpage in refrence to pointers
Jacob Moody [Mon, 12 Jul 2021 21:42:39 +0000 (21:42 +0000)]
strcat(2): 0 → nil in manpage in refrence to pointers

2 years agovirtio: set FeaturesOk flag after feature negotiation, and enable queues before Drive...
cinap_lenrek [Sun, 11 Jul 2021 21:49:15 +0000 (21:49 +0000)]
virtio: set FeaturesOk flag after feature negotiation, and enable queues before DriverOk flag

2 years agovmx: reset virtio queue state on device reset
cinap_lenrek [Sun, 11 Jul 2021 12:12:51 +0000 (12:12 +0000)]
vmx: reset virtio queue state on device reset

when a virtio device gets reset, we have to also reset the device
shadow indices: availableidx and usedidx. for extra safetly,
we also reset the buffer descriptor table addresses.

this is accomplished by adding a vioqreset(VIOQueue*) function
that brings the queue to its initial reset state.

this fixes non functional ethernet after reboot(8).

2 years agovirtio: add non-legacy virtio 1.0 drivers for disk and ethernet
cinap_lenrek [Sun, 11 Jul 2021 11:24:13 +0000 (11:24 +0000)]
virtio: add non-legacy virtio 1.0 drivers for disk and ethernet

The new interface uses pci capability structures to locate the
registers in a rather fine granular way making it more complicated
as they can be located anywhere in any pci bar at any offset.

As far as i can see, qemu (6.0.50) never uses i/o bars in
non-legacy mode, so only mmio is implemented for now.

The previous virtio drivers implemented the legacy interface only
which uses i/o ports for all register accesses. This is still
the preferred method (and also qemu default) as it is easier to
emulate and most likely faster.

However, some vps providers like vultr force the legacy interface
to disabled with qemu -device option "disable-legacy=on" resulting
on a system without a disk and ethernet.

2 years agokernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)
cinap_lenrek [Sat, 10 Jul 2021 18:34:22 +0000 (18:34 +0000)]
kernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)

This used to be a internal function, but virtio
uses multiple structures with the same cap type
to indicate the location of various register
blocks in the pci bars so export it.

2 years agoaux/cddb: freedb.org is dead, use gnudb.org
Jacob Moody [Sat, 10 Jul 2021 15:57:46 +0000 (15:57 +0000)]
aux/cddb: freedb.org is dead, use gnudb.org

2 years agomouse(3): mousein is NOT exclusive, see 30907f1d00a7646ccbb420a18f60ccb0bf36e740
Sigrid Solveig Haflínudóttir [Fri, 9 Jul 2021 14:40:23 +0000 (14:40 +0000)]
mouse(3): mousein is NOT exclusive, see 30907f1d00a7646ccbb420a18f60ccb0bf36e740

2 years agorc: add subshell-function syntax
Ori Bernstein [Thu, 8 Jul 2021 21:35:34 +0000 (21:35 +0000)]
rc: add subshell-function syntax

fn foo @{bar} is now equivalent to
fn foo {@{bar}}. As a side effect,
this disallows creating functions
named after keywords without first
quoting them.

2 years agolibsec: take just the CN part of Distinguished Name in subjectAltName
cinap_lenrek [Thu, 8 Jul 2021 20:20:09 +0000 (20:20 +0000)]
libsec: take just the CN part of Distinguished Name in subjectAltName

2 years agofortunes: unremove
Ori Bernstein [Thu, 8 Jul 2021 15:47:49 +0000 (15:47 +0000)]
fortunes: unremove

2 years agofortunes: revision: allow pseudo options after --end-of-options
Ori Bernstein [Thu, 8 Jul 2021 15:21:59 +0000 (15:21 +0000)]
fortunes: revision: allow pseudo options after --end-of-options

2 years agogit: create .git/objects/ on git/init
kvik [Tue, 6 Jul 2021 16:21:18 +0000 (16:21 +0000)]
git: create .git/objects/ on git/init

2 years agovmx: emulate ps/2 intellimouse scrolling
Sigrid Solveig Haflínudóttir [Tue, 6 Jul 2021 15:44:16 +0000 (15:44 +0000)]
vmx: emulate ps/2 intellimouse scrolling

2 years agorsa(8): document auth/x5092pub, fix usage lines
cinap_lenrek [Sun, 4 Jul 2021 22:38:22 +0000 (22:38 +0000)]
rsa(8): document auth/x5092pub, fix usage lines

2 years agolibsec: do proper type checking, fix wrong deduplication check
cinap_lenrek [Sun, 4 Jul 2021 22:28:16 +0000 (22:28 +0000)]
libsec: do proper type checking, fix wrong deduplication check

2 years agolibsec: add X509reqtoRSApub() function and return subject alt names in X509to*pub...
cinap_lenrek [Sun, 4 Jul 2021 22:00:24 +0000 (22:00 +0000)]
libsec: add X509reqtoRSApub() function and return subject alt names in X509to*pub() name buffer

We need a way to parse a rsa certificate request and return the public
key and subject names. The new function X509reqtoRSApub() works the
same way as X509toRSApub() but on a certificate request.

We also need to support certificates that are valid for multiple domain
names (as tlshand does not support certificate selection). For this
reason, a comma separated list is returned as the certificate subject,
making it symmetric to X509rsareq() handling.

A little helper is provided with this change (auth/x5092pub) that takes
a certificate (or a certificate request when -r flag is provided) and
outputs the RSA public key in plan 9 format appended with the subject
attribute.

2 years agogit/export: make output pipable to /bin/mail
Ori Bernstein [Sun, 4 Jul 2021 20:18:37 +0000 (20:18 +0000)]
git/export: make output pipable to /bin/mail

git/export *almost* produces output that can be
emailed with upas using

git/export $commit | mail maintainer@site.com

but, the

From: commit-id date

line that git generates trips it up. Luckily,
'git am' doesn't seem to care much if that line
is missing, so we can simply omit it with no issue.

2 years agolibc: add encode(2) variants for custom alphabets
Ori Bernstein [Sat, 3 Jul 2021 20:03:17 +0000 (20:03 +0000)]
libc: add encode(2) variants for custom alphabets

There are a number of alphabets in common use for base32
and base64 encoding, such as url-safe encodings.

This adds support for passing a function to encode into
arbitary alphabets.

2 years agodevmouse: default to no blanking instead of 30 minute blank timeout
cinap_lenrek [Thu, 1 Jul 2021 23:11:11 +0000 (23:11 +0000)]
devmouse: default to no blanking instead of 30 minute blank timeout

2 years agoupas/Mail: avoid showing empty To: and CC: lines in compose windows
Alex Musolino [Wed, 30 Jun 2021 12:23:45 +0000 (12:23 +0000)]
upas/Mail: avoid showing empty To: and CC: lines in compose windows

2 years agoupas/Mail: fix CC addresses in "Reply All" compose windows
Alex Musolino [Wed, 30 Jun 2021 12:22:28 +0000 (12:22 +0000)]
upas/Mail: fix CC addresses in "Reply All" compose windows

2 years agogit/revert: revert
Ori Bernstein [Tue, 29 Jun 2021 20:03:26 +0000 (20:03 +0000)]
git/revert: revert

the old implementation was correct; we want to
mark it dirty and let walk sort it out.

2 years agogit/revert: fix previous commit (helps if you save the file, thanks qwx)
Ori Bernstein [Mon, 28 Jun 2021 23:40:40 +0000 (23:40 +0000)]
git/revert: fix previous commit (helps if you save the file, thanks qwx)
git/revert: fix previous commit (helps if you save the file, thanks qwx)

2 years agogit/branch: mark files we couldn't update as dirty
Ori Bernstein [Mon, 28 Jun 2021 18:28:08 +0000 (18:28 +0000)]
git/branch: mark files we couldn't update as dirty

2 years agomanual: don't match nonexistent file while preprocessing
Anthony Martin [Sun, 27 Jun 2021 00:13:58 +0000 (00:13 +0000)]
manual: don't match nonexistent file while preprocessing

Authsrv(6) used to be called auth(6) before
the fourth edition and was preprocessed by
eqn(6) before the third edition. The mkfile
was never updated to reflect the changes.

All other files are accounted for:

% cd /sys/man
% for(i in TS EQ PS G1) echo $i `{grep -l '^\.'$i ?/[0-9a-z]*}
TS 1/tbl
EQ 1/eqn 3/usb
PS 1/pic
G1 1/grap
%

2 years agopic(1): restore example section
Anthony Martin [Sun, 27 Jun 2021 00:11:17 +0000 (00:11 +0000)]
pic(1): restore example section

It was erroneously elided when removing
the tpic command in commit 891a8c4f2.

2 years agosegment(3): restore missing phrase
Anthony Martin [Sun, 27 Jun 2021 00:18:49 +0000 (00:18 +0000)]
segment(3): restore missing phrase

It was accidentally removed when documenting
the sticky segment type in commit 99ed9623b.