Commit graph

10771 commits

Author SHA1 Message Date
Jacob Moody
710b3ec0b6 timezones: Add Indonesia (thanks AlfredPros) 2024-10-17 06:04:51 +00:00
rodri
708ff097a6 libgeometry: add ptincylinder and ptincone 2024-10-14 12:04:35 +00:00
rodri
b6b5e569e9 geometry(2): fix little typo 2024-10-14 11:22:53 +00:00
rodri
65ea63e521 libgeometry: add quaternion sandwich product functions
also took the chance to remove the semicolons from
the function signatures in the manpage synopsis, as
is custom in the other manuals.
2024-10-14 11:14:50 +00:00
Ori Bernstein
84170d89b7 patch: show expected line number for hunk when rejecting it 2024-10-12 14:50:42 +00:00
cinap_lenrek
5285caa05d devusb: prevent double-detach and other invalid state changes
We have to ensure that we do the putep() loop
only once for detach, so serialize the state
transition using ep0 qlock().

Furthermore, once the state is Ddetach, we
must ensure never to set it to something else
(such as Dreset or Denabled).
2024-10-09 21:43:07 +00:00
cinap_lenrek
4df9d68adb devusb: better usbid allocation, fix locking, remove dump ctl
usbid's where globally allocated with a generation counter,
but it would not free usbid's when freed out of order
resulting in overflow.

instead, we use a different scheme, where we allocate the
next higher id until we run out and then allocate the next
lowest id.

properly maintain epmax as well when putep() when out of
order.

make newdev() and newdevep() return the new Ep* with a
reference taken, preventing someone from freeing the ep
under us.

fix the locking, so once we release the epslock, all endpoints
have the ep->dev set properly and remove impossible checks.

remove the annoying "dump" ctl that spams the console.
2024-10-09 20:14:34 +00:00
cinap_lenrek
561926fcbc ether8169: add pci id for RTL8111/8168/8411 (thanks Sylvie) 2024-10-09 19:18:29 +00:00
cinap_lenrek
addf2d55bf test/zones.rc: Fix instability, read current time once.
The test just called date twice assuming they all
execute in the same second. This causes false positives
with the following errors (usually just 1 second
difference):

term% while(){./zones.rc}
/adm/timezone/US_Arizona Sun, 06 Oct 2024 09:09:12 -0700 1728230953 1728230952 are not equal
/adm/timezone/Uruguay Sun, 06 Oct 2024 14:09:17 -0200 1728230958 1728230957 are not equal
/adm/timezone/Japan Mon, 07 Oct 2024 01:09:19 +0900 1728230960 1728230959 are not equal
/adm/timezone/Iran Sun, 06 Oct 2024 19:39:25 +0330 1728230966 1728230965 are not equal
/adm/timezone/Australia_West Mon, 07 Oct 2024 00:09:27 +0800 1728230968 1728230967 are not equal
/adm/timezone/US_Eastern Sun, 06 Oct 2024 12:09:29 -0400 1728230970 1728230969 are not equal
/adm/timezone/GMT Sun, 06 Oct 2024 16:09:31 +0000 1728230972 1728230971 are not equal
/adm/timezone/local Sun, 06 Oct 2024 18:09:34 +0200 1728230975 1728230974 are not equal
/adm/timezone/Mexico_BajaSur Sun, 06 Oct 2024 09:09:36 -0700 1728230977 1728230976 are not equal

The fix is to get the current time once, with date -n
and then pass that to date to format the time and
then concert back and compare.
2024-10-06 16:14:29 +00:00
cinap_lenrek
96bf1d3ebd kernel: remove unused lockstats and make lock() return type void
remove the global statistics counters from taslock.c
as they'r not particularily usefull nor precise
and just cause unneccessary cache traffic.

if we want them back, we should place them into
the Mach structure.

