]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
4 years agoacme: add missing logf.c
cinap_lenrek [Sun, 7 Jun 2020 15:06:33 +0000 (17:06 +0200)]
acme: add missing logf.c

4 years agoip/6in4: request ipv4 packets only in ipmux filter
cinap_lenrek [Sun, 7 Jun 2020 14:56:54 +0000 (16:56 +0200)]
ip/6in4: request ipv4 packets only in ipmux filter

4 years agodevip: implement ipv6 support in ipmux packet filter
cinap_lenrek [Sun, 7 Jun 2020 14:56:01 +0000 (16:56 +0200)]
devip: implement ipv6 support in ipmux packet filter

Added a ver= field to the filter to distinguish the ip version.
By default, a filter is parsed as ipv6, and after parsing
proto, src and dst fields are converted to ipv4. When no
ver= field is specified, a ip version filter is implicitely
added and both protocols are parsed.

This change also gets rid of the fast compare types as the
filed might not be aligned correctly in the packet.

This also fixes the ifc= filter, as we have to check any
local address.

4 years agosnoopy: add ipmux pseudo protocol
cinap_lenrek [Sun, 7 Jun 2020 14:48:04 +0000 (16:48 +0200)]
snoopy: add ipmux pseudo protocol

the ipmux pseudo protocol handles the extra ipv6 interface address
prefixed to the ip header as used by /net/ipmux packet filter.

4 years agodevip: fix parseipmask() prototype in ip.h
cinap_lenrek [Sun, 7 Jun 2020 14:45:55 +0000 (16:45 +0200)]
devip: fix parseipmask() prototype in ip.h

4 years agoacme: import event log from plan9port (thanks fshahriar)
Ori Bernstein [Sun, 7 Jun 2020 02:05:00 +0000 (19:05 -0700)]
acme: import event log from plan9port (thanks fshahriar)

Based off the following 3 commits:

4a3fb87264f8bc03fc62f00ef335056f30d18023
45f8ba54143323f08a21343633764caa59aa3ea3
fdf6ef333705c844bcf3ccf2f93b2773f1a6aa41

Reading /mnt/acme/log reports a log of window create,
put, focus, and delete events, as they happen. It blocks
until the next event is available.

Example log output:

8 new /Users/rsc/foo.go
8 put /Users/rsc/foo.go
8 del /Users/rsc/foo.go

This lets acme-aware programs react to file writes, for example
compiling code, running a test, or updating an import block.

4 years agodevip: pick less surprising interface address in header for incoming UDP packets
cinap_lenrek [Sat, 6 Jun 2020 21:46:01 +0000 (23:46 +0200)]
devip: pick less surprising interface address in header for incoming UDP packets

We used to just return the first address of the incoming
interface regardless of if the address matches the source
ip type and scope.

This change tries to find the best interface address that
will match the source ip so it can be used as a source
address when replying to the packet.

4 years agomerge
cinap_lenrek [Sat, 6 Jun 2020 14:52:01 +0000 (16:52 +0200)]
merge

4 years agoaux/vga: use 64-bit physical addresses for pci membar
cinap_lenrek [Sat, 6 Jun 2020 14:44:14 +0000 (16:44 +0200)]
aux/vga: use 64-bit physical addresses for pci membar

4 years agodevlml: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:31:39 +0000 (16:31 +0200)]
devlml: use 64-bit physical addresses

4 years agoaudiosb16: cleanup audioprobe(), cast ISAConf.port to ulong
cinap_lenrek [Sat, 6 Jun 2020 14:31:07 +0000 (16:31 +0200)]
audiosb16: cleanup audioprobe(), cast ISAConf.port to ulong

4 years agoaudioac97: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:25:00 +0000 (16:25 +0200)]
audioac97: use 64-bit physical addresses

4 years agoaudiohda: use 64-bit physical addresses, check pci membar types
cinap_lenrek [Sat, 6 Jun 2020 14:23:58 +0000 (16:23 +0200)]
audiohda: use 64-bit physical addresses, check pci membar types

