Commit graph

10853 commits

Author SHA1 Message Date
cinap_lenrek
473ebd0f9e ndb/dns: don't refuse queries when delegated subareas
We used to always provide soa and ns hints when
we where not authoritative.

This changed with the last commit, where we
would instead return refused error.

But this breaks when we want to explicitely
delegate to another nameserver, so add parameter
to inmyarea() to get the delegated soa out,
and provide delegated nameservers when we have one.
2024-12-14 01:49:55 +00:00
Ori Bernstein
d1b72a27b7 walk: error on mutually exclusive flags 2024-12-12 20:35:58 +00:00
Ori Bernstein
b8797a1cc6 walk: fix skipped files, simplify seen() 2024-12-12 20:17:51 +00:00
Ori Bernstein
e59b7e28cd git: refactor capability parsing
this should be a nop, but set us up better
for handling and exposing capabilities in
git/serve.
2024-12-10 23:15:22 +00:00
Ori Bernstein
e58df8173f walk: show siblings with the same qid
the code for skipping directory loops in
walk was taken from du, but the desired
behavior for the two programs is differnt;

while du wants to count the total size used,
and double-counting directories would be a
mistake, walk wants to enumerate all finite
paths in a namespace.
2024-12-10 23:14:33 +00:00
Ori Bernstein
ace81cb1ae mkfiles: check for test/mkfile when recursing
Some programs have test directories without a test
mkfile; this causes spurious errors. Discriminate
more carefully.
2024-12-10 23:11:44 +00:00
Ori Bernstein
bf398d28c3 cpiofs: add newc support for cpiofs (thanks rminnich)
Linux initrds, uroot file systems, and
others generate newc cpio images; add
support for them.
2024-12-10 23:07:26 +00:00
Ori Bernstein
15f66c69d8 tar: use IOUNIT to compute Dblock 2024-12-10 23:05:38 +00:00
cinap_lenrek
ddaadd65b4 libdisk: cleanname() paths for setname()/mkpath(), avoid utfrrune() 2024-12-09 13:57:39 +00:00
cinap_lenrek
9d552b68e4 nusb/lib: decode classcode() 0xFF -> vendor, 0xFE -> application (-specific) 2024-12-09 13:00:16 +00:00
Ori Bernstein
8e2a071b8b acme/Mail: fix redrawn line offsets, add support for flag filters
maintaining ->nsub was fragile, and didn't save very many cycles;
instead just compute it every time; it's only going to hurt with
a ton of giant threads.
2024-12-09 05:27:05 +00:00
Ori Bernstein
af83b606f9 upas/Mail: Add support for message filtering 2024-12-09 03:58:40 +00:00
cinap_lenrek
aa1e68e9fe nusbrd: pass $usbdebug to nusb/usbd
This can be usefull for debugging usb enumeration issues from boot,
if one has the chance to pass parameters on the bootloader.

It was initially suggested in a troubleshooting session todo as
a quick modification, but it can be usefull in general.
2024-12-09 01:30:16 +00:00
cinap_lenrek
eb52c928b1 nusb/usbd: improve debugging, dont portfail() when port attaches/detaches too fast, cleanup
- always dprint() all the port state transitions.
- when port is attaching in short succession and we'r reaching the limit,
  don't return -1 as that would cause portfail(), return 1 instead
  which would make us ignore it.
- cleanup portattach(), use Dev *d instead of h->dev.
2024-12-08 01:10:41 +00:00
cinap_lenrek
8cc080311f nusb/lib: decode more base class codes in classname() 2024-12-07 15:55:12 +00:00
cinap_lenrek
eab5162760 nusb/audio: fix wrong emallocz() call in getclockrange() 2024-12-07 15:54:07 +00:00
cinap_lenrek
255704232e nusb/usbd: make it less noisy: fprint() -> dprint() 2024-12-06 19:00:30 +00:00
cinap_lenrek
5cc0a1f76d nusb/usbd: impelement warm-reset for usb3 ports, attempt port reset on failed hubs, enable port-power for rootports 2024-12-06 16:10:31 +00:00
cinap_lenrek
2f12ad38ca devusb: handle root-port reset delays outside of hci driver, rootport power control
We want to avoid long delays with interrupts disabled,
so handle the delay from devusb/usbd.

