Commit graph

3010 commits

Author SHA1 Message Date
cinap_lenrek 3c2b09c9dc ip/torrent: more checking, backoff from piece on hash error 2013-10-08 07:55:26 +02:00
cinap_lenrek 8046234275 kbdfs: implement keyboard mouse buttons with /dev/mousein 2013-10-07 06:49:34 +02:00
cinap_lenrek 8aeddcf5bb vncs: create dummy /dev/mousein and /dev/mousectl files
this should prevent accidential fiddeling with the kernels
mouse driver.
2013-10-07 06:37:40 +02:00
cinap_lenrek 6c6bd66ed1 devmouse: differential handling of /dev/mousein buttons 2013-10-07 06:34:24 +02:00
cinap_lenrek ad1111cb3e exportfs: fix more filedescriptor leaks
just closing the pipe isnt enough, we have to
close all remaining file descriptors except sfd
before executing sub exportfs.
2013-10-07 23:18:37 +02:00
cinap_lenrek 6197758ec1 exportfs: fix openmount() rfork flags and filedescriptor leak, silence of on initstr error
fork child exportfs with new rendezvous group.
fix missing close of pipe filedescriptors on error.
fix missing close of other end of pipe in child.

dont bark when we get eof on the first init string read.
this condition can happen when unmount opens and
immidiately closes a exported srv file.
2013-10-06 04:42:46 +02:00
cinap_lenrek cb8eac54ed 5l: apply richard millers 5l-incfloat patch (from sources)
Generate correct ARM vfp code for x++ where x is single precision float.
Example test program (link with '5l -f'): void _main() { float x; x++;}
2013-10-06 01:49:15 +02:00
cinap_lenrek 3da35f028f rio: gone windows gone wrong (fix missing recv(x->flushc, nil) when gone but request flushing) 2013-10-05 22:55:10 +02:00
cinap_lenrek 6187e219da mothra: avoid intermediate rc shell processes, use rfork(RFREND) to isolate rendezvous group 2013-10-04 21:11:56 +02:00
cinap_lenrek 0b42409cf4 page: avoid intermediate rc shell processes with using exec, move newwindow() before forking namespace
use exec to avoid intermediate rc processes.

avoid capturing old namespace in the waiting process by doing the
newwindow() call before it.
2013-10-04 21:10:33 +02:00
cinap_lenrek d160232747 mothra: run page in own note group, close unneeded filedescriptors after forking
running page in own note group avoids killing it when we
exit mothra.

copypaste dupfds() function from page and use it to close
unneeded file descriptors.
2013-10-04 16:08:19 +02:00
cinap_lenrek 8c1d4604db page: close stdout, reopen stdout/stderr for external viewer and removed useless RFNAMEG flag
we are not using stdout (fd=1) and it, so dup nullfd over it.
this drops the old window reference when using with -w flag.

the RFNAMEG flag isnt needed because we are calling newwindow()
which forks the namespace for us.

reopen stdin/stdout for the external viewer to the new window.
2013-10-04 16:03:41 +02:00
cinap_lenrek 0be917ff4d libdraw: make newwindow() unmount the old window
newwindow() used to mount the new window directly on /dev, resulting
in the old window and the new one being mounted over each other.

we now try to unmount the old window from /dev first, mount new
window to /mnt/wsys (replacing the old) and then bind /mnt/wsys
before /dev.

if theres no /mnt/wsys, just mount window directly before /dev.
2013-10-04 15:57:05 +02:00
cinap_lenrek 40cf5957e0 add sdp(3) from sources 2013-10-04 13:52:22 +02:00
cinap_lenrek 9bcdfac3be merge 2013-10-04 02:27:53 +02:00
cinap_lenrek 5c4756974b page: dont tell rio our pid
$wsys might be from a remote system so pid will not work.

new rio errors out on mouse/cons instead.
2013-10-04 02:26:40 +02:00
cinap_lenrek fe03ec0e21 rio: gone windows, window resize, rectonscreen, goodrect
dont rely on postnote to shutdown client. instead, make reads on
cons, kbd and mouse error. when we mount a window system over
exportfs, the pid useless and even dangerous! pid should be
only used by clients forked by rio itself.

fix bug in resized(), goodrect() takes rect in screen coordinates!

make rectonscreen() fix window size if the window doesnt fit
on the screen.

