summaryrefslogtreecommitdiff
path: root/sys/src
AgeCommit message (Collapse)Author
2023-01-14upas/Mail: stop splitting headersOri Bernstein
when sending messages, we do not merge headers, so splitting headers the way we did leads to invalid messages getting sent; stop doing it.
2023-01-14vt: ignore xterm Set/reset key modifier options escape sequencecinap_lenrek
2023-01-14pic: error instead of crashing on nonexistent variablesOri Bernstein
2023-01-12games/midi: fix desyncs after tempo changes in multitrack filesqwx
same as 89c60481afd8307f7825281bd561995f83a7bfb2.
2023-01-11games/dmid: fix tempo changes causing desyncs in multitrack filesqwx
if tempo changes while older events are in flight at different timings in a multitrack file, and since there's no compensation for it, tracks desyncronise, the order of events get jumbled up and everything just falls apart. rather than doing dances with the old code to figure out what corrective factor to apply and where, just use the simplest and most robust way, advance one tic at a time. also add a tracing mode and don't always print useless and annoying warnings.
2023-01-09ssh(1): fix usage and document -X flagcinap_lenrek
2023-01-09sshnet: mount BEFORE /net (preserving /net/tls and /net/dns)cinap_lenrek
2023-01-08look: add -b for specifying numeric baseJacob Moody
2023-01-06libauthsrv: import better passtodeskey() function (from drawterm)cinap_lenrek
2023-01-06libmp: parentesis (from drawterm)cinap_lenrek
2023-01-06libmemdraw: coding style (from drawterm)cinap_lenrek
2023-01-06libauthsrv: deal with signed char in readcons()cinap_lenrek
2023-01-06libc: coding style (from drawterm)cinap_lenrek
2023-01-06devdraw: coding style (from drawterm)cinap_lenrek
2023-01-06libip: avoid parentesis warnings from gcc (from drawterm)cinap_lenrek
2023-01-06libsec: fix inconsistent prototypes for des (from drawterm)cinap_lenrek
2023-01-06> the retunnel logic in the gre code is wrong.cinap_lenrek
> It gets applied to any protocol type that is not pptp > but should only process encapsulated ip4 packets.
2023-01-05nusb/usbd: assign hname to hubscinap_lenrek
For the port control, it can be usefull to refer to a hub by its stable hash name.
2023-01-05nusb/usbd: add /dev/usbhubctl file to control port power and led indicatorscinap_lenrek
Experimental feature: echo portpower <hub> <port> on/off > /dev/usbhubctl echo portindicator <hub> <port> on/off > /dev/usbhubctl Where <hub> is the device number of the hub (as in /dev/usb/epX) and <port> is the port index (1..n). Hub and port numbers can be found by reading /dev/usb/ctl.
2023-01-05devusb: provide usb hub device number instead of address in /dev/usb/ctlcinap_lenrek
The hub address is only usefull for the host controller driver, while userspace really cares about the device number.
2023-01-05nusb/usbd: provide vid and did in device info string for hubscinap_lenrek
2023-01-04ndb/dns: allow specifying local ip addresses for serving dnscinap_lenrek
Allow specifying the local IP addresses that the UDP dns server will listen on when the -s flag is given.
2023-01-03devip: actually put igmp in ip sectioncinap_lenrek
2023-01-03devip: add igmp protocol support to all kernelscinap_lenrek
2023-01-03audio/mixfs: implement flushcinap_lenrek
2023-01-03audio/mixfs: no loopback delaycinap_lenrek
2023-01-03audio/mixfs: fix loopbackcinap_lenrek
2023-01-03audio/screamsend: actually have aux/dial exec screamenc (thanks sigrid!)cinap_lenrek
2023-01-03audio/screamsend: use dial(1)cinap_lenrek
2023-01-03tlsclient: try /bin/$cmd for execcinap_lenrek
2023-01-03tlsclient: keep stderrcinap_lenrek
2023-01-03aux/listen1: write status to standard errorcinap_lenrek
2023-01-03add dial to mkfilecinap_lenrek
2023-01-03dial(1): add dial command similar to plan9portcinap_lenrek
This is similar to plan9port dial(1), but names aux/dial because we already have the expect(1) commands in /bin/dial. One difference is that our dial allows specifying a command, similar to aux/listen1 that will get connected it standard input and output to the network connection.
2023-01-02evdump(1): a program to dump input and window eventsSigrid Solveig Haflínudóttir
2023-01-01mouse: Make /dev/mousein readable to get mouse status without blockingcinap_lenrek
There is currently no way to get the current mouse position and button states without blocking.
2022-12-30libc: fix 32-bit arch vlong->double conversion (thans cosa)cinap_lenrek
Cosa wrote: While trying to run kvik's lu9 on ARM, I found that when converting LLONG_MIN to a double on 32bit systems, the result is wrong (positive instead of negative). Given the following test program: void main() { vlong min = LLONG_MIN; double dmin = min; print("minint %lld\n", min); print("minint as double %f\n", dmin); if (dmin > 0.0) { exits("int min as double turned positive"); } exits(0); } The output on x86_64 will be: minint -9223372036854775808 minint as double -9223372036854776400.000000 But on arm or 386 (and I expect also spim, 68000, mips, 68020, sparc, power, since they all use the same _v2d): minint -9223372036854775808 minint as double 9223372036854776400.000000 And the value turned positive in the conversion. The function used for the cast to double is (in /sys/src/libc/arm/vlrt.c): double _v2d(Vlong x) { if(x.hi & SIGN(32)) { if(x.lo) { x.lo = -x.lo; x.hi = ~x.hi; } else x.hi = -x.hi; return -((long)x.hi*4294967296. + x.lo); } return (long)x.hi*4294967296. + x.lo; } If I understand correctly, the issue is that where it tries to flip the sign for x.hi (x.hi = -x.hi), 0x80000000 has no positive, thus stays the same (it stays negative). Then when we get to the negative return, we get a positive out. What came to my mind then, is that in the case that there is no x.lo, we can keep the x.hi sign and cast directly, thus: double _v2d(Vlong x) {     if(!x.lo) {         return (long)x.hi*4294967296.;     }     if(x.hi & SIGN(32)) {         x.lo = -x.lo;         x.hi = ~x.hi;         return -((long)x.hi*4294967296. + x.lo);     }     return (long)x.hi*4294967296. + x.lo; } This looks correct to me, but I don't trust myself to not make mistakes in such critical code, so I would like some feedback on the change. Happy new year in advance, cosa
2022-12-30sdmmc: switch argument must be integercinap_lenrek
2022-12-30tcp: only create new translation when SYN packetcinap_lenrek
2022-12-30icmp: only forward EchoRequest, Timestamp(request), InfoRequest and ↵cinap_lenrek
AddrMaskRequest
2022-12-29sdmmc: actually implement mmc supportcinap_lenrek
- pass the correct ocr value for SEND_OP_COND (advertise Hcs and 3.3v) - disambiguate SEND_RELATIVE_ADDRESS/SET_RELATIVE_ADDRESS - detect the MMC version from CSD structure - detect the capacity according to spec for MMC - implement SWITCH command to set highspeed frequency and bus width - rename Ctlr to Card (thats really what we keep track of here)
2022-12-29reform/usdhc: fix debug print, R1b response handled by controllercinap_lenrek
The debug print contidion was wrong and would always result in a debug print, even if the command just timed out. The R1b response seems to be handled internally by the controller, so we do not need to wait for datadone interrupt.
2022-12-27boot/reform: bootm if loading the kernel workedSigrid Solveig Haflínudóttir
2022-12-27sdmmc: new interface for SDiocinap_lenrek
We want to support the internal emmc device on the reform, which has a different initialization sequence from SDcard. The problem is, all mmc controller drivers where using the command index to derive the command properties. The command index's interpretation depends on the command set. And MMC has different commands then SD. Also, there are the APP_CMD escaped commands which drivers then tried to recover the state... All of this is total nonsense... The controller drivers should not care and the command properties should be maintained by port/sdmmc.c. So we pass the command as a struct SDiocmd, which has all the properties (command index, response type, data transfer mode... and even a string for debugging). The controller just converts this into register values and just executes the commands. Next, the controller drivers shouldnt snoop on the commands and then try to apply bus and frequency switching on their own. This is now made explicit by having SDio.bus(io, width, speed) function.
2022-12-25auth: use caphash and capuse under /dev instead of #¤cinap_lenrek
2022-12-25libsec: use /net/tls instead of #a/tlscinap_lenrek
Namespace files have been updated and the tls device is now available under /net.
2022-12-25devsrv: Various fixes.cinap_lenrek
Make global variables static to avoid symbol clashes. Order Link fields more compactly for 64-bit archs. Add a common freelink() function for freeing Boards and Srvs. Chain all Boards in a circular doubly-linked list, so srvrename() can actually change the owners of *all* the boards instead of just the root. We cannot use recursion here as that could potentially blow the kernel stack. srvname() was also only processing the root. Instead, we add a srvname field to Chan and set it to the original path of the srv file that was used to post the channel. Call openmode() at the beginning of srvopen(). The reason is if omode has invalid bits it can error and leave stuff in a inconsistent state. Prevent srvwstat() to rename a file to "clone", it is reserved. Get rid of "lease expired" error message, just use Eshutdown.
2022-12-23libc: use /fd instead of #d in iounit()cinap_lenrek
2022-12-23auth/factotum: access /proc instead of #p for private()cinap_lenrek
2022-12-23bootrc: bind devcap and devtls, make /root mount consistent with speccinap_lenrek