Commit graph

9230 commits

Author SHA1 Message Date
Jacob Moody
00b7d2385a kernel: add chdev command to devcons 2022-05-30 21:55:39 -04:00
glenda
54328d2e65 /lib/theo: This is a bug in a diff I put into snapshots. 2022-05-30 21:55:39 -04:00
Michael Forney
9b19835bd4 tmparse: remove incorrect isalpha definition
Checking the range of c|0x60 incorrectly classifies many characters
as alphabetic (digits, control characters 0x01-0x20, and punctuation
characters '!'-':'). This prevents tmparse from parsing dates with
a timezone bounded by those characters (for example, "12:11:56 (PDT)").

Instead, just reuse the isalpha macro provided by ctype.h.
2022-05-30 21:55:39 -04:00
Ori Bernstein
24e5308c2a kbmap: add latin american keymap (thanks ssf) 2022-05-30 21:55:39 -04:00
Ori Bernstein
7c71da0344 diff: clean up some comments
I did the tidying and fixes. Let's remove those
comments.
2022-05-30 21:55:39 -04:00
Ori Bernstein
8eb33669cd patch(1): remove bell labs patch scripts
bell labs is dead, and nobody is listening; 9front
has our own patch submission proces.
2022-05-30 21:55:39 -04:00
Ori Bernstein
8eedca7656 diff: retain original file names
When diffing non-regular files, like /dev/null,
pipes, and similar, diff will generate a temp
file to diff against. This is the right thing
to do, but the temp file leaks into the diff.

This patch retains the original file name all
the way through to diff output.
2022-05-30 21:55:39 -04:00
Ori Bernstein
1bb7aa60c4 diff: fix style
remove useless macros, bring formatting closer
to regular 9front formatting, and use the
ARGBEGIN/ARGEND macros. No functional change.
2022-05-30 21:55:39 -04:00
Ori Bernstein
9a1428f41a git: improve error on short read
we don't recover from an invalid packet, so just
sysfatal with a useful message.
2022-05-30 21:55:38 -04:00
Jacob Moody
8fbfba1ecf aux/listen: remove Service struct
An announcing process already knows what port
it announced on, we don't need to derive it
from every connection.
2022-05-30 21:55:38 -04:00
Jacob Moody
1da69597bd aux/listen: remove argument clutter
addr and proto are globals. protodir should be
a global. let's also avoid reading the remote
addr more then once.
2022-05-30 21:55:38 -04:00
Jacob Moody
a1e3ba1b6d aux/listen: remove unused cpu global 2022-05-30 21:55:38 -04:00
Jacob Moody
9e414386d4 kernel: remove dead case from devpipe
This code is checking the return of devwalk for
a walk resulting in a clone of an open pipe file. However,
devclone ensures that the chan we are cloning is not
currently open.
2022-05-30 21:55:38 -04:00
Jacob Moody
5f49f8ac9c aux/listen: remove special cases for depreciated datakit
The getserv function has remained mostly unchanged since
1ed. These checks are for handling string local ports
or lack thereof. This was used by datakit at the time,
where 'ports' were service strings. This made the default
datakit service 'login' when a connector did not give
a specific service. The checks for directory traversal also
seemed specifically to guard against a connector from providing
a malicious service string. With datakit gone all current protocols
use numerics as ports so these checks and defaults become uneeded.

1ed reference:
https://github.com/plan9foundation/plan9/tree/1e-1992-09-21
2022-05-30 21:55:38 -04:00
Ori Bernstein
b360a7c765 git/merge: correctly preserve permissions when merging
when doing a 3 way merge of a file, we also need to do a
merge of the permission bits to avoid clobberign them.
2022-05-30 21:55:38 -04:00
Sigrid Solveig Haflínudóttir
2bb988b1e2 icanhasvmx: our vmx requires unrestricted guest too 2022-05-30 21:55:38 -04:00
Jacob Moody
2c7f86e0d4 fork(2): fix commas in RFNOMNT references 2022-05-30 21:55:38 -04:00
cinap_lenrek
ecb5eab76b imx8: add xhci driver for the soc
This is mostly a copy of port/usbxhci.c with PCIWADDR() replaced
by PADDR() and the pci specific code stripped out.