also change the lock() function prototype to return void.
2024-10-06 16:02:13 +00:00
cinap_lenrek
40177b86bf auth/as: dont pollute parents environment or namespace (thanks jrmu, sl) 2024-10-06 02:03:54 +00:00
Ori Bernstein
ddcfc1de22 doctype: fix custom options (thanks sirjofri)
we need to allow '$1' to expand in order to
grow the list of options.
2024-10-05 15:20:27 +00:00
Jacob Moody
6ebfbaa826 isalpharune(2): invalid Runes are just > Runemax 2024-10-05 00:43:38 +00:00
Jacob Moody
698ecf25e5 libc/runeistype: out of range is only > Runemax, Rune is a uint 2024-10-05 00:36:48 +00:00
Ori Bernstein
394e9c2235 libc/runeistype: accept out of range runes
out of range runes should just return 0 for whether
they're within any of the classes.
2024-10-05 00:06:50 +00:00
cinap_lenrek
4d484968bf kernel: avoid recursive lockloop() prints from screenputs() (thanks noam)
We cannot use lock() from screenputs() because lock calls
lockloop(), which would try to print() which on very slow
output (such as qemu) can cause kernel stack overflow.

It got triggered by noam with his rube-goldberg qemu setup:

lock 0xffffffff8058bbe0 loop key 0xdeaddead pc 0xffffffff80111114 held by pc 0xffffffff80111114 proc 339
 panic: kenter: -40 stack bytes left, up 0xffffffff80bdfd00 ureg 0xffffffff80bddcd8 at pc 0xffffffff80231597
 dumpstack
 ktrace /kernel/path 0xffffffff80117679 0xffffffff80bddae0 <<EOF

We might want move this locking logic outside of screenputs()
in the future. It is very similar to what iprint() does.
2024-10-03 20:25:58 +00:00
Ori Bernstein
d8973bdc75 git/export: don't try to diff dirs 2024-10-03 15:36:43 +00:00
Ori Bernstein
8e301036fa merge3: remove unnecessary variables 2024-10-02 21:45:17 +00:00
Ori Bernstein
1cf37db07a merge3: fix funny merge cases and crashes 2024-10-02 21:43:20 +00:00
Ori Bernstein
9fa2b25133 merge3: clamp aligned lines to be within the file. 2024-10-01 18:13:55 +00:00
Noam Preil
0c4e4cb9e9 git/diff: fix -c flag 2024-10-01 12:08:29 +00:00
Noam Preil
91b19a1983 aux/cddb: fix artist line splitting 2024-09-29 15:08:34 +00:00
Noam Preil
be48d656d3 mkmany: check more carefully for test folder 2024-09-17 07:45:01 +00:00
Noam Preil
8624a54632 aux/cddb: support very long artist+album name combos 2024-09-24 06:47:26 +00:00
Noam Preil
dcff4acbb6 git/commit: preserve merge-parents on failed commit 2024-09-22 20:24:16 +00:00
Jacob Moody
f3f659b54b look: fix case sensitivity when using base > 10
Old attempt at this did not make any sense.
Also fix the reference to look in ascii(1) to be more correct.
2024-09-29 18:35:30 +00:00
cinap_lenrek
dc318a6471 git/test: add noam.rc testcase 2024-09-29 17:29:48 +00:00
cinap_lenrek
798352644e git/save: and try again... 2024-09-29 17:28:48 +00:00
cinap_lenrek
0e7690a4f8 git/save: pffff. revert last change... 2024-09-29 16:47:47 +00:00
cinap_lenrek
de7d3753a5 git/save: fix the "noam" bug
git/save gets a list of paths (added or removed)
passed to it, and we have to ALWAYS stat the
file in the working directory to determine the
effective file-type.

There was a bug in the "skip children paths"
loop that would compare the next path element
instead of the full path prefix including
the next element.

reproducer:

	git/init
	touch a
	git/add a
	git/commit -m 'add a' a
	rm a
	mkdir a
	touch a/b
	git/add a/b
	git/commit -m 'switch to folder' a a/b
2024-09-29 16:30:39 +00:00
cinap_lenrek
1c682a98fe ip/ipconfig: make ra limiter less agressive (thanks cgnarne)
For handling route invalidations, we have to allow
short bursts of traffic. Therefore we keep track
of the number of ra's received in the ra interal
and only start dropping packets when reaching 100
packets.
2024-09-29 11:41:50 +00:00
cinap_lenrek
d0f4f620cf walk: qid.vers should be ignored (thanks BurnZeZ)
No idea who committed this in 2022 as its "glenda@9front.local",
but as qid.vers is incremented for each write and we definitely
should not use it as the cache tag.