4 years agopc/pcmciamodem: cast i/o port to ulong
cinap_lenrek [Sat, 6 Jun 2020 14:21:42 +0000 (16:21 +0200)]
pc/pcmciamodem: cast i/o port to ulong

4 years agopc/pmmc: check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:19:25 +0000 (16:19 +0200)]
pc/pmmc: check pci membar type

4 years agouartaxp: use 64-bit physical addresses and check pci membar types
cinap_lenrek [Sat, 6 Jun 2020 14:18:52 +0000 (16:18 +0200)]
uartaxp: use 64-bit physical addresses and check pci membar types

4 years agopc/wavelan: print Ether.port as 64-bit value
cinap_lenrek [Sat, 6 Jun 2020 14:18:06 +0000 (16:18 +0200)]
pc/wavelan: print Ether.port as 64-bit value

4 years agosd53c8xx: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:16:48 +0000 (16:16 +0200)]
sd53c8xx: use 64-bit physical addresses

4 years agosdmv50xx: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:16:03 +0000 (16:16 +0200)]
sdmv50xx: use 64-bit physical addresses and check pci membar type

4 years agosdiahci: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 14:14:58 +0000 (16:14 +0200)]
sdiahci: use 64-bit physical addresses

4 years agosdodin: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:14:02 +0000 (16:14 +0200)]
sdodin: use 64-bit physical addresses and check pci membar type

4 years agosdnvme: make sure pci membar type is memory
cinap_lenrek [Sat, 6 Jun 2020 14:10:58 +0000 (16:10 +0200)]
sdnvme: make sure pci membar type is memory

4 years agousbuhci: make sure pci membar type is i/o
cinap_lenrek [Sat, 6 Jun 2020 14:10:04 +0000 (16:10 +0200)]
usbuhci: make sure pci membar type is i/o

4 years agousbehcipc: use 64-bit physical addresses and check pci membar type
cinap_lenrek [Sat, 6 Jun 2020 14:05:40 +0000 (16:05 +0200)]
usbehcipc: use 64-bit physical addresses and check pci membar type

4 years agopc/ether*: use 64-bit physical addresses and check pci membar types and sizes
cinap_lenrek [Sat, 6 Jun 2020 14:04:24 +0000 (16:04 +0200)]
pc/ether*: use 64-bit physical addresses and check pci membar types and sizes

4 years agopc/vga*: use 64-bit physical addresses and check pci membar types and sizes
cinap_lenrek [Sat, 6 Jun 2020 13:58:18 +0000 (15:58 +0200)]
pc/vga*: use 64-bit physical addresses and check pci membar types and sizes

4 years agoarchacpi: use 64-bit uvlong for physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:44:17 +0000 (15:44 +0200)]
archacpi: use 64-bit uvlong for physical addresses

4 years agodevvga: use 64-bit physical addresses for framebuffer
cinap_lenrek [Sat, 6 Jun 2020 13:23:50 +0000 (15:23 +0200)]
devvga: use 64-bit physical addresses for framebuffer

4 years agodevpccard: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:21:27 +0000 (15:21 +0200)]
devpccard: use 64-bit physical addresses

4 years agousbxhci: use 64-bit physical addresses
cinap_lenrek [Sat, 6 Jun 2020 13:18:18 +0000 (15:18 +0200)]
usbxhci: use 64-bit physical addresses

4 years agodevpnp, devether, devusb: cast ISAConf.port to uvlong (for 32-bit implementations)
cinap_lenrek [Sat, 6 Jun 2020 13:17:08 +0000 (15:17 +0200)]
devpnp, devether, devusb: cast ISAConf.port to uvlong (for 32-bit implementations)

The ISAConf.port might still be 32-bit on some archs.

4 years agodevusb: print Hci.port as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:12:50 +0000 (15:12 +0200)]
devusb: print Hci.port as 64-bit uvlong