This could be refactored at a later time.

There is a gpio line for the main hub reset that needs to be
asserted and some power management functions that are currently
done by u-boot (using "usb start" command).

We will do these ourselfs once we have the infrastructure for
it in place.
2022-05-30 21:55:38 -04:00
Sigrid Solveig Haflínudóttir
577a537d65 g: add .ha (Hare) 2022-05-30 21:55:38 -04:00
Jacob Moody
760f18ff4a kernel: disable wstat for devpipe 2022-05-30 21:55:38 -04:00
Jacob Moody
11c0f4e7dd fork(2): fix parens in RFNOMNT references (thanks Amavect) 2022-05-30 21:55:38 -04:00
Xiao-Yong Jin
5eda53a050 vt: increase buffer size
This patch increases the buffer sizes in vt(1) to reduce
the latency from the roundtrip between terminal and cpu
server.
2022-05-30 21:55:38 -04:00
Jacob Moody
32235c2e41 fork(2): Document RFNOMNT edge cases. 2022-05-30 21:55:37 -04:00
Alex Musolino
dcbede5281 inst/prepdisk: fix invocations of test(1)
Test(1) was fixed some time ago [1] to properly parse all of its
command line arguments.  As such, we need to be more careful about
using test(1) with globbing patterns.

[1] changeset b562b269ce
2022-05-30 21:55:37 -04:00
qwx
fc17fc5151 /rc/bin: amend usage misdirections (thanks umbraticus) 2022-05-30 21:55:37 -04:00
cinap_lenrek
5a7ed2e652 uartimx: fix interrupts
need to turn off transmitter fifo interrupt when we run out of
data to transmit, and set rx fifo ready fifo threshold to one.
2022-05-30 21:55:37 -04:00
cinap_lenrek
cb8e638d2a imx8: implement psci calls for system reset and multicore startup 2022-05-30 21:55:37 -04:00
cinap_lenrek
cb92827769 remove empty /sys/src/cmd/cpu.c 2022-05-30 21:55:37 -04:00
cinap_lenrek
22934e123c imx8: add work in progress i.MX8MQ kernel for the mntreform2 laptop
This is a work in progress port to the mntreform2 laptop.

Working so far:

- mmu (same as raspberry pi 3b+)
- arm generic timer
- gicv3
- uart1
- enet

With access to the uart, one can netboot this kernel in u-boot
using the following commands:

> dhcp
> bootm
2022-05-30 21:55:37 -04:00
cinap_lenrek
08a2cd30ba kernel: fix noteid change race condition from devproc while forking (thanks joe7)
devproc allows changing the noteid of another process
which opens a race condition in sysrfork(), when deciding
to inherit the noteid of "up" to the child and calling
pidalloc() later to take the reference, the noteid could
have been changed and the childs noteid could have been
freed already in the process.

this bug can only happen when one writes the /proc/n/noteid
file of a another process than your own that is in the
process of forking.

the noteid changing functionality of devproc seems questinable
and seems to be only used by ape's setpgrid() implementation.
2022-05-30 21:55:37 -04:00
umbraticus@prosimetrum.com
7d01c96ada sam: ignore autoindent in cmd window 2022-05-30 21:55:37 -04:00
phil9
4148ebcf0e mothra: make scrollbar style consistent with other applications
Scrollbar was drawn using a wide dark gutter over a white background
	whereas other applications (window, sam, ...) use a thinner scrollbar with an
	inverse colorscheme.
	This makes the scrollbar more consistent with other 9front applications.
2022-05-30 21:55:37 -04:00
phil9
cc9d153723 mothra: enable mousewheel scrolling in history list
In the history list, scrolling was only possible using the scrollbar
	but not the mousewheel like in the text panel.
2022-05-30 21:55:37 -04:00
Ori Bernstein
826d64c11c rc: squelch 'Write error' warning
When writing to a large variable in /env, we
spam 'Write error', in spite of the env var
working. This is new behavior, as of commit
b90036a062.

