summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-10usbxhci: fix wrong control endpoint 0 output device context addresscinap_lenrek
the calculation for the control endpoint0 output device context missed the context size scaling shift, resulting in botched stall handling as we would not read the correct endpoint status value. note, this calculation only affected control endpoint 0, which was handled separately from all other endpoints.
2020-05-09fix '%[]' specifiers and '%n' (thanks phil9)Ori Bernstein
When a match() fails, we need to unget the character we tried to match against, rather than leaving it consumed. Also, we can't break out of a conversion before we reach the end of a format string, because things like the '%n' conversion do not consume anything, and should still be handled.
2020-05-08nusb/kb: add quirks for Elecom HUGE trackballkvik
As said in the code comment: Elecom trackball report descriptor lies by omission, failing to mention all its buttons. We patch the descriptor with a correct count which lets us parse full reports. Tested with: Elecom HUGE (M-HT1DRBK, M-HT1URBK) The descriptor fixup is adapted from Linux kernel: drivers/hid/hid-elecom.c in which a more detailed account of why and how this works may be found. A followup change to nusb/kb will be needed to expose these additional events for potential remapping.
2020-05-07mergecinap_lenrek
2020-05-07bcm64: fix kernels cmpswap() functioncinap_lenrek
spectacular bug. cmpswap() had a sign extension bug using sign extending MOV to load the old compare value and LDXRW using zero extension while the CMP instruction compared 64 bit registers. this caused cmpswap with negative old value always to fail. interestingly, libc's version of this function was fine.
2020-05-07fix typo: mouse->xy, not w->mc.xyOri Bernstein
2020-05-07aux/getflags: remove rogue debug printkvik
2020-05-06bring stdint.h closer to specOri Bernstein
C99 requires that if intXX_t types are defined, int_fastxx_t and int_leastxx_t types are defined as well. We define all three to be identical (intXX_t == int_fastXX_t == int_leastXX_t).
2020-05-07aux/getflags: improve flagfmt parserkvik
This makes the flagfmt parser more robust and accepting a looser input language — namely by allowing whitespace around specifier fields and ignoring any empty fields. Long flagfmts can thus be pleasingly displayed: flagfmt=' a, b, c, C:cache, m:mtpt mountpoint, s:srvn srvname'
2020-05-06Reset click count on mouse motion.Ori Bernstein
2020-05-04tmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks ↵Sigrid
sirjofri)
2020-05-04add missing /sys/lib/tmac/me files (thanks sirjofri)Sigrid
2020-05-02make bind(2) error handling consistentcinap_lenrek
The mount() and bind() syscalls return -1 on error, and the mountid sequence number on success. The manpage states that the mountid sequence number is a positive integer, but the kernels implementation currently uses a unsigned 32-bit integer and does not guarantee that the mountid will not become negative. Most code just cares about the error, so test for the -1 error value only.
2020-05-02libdraw: fix mount() error handling in newwindow()cinap_lenrek
2020-05-02sed: accept and ignore -E and -r flags for unix compatibilitycinap_lenrek
2020-05-02ip/cifsd: implement primitive per-share unix id mapping for wstat()cinap_lenrek
2020-05-02mergecinap_lenrek
2020-05-02ether82543gc, ether82557, ethervirtio: do kproc() call ouside of spinlockcinap_lenrek
2020-05-01use #error when missing defineOri Bernstein
This makes it easier to figure out what's going wrong when we forget to define _POSIX_SOURCE.
2020-04-28mergeOri Bernstein
2020-04-28facelift for mothra: flat ui is in.Ori Bernstein
Remove false 3d, add borders for visual separation between content area and navigation area.
2020-04-28libsec/base58enc: null-terminate the resultSigrid
2020-04-27missing headers rate a FATAL.Ori Bernstein
2020-04-27lib9p: reject reads on closed fids and writes on directoriescinap_lenrek
mischief provided the following test that shows the issue: ramfs -S crash aux/9pcon /srv/crash <<EOF Tversion 8192 9P2000 Tattach 0 -1 $user '' Tcreate 0 dir 020000000777 0 Tattach 5 -1 $user '' Twalk 5 6 dir Tread 6 0 512 EOF the problem is that lib9p wrongly allowed reads on closed fids, due to the permission check only considering the lower 2 bits. a closed fid has fid->omode == -1 and it would pass on read for: (-1 & 3) == 3 == OEXEC the following change explicitely checks for for the closed case and also rejects writes on directories (they are rejected on open/create, but a broken 9p client could still issue the request).
2020-04-26mergecinap_lenrek
2020-04-26kernel: improve page reclaimation strategy and lockingcinap_lenrek
when reclaiming pages from an image, always reclaim all the hash chains equally. that way, we avoid being biased towards the chains at the start of the Image.pghash[] array. images can be in two states: active or inactive. inactive images are the ones which are not used by program while active ones aare. when reclaiming pages, we should try to reclaim pages from inactive images first and only if that set becomes exhausted attempt to release text pages and attempt to reclaim pages from active images. when we run out of Image structures, it makes only sense to reclaim pages from inactive images, as reclaiming pages from active ones will never free any Image structures. change putimage() to require a image already locked and make it unlock the image. this avoids many pointless unlock()/lock() sequences as all callers of putimage() already had the image locked.
2020-04-26mothra: fix a few errors in previous patchqwx
- nil check pl_blue allocation, and don't do it every time pl_rtdraw is called - fix re-adding previously removed flushimage calls - correct format for pointer - sysfatal in pl_drawinit on error
2020-04-26copy all the tokens from the tokenrows with a paste.Ori Bernstein
if we do 'CAT(foo bar, baz quux)', the resulting token row should have 3 tokens: 'foo', 'barbaz', 'quux'. tested by jonasa, rebuilding /sys/src, perl, netsurf, and nuklear.
2020-04-26add missing header change (thanks qwx)Ori Bernstein
2020-04-25Support for neo2 keyboard layoutOri Bernstein
Modify aux/kbdfs to work with neo2 layout. - add new modifier, increase limit on layers. - Add Kaltgr for mod3 - Add mod4 This change only implements the alphanumeric block of the keyboard in the kbmap, as neo2 is mainly used for blind typing and is not needed that much anywhere else, this leaves the numpad like it is. (Thanks, jstsmthrgk@jstsmthrgk.eu)
2020-04-25mothra: make user interface monochromestanley lieber
2020-04-25mothra: remove extraneous lines and decoration (fake 3d). patch extracted ↵stanley lieber
from my forked mess by Ori_B.
2020-04-25tweak selection criteriaOri Bernstein
grow selection from point of click, not start of selection region. starting at the beginning of the selection region causes the match logic to kick in, which is confusing.
2020-04-25cc: simplify macexpand() and off-by-one errorcinap_lenrek
the caller of macexpand() needs one more byte in the buffer to append peekc. make macexpand() actually check for buffer overflow. just use strdup() to duplicate include file name instead of the hunk dance. move GETC() macro in cc.h
2020-04-25fix typos in time calculationOri Bernstein
the results of the time calculation were garbled -- and apparently negative on my system when testing, so the test passed when it shouldn't have.
2020-04-25Backed out changeset 2737b9af622bOri Bernstein
not what I wanted to commit.
2020-04-25fix typos in time calculationOri Bernstein
the results of the time calculation were garbled -- and apparently negative on my system when testing, so the test passed when it shouldn't have.
2020-04-25Bump protocol version for TtclickOri Bernstein
2020-04-25triple click selection in acmeOri Bernstein
see the last 2 commits.
2020-04-25triple click selection in rioOri Bernstein
same as sam and vt, three clicks selects a whitespace-delimited line.
2020-04-25triple click selection in samOri Bernstein
three clicks selects a whitespace-delimited line.
2020-04-24acme/win: exit winfs once acme shuts down the windowcinap_lenrek
2020-04-24pc, pc64: use softscreen double buffering for *bootscreen= framebuffercinap_lenrek
it is probably almost always a good idea to use double buffering with a unaccelerated framebuffer.
2020-04-22bcm, bcm64: dancing to the drum of the linux clowns for device tree memory ↵cinap_lenrek
size detection (thanks kenji) looks like linux changed the device tree names for the memory node: https://github.com/raspberrypi/linux/commit/4b17654f51fd87c42cda3217b0863e6aa1df49b9#diff-ac03c9402b807c11d42edc9e8d03dfc7 this fixes the memory size detection with latest firmware on raspberry pi4-b (4GB) for kenji.
2020-04-21/sys/man/1/mothra: add description of Plumb menu item.stanley lieber
2020-04-21mothra.c: add Plumb menu item, and update man page. my original changes ↵stanley lieber
sanity-checked by Ori_B.
2020-04-21rdhtml.c: restore original fonts. dejavusans was my change, my fault. it ↵stanley lieber
never looked right outside of drawterm on osx (mea culpa). this is easy to change for anyone who prefers something else, but it's difficult to imagine native users preferring our very fuzzy dejavusans to anything else.
2020-04-21remove unused macro from chan.cOri Bernstein
2020-04-22samterm: don't scroll invisible (command) window (thanks umbraticus)cinap_lenrek
with scroll-wheel scrolling, this case can happen with the command window: umbraticus → cinap: create fullscreen file buffer by right-clicking in cmd window
2020-04-20mergecinap_lenrek