Do not expect SetFeatrue/PortEnable request, this is
invalid by the usb standard. But some HCI's require
setting enable bit in port status/ctrl register of
rootports, so handle this internally.

xhci, dwc and ohci have a power-power control bit,
so implement standard Set/ClearFeature/PortPower in
roothub, which allows us to control port on some
rootports.
2024-12-06 16:07:44 +00:00
Arne
ff65b74935 nusb/joy: support xbox360 controllers
Added a custom hid descriptor for Xbox360 controllers.
Up to six axes are now supported for analog input.
Added a simple deadband filter for analog axes.
2024-12-03 20:21:37 +00:00
Ori Bernstein
0518041867 cc: dont' try compiling invalid code
When we have errors in the code, passing it on to the backend
just generates cryptic or incorrect errors, and in some case,
crashes as we try to process trees with missing labels, or
which are malformed in other ways.

Instead, bail out of codgen() and don't even try.
2024-12-01 22:37:14 +00:00
Jacob Moody
7d13427ccf flambe: right click to plumb functions
also display percentage of base on hover
2024-12-01 00:39:27 +00:00
Jacob Moody
6bc1ec47a0 factotum(4): minor typo 2024-11-30 23:51:18 +00:00
cinap_lenrek
afe12c32f3 nusbrc: add Prolific and CP2102 serial uart
also reorganize the switches: match vid/did first,
then generic device class.
2024-11-24 17:18:59 +00:00
cinap_lenrek
b0f2f4e47d boot/net.rc: redirect grep error to /dev/null
Usb ethernet driver does not serve ifstats file,
so avoid this error showing up on the console.
2024-11-24 17:11:13 +00:00
cinap_lenrek
a77fd25d90 gefs: remove nokill code
After discussion, it was suggested that it might make more
sense to handle the noswap stuff outside of gefs, like
with any other fileserver.

plan9 file-servers are not privileged. one might even run
them in a test script to mount an image.
2024-11-23 17:37:07 +00:00
cinap_lenrek
4ed03dff93 auth/factotum: mount factotum onto /mnt/factotum instead of /mnt by default
Factotum used to mount itself on /mnt and serving the first-level
directory "factotum" itself. This has the undesired consequence
that it has to respond to all walks crossing the /mnt directory.

Instead, we make factotum interpret the previously ignored
mount-spec (aname). If it is "factotum", it serves the
factotum directory as the root, so it can be directly mounted
onto /mnt/factotum. For backwards compatibility, the old
behaviour is preserved.

The namespace file will now always mount factotum onto /mnt/factotum.
In the case of a old factotum, that ignores the mount-spec,
do a bind moving /mnt/factotum/factotum to /mnt/factotum.
2024-11-23 16:05:11 +00:00
cinap_lenrek
0676a1ba51 libpcm: fix buggy use of clip macro (evaluates its arg twice) 2024-11-22 22:47:28 +00:00
Ori Bernstein
b9955e29d1 upas/Mail: don't move cursor when flags are unchanged
when doing bulk operations one after the other, like
mass-marking messages read, the cursor tends to jump
to update the messages, but they're already in the
right state; don't do that.
2024-11-22 16:34:34 +00:00
Noam Preil
03cb81c7a5 usb: support the pine64 UART 2024-11-18 22:22:25 +00:00
cinap_lenrek
dd2ed5326e libmp/convtest: fix format string type warning uint -> %ud and remove unused variables 2024-11-19 01:56:48 +00:00
Ori Bernstein
06d10d96e9 gefs: fix block leak when merging tree nodes 2024-11-18 23:00:21 +00:00
Ori Bernstein
9ad3c2d098 git/save: handle all cases correctly when walking args 2024-11-18 20:34:35 +00:00
Ori Bernstein
9fcb4c0896 git: make tests less verbose 2024-11-18 20:33:17 +00:00
Ori Bernstein
d41236fef5 git/walk: dirs should not count as tracked 2024-11-18 20:24:17 +00:00
Ori Bernstein
06cdd2915b git/merge: normal messages go to stdout 2024-11-18 20:23:54 +00:00
cinap_lenrek
d58ba675e7 kernel: reorganize bootfs.paq generation
We do not want to unconditionally pull in all of
/lib/firmware, when we dont have the driver for it.