4 years agodevether: print Ether.port as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:11:56 +0000 (15:11 +0200)]
devether: print Ether.port as 64-bit uvlong

4 years agodevpnp: print pci membar as 64-bit uvlong
cinap_lenrek [Sat, 6 Jun 2020 13:10:23 +0000 (15:10 +0200)]
devpnp: print pci membar as 64-bit uvlong

4 years agobcm64: bring pci code in line with the pc/pc64
cinap_lenrek [Sat, 6 Jun 2020 13:06:07 +0000 (15:06 +0200)]
bcm64: bring pci code in line with the pc/pc64

4 years agobcm64: use uvlong for ISAConf.port
cinap_lenrek [Sat, 6 Jun 2020 13:01:56 +0000 (15:01 +0200)]
bcm64: use uvlong for ISAConf.port

4 years agobcm64: use 64-bit uvlong physical address in vmap()
cinap_lenrek [Sat, 6 Jun 2020 13:01:20 +0000 (15:01 +0200)]
bcm64: use 64-bit uvlong physical address in vmap()

4 years agopc, pc64: implement 64-bit pci membar support
cinap_lenrek [Sat, 6 Jun 2020 12:58:20 +0000 (14:58 +0200)]
pc, pc64: implement 64-bit pci membar support

4 years agopc, pc64: use 64-bit physical addresses for ISAConf.port
cinap_lenrek [Sat, 6 Jun 2020 12:52:16 +0000 (14:52 +0200)]
pc, pc64: use 64-bit physical addresses for ISAConf.port

4 years agopc, pc64: use 64-bit physical addresses for vmap() and upaalloc()
cinap_lenrek [Sat, 6 Jun 2020 12:43:24 +0000 (14:43 +0200)]
pc, pc64: use 64-bit physical addresses for vmap() and upaalloc()

4 years agoape: add missing rerrstr.c
Ori Bernstein [Sat, 6 Jun 2020 01:52:22 +0000 (18:52 -0700)]
ape: add missing rerrstr.c

4 years agoape: make libplumb available under ape.
Ori Bernstein [Fri, 5 Jun 2020 18:28:47 +0000 (11:28 -0700)]
ape: make libplumb available under ape.

This adds the mkfiles and plumb.h to ape,
similar to how libdraw is made available.
This is used for ports such as netsurf.

4 years agoaux/getflags: fix named rune arguments.
Ori Bernstein [Thu, 4 Jun 2020 18:41:03 +0000 (11:41 -0700)]
aux/getflags: fix named rune arguments.

Flags can be runes. That means that we can't just
look at p[1] to decide if we have a named argument,
we need to look one rune forward. This change
does that.

4 years agomerge
cinap_lenrek [Sun, 31 May 2020 22:07:01 +0000 (00:07 +0200)]
merge

4 years agoacme: implement 'scratch' ctl command (thanks Drew DeVault)
kvik [Sun, 31 May 2020 20:39:46 +0000 (22:39 +0200)]
acme: implement 'scratch' ctl command (thanks Drew DeVault)

The new command marks the target window as a scratch window -- a window
whose state cannot be "dirtied" by changes made to its body, therefore
avoiding warnings about unsaved changes when deleting the window or
exiting acme.

Existing examples of scratch windows are error, directory, and guide
windows, whose scratchness is set internally.

With the new command users and programs alike can create their own
scratch windows.  This is put to use in acme's own win(1).

4 years agokernel: remove unused segment argument in freepte()
cinap_lenrek [Sun, 31 May 2020 15:25:16 +0000 (17:25 +0200)]
kernel: remove unused segment argument in freepte()

4 years agopc, xen: make PAT support optional (for xen)
cinap_lenrek [Sun, 31 May 2020 12:32:19 +0000 (14:32 +0200)]
pc, xen: make PAT support optional (for xen)