Also, the initial code was stolen from du.c as the comment says,
and that one does the right thing.
2024-09-23 18:31:46 +00:00
Ori Bernstein
4374194306 git/branch: make it more robust
don't move to new branches or update the index until after
all changes are applied successfully, and the merge attempt
has been made.
2024-09-22 17:06:14 +00:00
cinap_lenrek
772f3099ef git/test: run tests with a temporary install bound to /bin/git
We want to run test before we do the installation
into the system.

So do a temporary install into test/$cputype.git/
direcotry and bind it on /bin/git, that way,
all the scripts run the local source version.
2024-09-16 22:55:40 +00:00
Ori Bernstein
e2fa84d6cd git/serve: we don't do thin packs -- advertise it. 2024-09-16 22:51:25 +00:00
Ori Bernstein
0636bfc774 git/query: process full contents of queue, even with skips
When skipping objects, we need to process the full queue,
because some of the objects in the queue may have already
been painted with keep. This can cost a small amount of time,
but should not need to advance the frontier by more than
one object, so the additional time should be proportional
to the spread of the graph.
2024-09-16 22:48:02 +00:00
Ori Bernstein
d9edee8b1a merge3: correctly handle 1-based closed intervals
the previous bug wasn't a missing clamp, but a
mishandling of the 1-based closed intervals that
we were genrating internally, and some asserts
that assumed open intervals.
2024-09-15 02:22:27 +00:00
cinap_lenrek
1a53aacc60 git/test: improve ftype test (also test dir -> file transition)
The ftype.rc test now tests both: file->dir and dir->file changes.
2024-09-14 19:21:17 +00:00
Ori Bernstein
d03b67430f merge3: fix assert in merge of identical deletions 2024-09-14 15:57:24 +00:00
Ori Bernstein
f63dcb4b9b git/branch: handle dirents changing between file and dir correctly (thanks cinap) 2024-09-13 16:28:32 +00:00
rodri
9482f887f9 jpg/tga: decode TGA32 images into RGBA32 ones 2024-09-12 19:09:40 +00:00
cinap_lenrek
ce97bb4998 merge 2024-09-09 16:54:41 +00:00
aap
79eb47ef8e acme, abaco: render scrollbar like rio 2024-09-09 13:03:15 +00:00
Ori Bernstein
36e5075ded gefs: protect fids with rwlock 2024-09-07 19:00:06 +00:00
qwx
084c9d6eba g: add .in, fix earlier fuckup (thanks mkf)
2d63bdbb44 was pushed modified
compared to the patch actually submitted by mkf, in error.
2024-09-04 19:57:16 +00:00
cinap_lenrek
87cbf8e792 sshnet(4): fix title (thanks arne) 2024-08-31 18:50:25 +00:00
mkf
2d63bdbb44 g: add cxx and hxx 2024-08-31 07:33:30 +00:00
Jacob Moody
9d2f21b2cf ndb/dns: refuse recursive requests harder when given -R (thanks be0ba)
Before we would refuse to recurse, but would still give
a response with hints back. Some nefarious clients will interpret the
lack of a Refused response code as us being an open resolver.
2024-08-31 02:23:05 +00:00
cinap_lenrek
761452154a gefs: clunk dent and mnt when dropping rclose message
When clunking a Fid while the file-system is read
only, dont just free the Amsg, but also drop the
references to dent and mnt.

Make clunkfid() nil fid->rclose, so no reuse
after free is possible.

Make clunkfid() always set the return pointer,
avoid missing prior initialization.
2024-08-30 19:54:26 +00:00
cinap_lenrek
d31382ca17 gefs: fix fidtab locking order in clunkfid()
Do not abuse fidtab lock for serializing
clunking.

The clunk should serialize on Fid.Lock
instead, so add a canlock check here.

The lock order is strictly:

Fid.Lock > Conn.fidtab[x].Lock
2024-08-30 19:16:13 +00:00