So group the files into separate proto-files
and make boot/bootmkfile simply checks that the basename
of a proto file matches the basename in $OBJ to be
considered.

This way, we can also avoid including user-space usb
daemon when the kernel lacks the usb driver.

Same for machines without devsd, devfs or devusb,
theres no disk so no reason to include disk file
servers.

The bootfs.paq file is specific to the configuration,
so give it a unique name. (Just using bootfs.paq
is fine as long as theres only a single configuration,
but i want to avoid future mistakes as people copy-paste
the kernel configuration).
2024-11-16 17:49:28 +00:00
cinap_lenrek
a1b80da11f sdodin: fix set but not used warning 2024-11-16 04:24:14 +00:00
cinap_lenrek
14c36f2b16 kernel: remove unused cruft: delaylink, normalprint 2024-11-16 03:37:45 +00:00
cinap_lenrek
705638e189 pc, pc64: refactor pcibios code so we dont pollute the amd64 kernel
We can move the pcibios code to its own module
and just provide a stub pcibiosinit() function
for pc64 so we do not have to pull in that code
and the data structures.

also lets us clean up mkdevlist hacks.
2024-11-15 23:20:28 +00:00
Jacob Moody
6b8c36d51f devip: correctly return when allocating an ipmedium slot
Previous patch attempted to panic when we ran out of slots,
however the loop needed changes to return early to avoid
the failure case.
2024-11-15 01:06:54 +00:00
cinap_lenrek
3f7a323e31 devip: panic if we exceed the number of media entries (thanks k0ga) 2024-11-13 19:31:12 +00:00
Ori Bernstein
b4e8108d6c git/save: sort argv lexicographically
our code assumed that the inputs were sorted, and
that scanning forward by prefix would group the dirs
by prefix. Sort so that assumption is true.
2024-11-10 01:31:25 +00:00
cinap_lenrek
e4373dd103 ip/pppoe: properly zero-pad ethernet frames, optimize framing, limit mtu
we should properly zero-pad the ethernet frames we send out
instead of sending random garbage.

for ppp -> ethernet, the ethernet header is fixed, so we
can generate it once before the read()/write() loop.

Use a 1514 byte buffer for all ethernet frames as the
maximum, and limit the mtu to 1514-14-8 -> 1492.
2024-11-07 21:24:27 +00:00
Ori Bernstein
aeb857e367 acme/Mail: provide runnable command to view html 2024-11-07 20:51:09 +00:00
Jacob Moody
15ceba4fc9 git: fix off by one in strncmp 2024-11-07 00:40:57 +00:00
Jacob Moody
7276be7b2d /sys/lib/dist/ndb/common: add git and gits 2024-11-07 00:40:35 +00:00
cinap_lenrek
c51566faa7 cpurc, termrc: actually, gefs not needed, still, keep it sorted (thanks ori) 2024-11-03 17:05:45 +00:00
cinap_lenrek
33efe0a189 cpurc, termrc: dont kill gefs 2024-11-03 15:16:42 +00:00
cinap_lenrek
ca672123ca cpurc: use ndb/query -cia instead of ndb/ipquery
ndb/query -a already returns the value without
the attribute name when given a single rattr
so sed pipeline can be avoided.

also use -c flag to query ndb/cs, which has
a cache of the network database.
2024-11-03 15:10:48 +00:00