4 years agoape/libdraw: add missing eenter (thanks phil9)
Ori Bernstein [Sat, 30 May 2020 17:06:21 +0000 (10:06 -0700)]
ape/libdraw: add missing eenter (thanks phil9)

4 years agoimap4d: reject invalid month in date2tm()
cinap_lenrek [Sat, 30 May 2020 11:03:05 +0000 (13:03 +0200)]
imap4d: reject invalid month in date2tm()

4 years agorc: avoid forking for final command that has variable assignments (to get $apid right)
cinap_lenrek [Sat, 30 May 2020 00:03:18 +0000 (02:03 +0200)]
rc: avoid forking for final command that has variable assignments (to get $apid right)

basically, we want the following commands to print
the same pid twice:

rc -c 'cat /dev/pid &;echo $apid'

vs:

rc -c 'a=1 cat /dev/pid &;echo $apid'

basically, Xsimple() calls exitnext() to determine if
a simple command should be promoted to exec, by peeking
ahead into the code and searching for Xexit instruction.

Xexit might not follow immediately after the Xsimple
instruction because of redirections, which exitnext()
would skip.

but it would not skip the Xunlocal instructions that
where added by the variable assignment.

4 years agoip/cifsd: add FIND_FIRST2 SMB_FIND_FILE_FULL_DIRECTORY_INFO info level
cinap_lenrek [Tue, 26 May 2020 22:09:46 +0000 (00:09 +0200)]
ip/cifsd: add FIND_FIRST2 SMB_FIND_FILE_FULL_DIRECTORY_INFO info level

4 years agosshnet: prevent ssh process from keeping the mount alive
cinap_lenrek [Tue, 26 May 2020 19:37:25 +0000 (21:37 +0200)]
sshnet: prevent ssh process from keeping the mount alive

4 years agopc, pc64: fix wrong mtrr physmask() for machines without extended address size msr
cinap_lenrek [Sun, 24 May 2020 15:50:37 +0000 (17:50 +0200)]
pc, pc64: fix wrong mtrr physmask() for machines without extended address size msr

4 years agoawk: fix race condition with sub-mk in mkfile
cinap_lenrek [Sun, 24 May 2020 14:00:45 +0000 (16:00 +0200)]
awk: fix race condition with sub-mk in mkfile

the maketab helper program was generated in parallel, which
had a dependency to y.tab.h which lead to yacc running
twice in parallel.

this removes the dependency to y.tab.h in the virtual
maketab.$objtype target to prevent this race condition.

the dependency to y.tab.h is resolved in the main mk at the
$cputype.maketab target which serializes with the other
targets.

4 years agousbehci: release ctlr ilock before calling pollcheck()
cinap_lenrek [Sun, 24 May 2020 00:43:21 +0000 (02:43 +0200)]
usbehci: release ctlr ilock before calling pollcheck()

4 years agomerge
cinap_lenrek [Sun, 24 May 2020 00:12:47 +0000 (02:12 +0200)]
merge

4 years agousbehci: avoid kproc() while holding poll lock
cinap_lenrek [Sun, 24 May 2020 00:11:37 +0000 (02:11 +0200)]
usbehci: avoid kproc() while holding poll lock

4 years agoman(9): remove accidentally commited indices
cinap_lenrek [Sat, 23 May 2020 22:26:11 +0000 (00:26 +0200)]
man(9): remove accidentally commited indices

4 years agomerge
cinap_lenrek [Sat, 23 May 2020 21:32:24 +0000 (23:32 +0200)]
merge

4 years agoip/tinc: accept udp connection from any udp source port
cinap_lenrek [Sat, 23 May 2020 21:31:11 +0000 (23:31 +0200)]
ip/tinc: accept udp connection from any udp source port

the remote host might be behind a NAT which translates the
source port, so if no host could be found, lookup the ip
address only.

4 years agopaint: change colors in the palette with button 3
Sigrid [Sat, 23 May 2020 18:41:20 +0000 (20:41 +0200)]
paint: change colors in the palette with button 3

