Commit graph

10370 commits

Author SHA1 Message Date
Ori Bernstein
ae2bb7f3ea cpp: remove trigraphs
even WG14 dropped support for them.
2023-09-26 01:21:54 +00:00
Ori Bernstein
73862cb9cf error(5): revert accidental commit 2023-09-26 01:12:35 +00:00
Ori Bernstein
fd8a2d81c3 git/walk: only show untracked paths matching requested prefix 2023-09-26 01:09:32 +00:00
Ori Bernstein
27a696b145 manpages: we don't need to execute manpages 2023-09-26 00:59:28 +00:00
Ori Bernstein
357e58699e git(1): document flag to show unused files 2023-09-26 00:58:18 +00:00
Ori Bernstein
266881b459 git: replace index format for ~200x speedup
his change replaces our index format with a flat file, where
each line is in the form of:

	T qid mode path
	R qid mode path
	A qid mode path

where T is a tracked file, R is a file that's flagged for
removal, and A is a path that is added but not yet committed.
Lines may be repeated, and the last line in the file is used
to represent the status of a path.

The QID is in the index so that we can short circuit reading
the full contents if the file has not been changed. The mode
is there to avoid stats and walks through the git repository.

If the qid is NOQID or the mode is 0, then the git repository
contents are consulted to decide if the file is the same.

Tested on the 9front repo:

	Old walk:

		@{cd / && time /sys/src/cmd/git/6.owalk -q}
		0.08u 1.73s 2.82r 	 /sys/src/cmd/git/6.owalk -q  # status= DM

	New walk:

		@{cd / && time git/walk -q}
		0.05u 0.02s 0.12r 	 git/walk -q  # status= RM
2023-09-25 22:03:42 +00:00
Ori Bernstein
5af61e3127 git/fs: when statting an object, generate a correct qid
we need to pass the parent crumb, not the child crumb,
in order to deduplicate correctly against the parent.
2023-09-26 00:03:49 +00:00
kemal
1db8008a2e rc: use IOUNIT for io NBUF 2023-09-23 23:52:39 +00:00
Ori Bernstein
dbba801664 libmach: set errstr if we can't find a SP for a PC
this makes acid errors when you jump off the deep end
a bit less confusing.
2023-09-22 23:02:40 +00:00
Russ Cox
3504122012 acme: add font control message 2020-07-18 23:52:58 +00:00
Ori Bernstein
4e5f39796d hg: actually remove hg this time 2023-09-22 15:52:08 +00:00
Ori Bernstein
e94f3a1667 hg: remove forgotten traces
oops, forgot to delete it when python went away.
2023-09-22 15:42:06 +00:00
theowner
5e2071caec bcm64: add i2c for pi3 2023-09-21 17:57:13 +00:00
theowner
ae146ac10b bcm64: add i2c for pi3 2023-09-21 17:54:44 +00:00
Ori Bernstein
c4c072ae97 diff: generate no-newline directives
when we have a file that ends without a newline,
we now generate a directive to mark it.
2023-09-21 16:56:17 +00:00
Ori Bernstein
0123946b8d patch: support no-newline directives
When we get a patch with a:

  \ No newline at end of file

directive, we now apply it correctly,
removing the newline. We generalize
a bit, allowing any line to trim a
newline, giving a primitive form of
line splitting
2023-09-21 16:55:06 +00:00
Jacob Moody
ab50c20254 games/aout2gba: allow either ARM or ARMB mach type
libmach now recognizes gba aout files as 'boot images'
so this check needs updated.
2023-09-20 19:33:48 +00:00
Jacob Moody
a7a315bff6 libmach: fix dropped header in last commit 2023-09-20 19:31:37 +00:00
Jacob Moody
2e8a4a690e libmach: thumb support
Most of this code is imported
from inferno with some modifications.
This allows us to disassemble thumb and
mixed thumb/arm binaries. Source line lookup
is still not correct for either thumb or mixed
binaries due to bugs in tl compounded with the lack
of support for variable size mach.pcquant in libmach.
2023-09-20 18:09:33 +00:00
Ori Bernstein
9d9da40fd2 diff: don't flush on every line
there's no reason to use bio if you flush every time.
2023-09-20 17:46:34 +00:00
Keegan Saunders
1ae5fc01a6 boot/efi: add arm64
This means we can now boot kernels on arm64 EFI platforms.
As well, porting additional architectures to our EFI boot
should now be much simpler.

Due to the nature of EFI relocations, this is a peculiar
code environment for 7l and requires extra care. See
rebase for more information.
2023-09-19 01:40:56 +00:00
Jacob Moody
5f4e2670b4 eui: draw in seperate proc
copied from doom.
2023-09-18 23:36:13 +00:00
Ori Bernstein
26e4a18e70 patch: fix offsets in reverse mode
we would not swap all of the fields in the forward
and reverse modes for patch, which means that we
may accidentally make a hunk unfindable if the line
numbers matcch up correctly.

This does the reverse in a less ad-hoc way, just
swapping the forward and reverse hunks once in
one place. It also swaps all of them.
2023-09-18 16:34:33 +00:00
Kristo
172dc0005a libjson: make sure string contains only a single JSON value 2023-08-07 15:29:08 +00:00
qwx
597ff0b596 games/mid2s: fix usage string 2023-09-18 01:27:45 +00:00
cinap_lenrek
c1d40df495 devip: fix comment ifc->id -> ifc->ifcid 2023-09-17 20:25:18 +00:00
cinap_lenrek
f39abb2923 devip: run Medium.unbind() with ifc->conv released, cleanup
Medium.unbind() must run with ifc->conv unlocked
as mediumunbindifc() holds it while determining
if it should also unbind causing a potential
deadlock.