It produces a lot of scary, noisy warnings,
which are probably bogus.
2022-05-30 21:55:37 -04:00
Ori Bernstein
71d2bfabfc git/pull: remove '-b' and '-a' option
we do the right thing by default now, let's not
add knobs that nobody cares about.
2022-05-30 21:55:37 -04:00
Ori Bernstein
fd3ab99fa9 git/common.rc: create required directories
we forgot a couple of directories when branching.
2022-05-30 21:55:37 -04:00
Ori Bernstein
4f3d5d083b git: rename internal 'git/fetch' plumbing to 'git/get'
This caused some confusion, so to make it clear that
it's plumbing and has nothing to do with 'git fetch',
rename it.
2022-05-30 21:55:37 -04:00
Ori Bernstein
0375d0a3ab git/send: fill in 'theirs' object, even if we miss it
When pushing, git/send would sometimes decide we had all the
objects that we'd need to update the remote, and would try
to pack and send the entire history of the repository. This
is because we only set the 'theirs' ref when we had the object.

If we didn't have the object, we would set a zero hash,
then when deciding if we needed to force, we would think
that we were updating a new branch and send everything,
which would fail to update the remote.
2022-05-30 21:55:37 -04:00
Ori Bernstein
7ab99af0ea git/serve: log correct error message
Sending the packet on failure could junk the errstr,
so set it after we send the message.
2022-05-30 21:55:37 -04:00
Ori Bernstein
dba98f649c git/merge: preserve exec bit correctly
A while ago, qwx noticed that we clobbered the exec
bit when merging files. This is not what we want, so
we changed the operator precedence to avoid merging
dirty files implicitly.

But we do want to merge, because it's convenient for
maintaining permissions. So, instead, we should do a
3 way merge of the exec bit.

This patch does that, as well as reverting the rollback
of that change.

While we're here, we adjust the timestamps correctly
in git/branch.

This requires changes to git/fs, because without an open
handler, lib9p allows opening any file with any mode,
which confuses 'test -x'.
2022-05-30 21:55:36 -04:00
Ori Bernstein
6949c4a707 git/pull: fetch all branches (please test)
there was a diff that went in a while ago to improve
this, but it got backed out because it encounters a
bug in upstream git -- the spec says that a single
ACK should be sent when not using multi-ack modes,
but they send back multiple ones.

This commit brings back the functionality, and works
around the upstream git bug in two different ways.

First, it skips the packets up until it finds the
start of a pack header.

Second, it deduplicates the want messages, which
is what seems to trigger the duplicate ACKs that
cause us trouble.
2022-05-30 21:55:36 -04:00
umbraticus@prosimetrum.com
6730cc562d make = command's output plumbable
This patch makes sam's = cmd output what seems to me a more
useful (plumbable) format: /full/path/to/file:addr , where
addr is line(s) under = and rune(s) under =#.
2022-05-30 21:55:36 -04:00
glenda
c7e0f3b65f /rc/bin/9fs: case 9front: restore extra/ and iso/ 2022-05-30 21:55:36 -04:00
Michael Forney
d2942d4de3 git/import: squash leading/trailing/consecutive blanks and strip trailing space
This fixes importing patches with multiline commit messages generated
by git-format-patch.  It also matches commit message sanitation done
by git-am.
2022-05-30 21:55:36 -04:00
glenda
fe1b02113e /rc/bin/9fs: fix case 9config for new contrib.9front.org server. 2022-05-30 21:55:36 -04:00
cinap_lenrek
36b0897a42 aux/aout2uimage: fix text section size rounding (for data section alignment)
the a.out header is not considered part of the image and
should not be loaded. it also has no contribution to the
rounding of the text section size.
2022-05-30 21:55:36 -04:00
rodri
ddabc765ca 9pqueue(2): fix typo 2022-05-30 21:55:36 -04:00
cinap_lenrek
185ced3d1e sol(8): fix example (vncv vs vnc) 2022-05-30 21:55:36 -04:00
cinap_lenrek
4d1c1f5c6e ip/sol: handle timeout on password entry for digest auth 2022-05-30 21:55:36 -04:00
cinap_lenrek
eb81b7602c ip/torrent: fix silly readn() error check (thanks pr) 2022-05-30 21:55:36 -04:00