4 years agolibaml: implement ToDecimalString and ToHexString operations
cinap_lenrek [Sat, 23 May 2020 15:44:30 +0000 (17:44 +0200)]
libaml: implement ToDecimalString and ToHexString operations

4 years agopc, pc64: do page attribute table (PAT) init early in cpuidentify()
cinap_lenrek [Fri, 22 May 2020 21:58:24 +0000 (23:58 +0200)]
pc, pc64: do page attribute table (PAT) init early in cpuidentify()

the page attribute table was initialized in mmuinit(), which is
too late for bootscreen(). So now we check for PAT support and
insert the write-combine entry early in cpuidentify().

this might have been the cause of some slow EFI framebuffers on
machines with overlapping or insufficient MTRR entries.

4 years agolibc/arm64: work arround linker bug for cas()
cinap_lenrek [Sun, 17 May 2020 21:46:09 +0000 (23:46 +0200)]
libc/arm64: work arround linker bug for cas()

at the _cas0 label, the linker would generate spurious stack
adjustment before the return:

atexitdont+0x84 0x000000000003614c CLREX $0xf
atexitdont+0x88 0x0000000000036150 MOVW R31,R0
atexitdont+0x8c 0x0000000000036154 MOV (SP)16!,R30 <- ????????????
atexitdont+0x90 0x0000000000036158 RETURN

the work arround is to move the code into its own cas0
text symbol.

this fixes impossible cwfs crashes in srvi().

4 years ago7l: handle dupok flag in TEXT/GLOBL data
cinap_lenrek [Sun, 17 May 2020 17:08:10 +0000 (19:08 +0200)]
7l: handle dupok flag in TEXT/GLOBL data

4 years agoAdd stdbool.h to ape
Ori Bernstein [Sun, 17 May 2020 15:18:49 +0000 (08:18 -0700)]
Add stdbool.h to ape

in accordance with c99:7.16. Used by perl, trivial enough
that I feel ok with adding it before the port is fully done.

4 years ago7l: fix mistake
cinap_lenrek [Sat, 16 May 2020 14:26:09 +0000 (16:26 +0200)]
7l: fix mistake

4 years ago#pragma ref no longer exists
Ori Bernstein [Fri, 15 May 2020 23:56:59 +0000 (16:56 -0700)]
#pragma ref no longer exists

It appears to be an antiquated form of 'USED(x)'

4 years agoFix scans of more than one character in %[]
Ori Bernstein [Fri, 15 May 2020 23:46:20 +0000 (16:46 -0700)]
Fix scans of more than one character in %[]

This got broken in d8e877a89dae, where we returned 0 on the
first mismatch; we want to return 0 only when we consumed no
characters.

4 years agostop fiddling with path construction.
Ori Bernstein [Thu, 14 May 2020 01:50:01 +0000 (18:50 -0700)]
stop fiddling with path construction.

There's fd2path, which gives back the full path directly.
This makes the code even simpler.

4 years agofix yacc crash with absolute paths
Ori Bernstein [Wed, 13 May 2020 15:42:00 +0000 (08:42 -0700)]
fix yacc crash with absolute paths

When passing an absolute file path to yacc, we would skip
initializing inpath, leaving it null. This would cause Bopen
to die. We would similarly fail to report an error if we tried
to get the current working directory, and then die when
constructing inpath.

This fixes both cases.

4 years agoape: fix name clash, have to use _SLEEP syscall instead of ape sleep in plan9 code...
cinap_lenrek [Tue, 12 May 2020 22:17:07 +0000 (00:17 +0200)]
ape: fix name clash, have to use _SLEEP syscall instead of ape sleep in plan9 code (thanks jamos)

this fixes etimer() from ape built libdraw as posix sleep() uses
seconds while plan9 uses miliseconds.