improve goodrect() to check for windows outside of the screen or
bigger than screen without borders visible.
2013-10-04 02:17:53 +02:00
ppatience0 7c28d33d4b io.h: change indentation from spaces to tabs 2013-10-03 17:15:11 -04:00
ppatience0 9eab198d05 ether83815: fix `auto neg timed out' error with sis 900 rev 635.
the openbsd sis(4) driver does not actually go through the rest
of softreset() with sis cards. also, rev 635 reads the mac address
differently, so copy-paste code from openbsd to handle that.
2013-10-03 17:13:08 -04:00
cinap_lenrek 60e3d2782b merge 2013-10-03 17:31:55 +02:00
cinap_lenrek 7ad47f1083 tarfs: make file name safe, canonical and free of . and .. (from sources) 2013-10-03 17:30:03 +02:00
cinap_lenrek f163d0014a libmach: fix wrong formating for arm LDRH/STRH/LDRSB/LDRSH (MOVHU/MOVBU) instructions 2013-10-02 20:52:13 +02:00
ppatience0 225cc4af5c nusb/ether: add rtl8150 driver, remove unused includes 2013-10-02 02:25:43 -04:00
stanley lieber 805fe4660e fortunes: I think we're done here. 2013-10-02 18:02:49 -04:00
cinap_lenrek 6c758d94bf vt: dont pollute the outer environment (thanks mischief!) 2013-10-02 02:25:50 +02:00
cinap_lenrek e55d105159 bootrc: +x 2013-10-02 02:01:43 +02:00
cinap_lenrek 505bc9b491 lib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler issue 2013-10-02 01:36:05 +02:00
cinap_lenrek da2d0ee780 audiohda: allow manual pin routing, more verbose audiostat, initial mute of al widgets
the automatic routing from jack to dac/adc sometimes gets us
a path thats not audible. manually specifying a route path
gets us arround these. the syntax is just a comma separated
list of node ids in the "pin" and "inpin" audioctl commands
instead of a single pin node id.

to find alternative paths, audiostat now lists all the widgets;
not just the pins; and ther input connections.

initially mute all pins and amps of all function groups.
connectpath() and disconnectpath() will mute and unmute
the widgets as required later.
2013-09-29 15:44:26 +02:00
stanley lieber 82362507f7 pkg/list: handle more directory listings 2013-09-28 01:57:31 -04:00
cinap_lenrek c9bbe34bf6 pc kernel: make syscall() return thru forkret() to handle exceptions
forkret() labels the instructions that can raise exceptions
so they can be handled in trap(). this can happen when
segment descriptors get invalidated.
2013-09-27 19:24:45 +02:00
stanley lieber 64f44612f2 fortunes: I gave up, back to 9front. -- Aram 2013-09-26 12:22:09 -04:00
cinap_lenrek d9ca084282 tcs: eleminate ambigous html entity runes. 2013-09-26 15:16:12 +02:00
cinap_lenrek 81f726b2b4 audioac97: remove i/o bar magic, fix ac97mixreset busywait-forever timeout
the standard is i/o bar 0 is the mixer and bar 1 is status/control.
the magic with the bar sizes made it fail in qemu. so removing it
for now as all devices seen so far comply to the standard.

if we ever see a sis7012 where this might be swaped uncomment the i=0;

the busywait timeout is too long in ac97mixreset() because rd/wr
have a timeout on ther own. just remove the busy looping and do
a one second delay after mixer reset. (tested with t23)
2013-09-26 23:34:06 +02:00
cinap_lenrek 7265a09524 merge 2013-09-25 20:27:34 +02:00
cinap_lenrek cdc2c30e99 reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)
semaphore locks have much higher overhead than initially presented
in the "Semaphores in Plan9" paper. until the reason for it has been
found out i will revert the changes.
2013-09-26 22:24:31 +02:00
jpathy cafcffb1dc fix null dereference crash in mothra 2013-09-24 15:50:35 -07:00
cinap_lenrek 62b3eea271 syssem*: eleminate redundant validaddr() checks
validaddr looks up the segments for an address range
and checks the flags and if the address range lies
within bounds on the segments.

as we'r going to lookup the segment in the syssem*
syscalls anyway, we can do the checks ourselfs avoiding
the double segment array lookups.

the implication of this tho is that now a semaphore cannot
span multiple segments. but this would be highly unusual
given that segments are page aligned.
2013-09-24 01:52:20 +02:00
cinap_lenrek 365fd745d6 9bootfat: only check for fat at block 0 on floppy drives (thanks aap)
smart boot manager has a "FAT" signature in its mbr causing
9bootfat to "detect" it as a fat filesystem and then fails
to find plan9.ini.

there shouldnt be a fat filesystem on harddrives at block 0, only
on floppy drives. but some bioses use floppy drive numbers
for usb harddrives so still check for a partition table.

thanks aap for debugging this.
2013-09-23 21:12:41 +02:00
cinap_lenrek b4cdfc6c55 devproc: check for p->dot == nil, run closeproc with up->dot = up->slash
p->dot can be nil when process exits (see pexit())

set closeprocs dot to up->slash so it will show up
right in devproc.
2013-09-22 19:49:59 +02:00
cinap_lenrek 99167104f9 audiohda: vmware support (thanks dreadlorde) 2013-09-22 18:26:52 +02:00
cinap_lenrek e4942b78fd mkfs(8): also list -U option in table 2013-09-22 03:30:04 +02:00
cinap_lenrek d3b8ded315 rootstub: create directories for mips 2013-09-21 21:21:18 +02:00
cinap_lenrek 4fc4033611 merge 2013-09-21 20:06:53 +02:00
cinap_lenrek f811708ffc ape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources) 2013-09-21 19:55:52 +02:00
cinap_lenrek 3d05e77ca1 libc: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)
spinlocks have been changed to use the new semacquire/semrelease
syscalls in combination with atomic compare and swap operations.
2013-09-21 19:53:27 +02:00
cinap_lenrek 041e4852d2 tcs: add html5 rune entities 2013-09-21 22:17:40 +02:00
cinap_lenrek 0d41eadd03 hget(1): usage for webpaste 2013-09-20 17:46:25 +02:00
cinap_lenrek 65653a1840 pushssl(2), pushtls(2): clarify filedescriptor closing 2013-09-20 17:44:14 +02:00
cinap_lenrek 4e015eb5c7 merge 2013-09-20 17:41:51 +02:00
cinap_lenrek 91ce0a07ca hpost: dont emit /bin/hpost but just hpost
just emiting "hpost" makes it simpler to override it as a
rc function.
2013-09-20 17:39:33 +02:00