Note that ipifcnind() and Medium.bind() is run
with ifc->conv locked, delaying mediumunbindifc()
after ipifcbind() completes.
2023-09-17 20:12:20 +00:00
kemal
da308716c7 audiohda: detect hda devices using pci class id 2023-07-27 18:25:14 +00:00
Keegan Saunders
16a0a1066f add aux/aout2efi
We use hand-crafted PE headers in assembler, but those are not
available on platforms such as arm64 which enforce a 4-byte
instruction alignment. Instead, take the same approach as
aout2uimage and perform conversion during build time.
2023-09-17 17:35:24 +00:00
Jacob Moody
3ce0347ef3 ktrans: more tests, telex rewrite, small chinese fix 2023-09-17 00:51:26 +00:00
cinap_lenrek
556618eb07 sysupdate: use the rc -b flag to keep sysupdate in memory
when /rc/bin/sysupdate gets updated itself during a sysupdate,
rc gets confused when continuing reading the original file,
but it gets data from the updated file causing confusion.

the -b flag forces rc to read the original file as a whole
before starting execution preventing this issue.

updating this should be fine as the file has been shrunk
from 230 bytes to 224 bytes.
2023-09-17 00:36:51 +00:00
cinap_lenrek
e182ec11fb devip: automatically unbind interface on read errors
netdevmedium and ethermedium should unbind the interface
if one of the reader procs encounters an error,
such as a usb ethernet device being un-plugged.

netdevmedium already attempted something like this,
but without considering the locking as we need to
acquire the ipifc conv qlock for adjusting the
inuse ref counter.

this change adds a mediumunbindifc() function to
be used by the medium to unbind from its interface
asynchronously from its reader procs.

the call eigther succeeds (returning nil)
meaning the Medium.unbind function was executed
and the auxiolary structure has been freed,
or retunrs an error (when Medium.unbind was called
before) and we just clear our Proc* pointer.
2023-09-17 00:16:24 +00:00
cinap_lenrek
354273938c devi2c: expose the I2Cdev structure to the controller.
some i2c controllers might be rather constrained and need
information like the sub-address size, which is contained
in the I2Cdev structure, so pass that to the bus->io function
instead of the I2Cbus pointer.
2023-09-16 23:35:33 +00:00
Keegan Saunders
86b470d877 kernel: move virtio10 drivers to port
These drivers are also known to work on arm64, so make them available
2023-09-15 22:29:01 +00:00
Sigrid Solveig Haflínudóttir
83f489cf5d doom: run audio in its own proc; can stop frame-dropping as well 2023-09-15 20:56:36 +00:00
Sigrid Solveig Haflínudóttir
4a4d141f1f doom: wait explicitly for convproc to exit before running getwindow on resize 2023-09-15 18:15:09 +00:00
Sigrid Solveig Haflínudóttir
a0a3bf21bc doom: faster palette→rgb conversion for arm64; fix convproc channel handling 2023-09-15 18:04:25 +00:00
Sigrid Solveig Haflínudóttir
a523ce1282 doom: draw in a separate proc 2023-09-15 01:16:48 +00:00
rodri
c8b7380071 /lib/keyboard: fix subscript small letter n. add super/sub small letter i 2023-09-13 19:05:18 +00:00
qwx
140ca8fb11 games/doom: don't crash on invalid music selection with idmus cheat
see also: https://doomwiki.org/wiki/IDMUS_requests_invalid_music
2023-09-13 05:22:32 +00:00
Sigrid Solveig Haflínudóttir
526f63106b reform/pm: fix lcd pwm cycle setting precision 2023-09-12 11:00:18 +00:00
Sigrid Solveig Haflínudóttir
d602374635 7c: replace {CMP $0,…; Bcond} with CB[N]Z/TB[N]Z when possible 2023-09-11 13:53:53 +00:00
Ori Bernstein
a3c75553b4 git/fs: preserve mode bits when walking branch dirs
when walking through a nested branch directory, we may not
set the DMDIR bit and confuse things.
2023-09-11 00:05:39 +00:00
Ori Bernstein
9e79d82905 merge3: handle edge cases where we remove lines 2023-09-10 23:46:55 +00:00
Sigrid Solveig Haflínudóttir
e0d12942e0 7l: define missing TBZ/TBNZ relation 2023-09-10 17:43:44 +00:00
Ori Bernstein
9fabc3bb22 cdfs: use IOUNIT for maxrpc (thanks Arne Meyer) 2023-09-09 21:54:28 +00:00
mia soweli
41a932f370 webcookies(4): cookiefs -> webcookies 2023-09-08 14:23:59 +00:00
Sigrid Solveig Haflínudóttir
2efc26f24c nedmail: set $% to the full path of the current message 2023-09-08 13:48:54 +00:00
qwx
af848f1765 games/doom: remove dead code
missed from commit e5c7fe6305
2023-09-08 00:21:27 +00:00
Sigrid Solveig Haflínudóttir
92e9b85b04 7c: add from3 support (no functional change) 2023-09-07 15:30:41 +00:00