4 years agocc: dont export gethunk(), hunk, nhunk and thunk
cinap_lenrek [Tue, 12 May 2020 21:18:48 +0000 (23:18 +0200)]
cc: dont export gethunk(), hunk, nhunk and thunk

4 years agocc: get rid of hunk pointer fiddling and just use alloc()
cinap_lenrek [Tue, 12 May 2020 20:45:05 +0000 (22:45 +0200)]
cc: get rid of hunk pointer fiddling and just use alloc()

4 years ago?l: remove direct hunk manipulation from linkers, just call malloc()
cinap_lenrek [Tue, 12 May 2020 20:04:30 +0000 (22:04 +0200)]
?l: remove direct hunk manipulation from linkers, just call malloc()

as with recent changes, cc's malloc() could make the hunk pointer
misaligned. in the the compilers, the hunk pointer is used directly
by the lexer with no effort to to keep the hunk pointer aligned.

alloc/malloc still return aligned pointers, but hunk itself can
be on a odd address after allocation of a odd sized amount of bytes.

however, in the linkers, this assumption appears to be differnet. as
most allocations mostly allocate padded structures. however, symbol
lookup allocates strings on byte-size ganularity and the cc's malloc
would misalign the hunk pointer after the malloc() call. while the
rest of the code assumed hunk pointer was always aligned.

this change removes all the hunk pointer fiddling from the linker,
and we just call malloc() (which will use the fast implmenentation
of cc, and should not really make much of a performance difference).

4 years ago[ape] add missing conversion flags for scanf
Ori Bernstein [Tue, 12 May 2020 17:48:33 +0000 (10:48 -0700)]
[ape] add missing conversion flags for scanf

We're missing type flags for:

hh: char
ll: vlong
z:  size_t
t:  ptrdiff_t
j:  intmax_t

The lack of '%lld' was causing us to fail when parsing
timezone files. This brings us in line with the specifiers
in the C99 standard, section 7.19.6.2p11

4 years agodevip: fix ifc recursive rlock() deadlock
cinap_lenrek [Sun, 10 May 2020 20:51:40 +0000 (22:51 +0200)]
devip: fix ifc recursive rlock() deadlock

ipiput4() and ipiput6() are called with the incoming interface rlocked
while ipoput4() and ipoput6() also rlock() the outgoing interface once
a route has been found. it is common that the incoming and outgoing
interfaces are the same recusive rlocking().

the deadlock happens when a reader holds the rlock for the incoming interface,
then ip/ipconfig tries to add a new address, trying to wlock the interface.
as there are still active readers on the ifc, ip/ipconfig process gets queued
on the inteface RWlock.

now the reader finds the outgoing route which has the same interface as the
incoming packet and tries to rlock the ifc again. but now theres a writer
queued, so we also go to sleep waiting four outselfs to release the lock.

the solution is to never wait for the outgoing interface rlock, but instead
use non-queueing canrlock() and if it cannot be acquired, discard the packet.

4 years agokernel: fix checkpages() and segflush() on SG_PHYSICAL type segments
cinap_lenrek [Sun, 10 May 2020 14:54:42 +0000 (16:54 +0200)]
kernel: fix checkpages() and segflush() on SG_PHYSICAL type segments

do not touch s->map on SG_PHYSICAL type segments as they do
not have a pte map (s->mapsize == 0 && s->map == nil).

also remove the SG_PHYSICAL switch in freepte(), this is never
reached.

4 years agomerge
kvik [Sun, 10 May 2020 01:24:19 +0000 (03:24 +0200)]
merge

4 years agoacme: add missed error checks
kvik [Sun, 10 May 2020 01:18:57 +0000 (03:18 +0200)]
acme: add missed error checks

4 years agomerge
cinap_lenrek [Sun, 10 May 2020 00:44:37 +0000 (02:44 +0200)]
merge

4 years agousbxhci: fix wrong control endpoint 0 output device context address
cinap_lenrek [Sun, 10 May 2020 00:43:39 +0000 (02:43 +0200)]
usbxhci: fix wrong control endpoint 0 output device context address

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.

4 years agofix '%[]' specifiers and '%n' (thanks phil9)
Ori Bernstein [Sat, 9 May 2020 22:10:39 +0000 (15:10 -0700)]
fix '%[]' specifiers and '%n' (thanks phil9)

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.

4 years agonusb/kb: add quirks for Elecom HUGE trackball
kvik [Fri, 8 May 2020 18:49:11 +0000 (20:49 +0200)]
nusb/kb: add quirks for Elecom HUGE trackball

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.

4 years agomerge
cinap_lenrek [Thu, 7 May 2020 21:28:55 +0000 (23:28 +0200)]
merge

4 years agobcm64: fix kernels cmpswap() function
cinap_lenrek [Thu, 7 May 2020 21:27:27 +0000 (23:27 +0200)]
bcm64: fix kernels cmpswap() function

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.

4 years agofix typo: mouse->xy, not w->mc.xy
Ori Bernstein [Thu, 7 May 2020 20:23:15 +0000 (13:23 -0700)]
fix typo: mouse->xy, not w->mc.xy

4 years agoaux/getflags: remove rogue debug print
kvik [Thu, 7 May 2020 16:37:08 +0000 (18:37 +0200)]
aux/getflags: remove rogue debug print

4 years agobring stdint.h closer to spec
Ori Bernstein [Wed, 6 May 2020 22:39:12 +0000 (15:39 -0700)]
bring stdint.h closer to spec

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).

4 years agoaux/getflags: improve flagfmt parser
kvik [Wed, 6 May 2020 22:10:09 +0000 (00:10 +0200)]
aux/getflags: improve flagfmt parser

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'

4 years agoReset click count on mouse motion.
Ori Bernstein [Wed, 6 May 2020 20:38:39 +0000 (13:38 -0700)]
Reset click count on mouse motion.

4 years agotmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks sirjofri)
Sigrid [Mon, 4 May 2020 09:57:24 +0000 (11:57 +0200)]
tmac.eai: wrapper around -me: auto indexing sections, .TC macro (thanks sirjofri)

4 years agoadd missing /sys/lib/tmac/me files (thanks sirjofri)
Sigrid [Mon, 4 May 2020 09:55:29 +0000 (11:55 +0200)]
add missing /sys/lib/tmac/me files (thanks sirjofri)

4 years agomake bind(2) error handling consistent
cinap_lenrek [Sat, 2 May 2020 15:32:01 +0000 (17:32 +0200)]
make bind(2) error handling consistent

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.

4 years agolibdraw: fix mount() error handling in newwindow()
cinap_lenrek [Sat, 2 May 2020 15:05:17 +0000 (17:05 +0200)]
libdraw: fix mount() error handling in newwindow()

4 years agosed: accept and ignore -E and -r flags for unix compatibility
cinap_lenrek [Sat, 2 May 2020 14:56:52 +0000 (16:56 +0200)]
sed: accept and ignore -E and -r flags for unix compatibility

4 years agoip/cifsd: implement primitive per-share unix id mapping for wstat()
cinap_lenrek [Sat, 2 May 2020 14:53:52 +0000 (16:53 +0200)]
ip/cifsd: implement primitive per-share unix id mapping for wstat()

4 years agomerge
cinap_lenrek [Sat, 2 May 2020 13:34:00 +0000 (15:34 +0200)]
merge

4 years agoether82543gc, ether82557, ethervirtio: do kproc() call ouside of spinlock
cinap_lenrek [Sat, 2 May 2020 13:32:19 +0000 (15:32 +0200)]
ether82543gc, ether82557, ethervirtio: do kproc() call ouside of spinlock

4 years agouse #error when missing define
Ori Bernstein [Fri, 1 May 2020 20:29:08 +0000 (13:29 -0700)]
use #error when missing define

This makes it easier to figure out what's going wrong when
we forget to define _POSIX_SOURCE.