Commit graph

2735 commits

Author SHA1 Message Date
cinap_lenrek 744dbd6bb8 merge 2013-10-26 01:18:23 +02:00
cinap_lenrek 1ca07d817b ndb/common: update ip for d.root-servers.net 2013-10-26 01:11:18 +02:00
cinap_lenrek 946026dc9a merge 2013-10-26 00:58:46 +02:00
cinap_lenrek 384adf4c89 ndb/common: dont use bell-labs dns servers for rfc1980 zones 2013-10-26 00:56:51 +02:00
stanley lieber 424e9d1636 fortunes: etymology: various 2013-10-25 14:46:35 -04:00
cinap_lenrek 8cdade591e kernel: dont spawn closeprocs from closechanq
make closeproc() spawn more procs on demand insead of
doing it from closechanq(). this avoids the palloc lock
checks and simplifies the logic.
2013-10-25 19:51:46 +02:00
cinap_lenrek c7c7e7ee2a kernel: disable freelist page caching for executables run from uncached mount
the image cache has the property of keeping a channel
for the executable binary arround which prevents the
mountpoint from going away.

this can easily be reproduced by running:

@{rfork n; ramfs; cp /bin/echo /tmp; /tmp/echo}

observe how ramfs stays arround until the image is
reclaimed. the echo binary is also cached but is
unreachable from any namespace.

we now restrict the caching to mounts that use the client
cache (-C flag) only. this should always be the case
for /bin. places where this isnt the case might observe
a performance regression.
2013-10-25 02:42:35 +02:00
cinap_lenrek b66c4a6232 kernel: keep one closeproc arround in case we are unable to fork a new one
closechanq() is unable to fork a new closeproc when palloc
is locked. so we spawn a closeproc early in chandevinit()
and make sure theres always one process arround to handle
the queue.
2013-10-25 01:54:09 +02:00
cinap_lenrek 3142af56d8 newuser: make lib/profile read drawterms /dev/secstore when available 2013-10-23 23:44:25 +02:00
cinap_lenrek 43eed8d824 factotum: update rsa for ssh2 (sync with sources) 2013-10-22 18:55:00 +02:00
cinap_lenrek 95c865a497 acme: attempt to fix tag lines collapsing to zero height on window move (issue 189)
we'r getting a rectangle taller than a single line from
coladd() which causes textresize() to collapse the tag
text to zero height.

should probably fix coladd() instead.
2013-10-20 22:38:35 +02:00
cinap_lenrek 8ceb100fa4 nusb/ether: new driver interface with kernel inspired Block buffers
introduce kernel inspured Block structure with
read/write pointers to pass packets arround.

the intend is to avoid copying when adding/removing
frame headers and simplifying the drivers.

the driver now calls etheriq() directly allowing it to
queue multiple packets in one pass without having
to keep state.

transmit gets a buffer passed that has room for
frame headers and trailers so no copying is needed.

blocks are refcounted avoiding another copy when
passed to only one receive queue (common case).

receive queues are now limited to 100KB avoiding
buffer bloat.

Dq* a memory leak in destroyfid has been fixed.

lots of minor cleanups.
2013-10-18 18:41:27 +02:00
cinap_lenrek 5bfaf253d3 keyboard(6): new <compose>x sequence, 21 bit runes. 2013-10-17 19:02:50 +02:00
cinap_lenrek 46f5ac0cd4 html2ms: fix compiler warning for debug code 2013-10-17 18:50:46 +02:00
cinap_lenrek 1015ae8ea8 kbdfs: implement <compoxe>x to enter variable length unicode as suggested by erik quanstro
from: http://9fans.net/archive/2013/04/327

since <compose>x is not yet entrenched, i have a suggestion for ease of
input.  suppose <compose>x were redefined so the syntax were
"<compose>x[0-9a-f]+;".  in the case that 6 hex digits are entered, then
the ";" is not necessary.

not only would this allow for entering 21-bit runes, it would also allow for
short sequences to be entered more easily.

- erik
2013-10-17 18:39:44 +02:00
cinap_lenrek c501fe6936 factotum: fix mschap password (utf-8 to utf-16) conversion
using strlen() gives the number of bytes in the utf-8 string.
could use utflen() instead, but decided to just go in a loop
and get rid of the counters all together.

UTF-16 surrogates are not handled.
2013-10-17 15:31:07 +02:00
cinap_lenrek 0b3ad2b562 libc: updated acid files for 21 bit rune change 2013-10-17 12:53:01 +02:00
cinap_lenrek a5e9641906 change Rune from ushort to uint for to 21 bit runes (thanks mischief!)
big big change. requires rebuilding 8c first and then rebuild
everything.
2013-10-17 12:02:45 +02:00
cinap_lenrek e30f50283c 9p(2): correct usage for srvrelease()/srvacquire()
the process is *NOT* allowed to exit after a srvrelease() as
it still holds a reference (srv->rref) preventing the srv
from beging freed/ended (listensrv) before srvacquire().
2013-10-17 08:26:05 +02:00
cinap_lenrek 52fc6d50d4 nusb/ether: fix wrong size check causing odd sized packets to be discarded (thanks mischief!)
ethernet packets with sizes that where not multiples of 4 where
discarded because the check uses the smsc frame size instead of
the payload size. when a usb read returns just one packet, theres
no next frame header and the calculated frame size is bigger than
the usb read which caused the whole packet to be discarded as invalid.

thanks to mischief for testing and debugging!
2013-10-16 16:42:40 +02:00
cinap_lenrek 965bb2d248 nusb/disk: handle blocking usb access with srv released
usb is bound after /dev, so a hanging usb device will hang
access to /dev. we avoid this by releasing the srv, which
allows the fs to still handle reads and walks of the
directories.

ios are serialized by a qlock in the Umsc structure.
2013-10-16 12:26:56 +02:00
cinap_lenrek 1cd4579cdc cwfs: fix putbuf(nil) in error case of cmd_check() 2013-10-16 07:21:12 +02:00
cinap_lenrek 87e187b09c fdisk: fix struct padding for amd64 (from erik quanstros fdisk-64-bit-table patch)
small little patch to help fdisk work properly on 64-bit machines.
sizeof(Table) is 4 bytes too big.
2013-10-16 04:34:58 +02:00
cinap_lenrek 0f994b1b09 aux/statusbar: emit final newline in textmode when finished
bad:
term% echo 1 1 | aux/statusbar -t x
|###########################################################| 100% term%

vs.

good:
term% echo 1 1 | aux/statusbar -t x
|###########################################################| 100%
term%
2013-10-12 03:18:44 +02:00
cinap_lenrek 0460e4be7d cwfs: add checktag() call for cache bucket in dumpblock(), fix error strings 2013-10-11 10:17:17 +02:00
cinap_lenrek 5982c50fa4 cwfs: more checking for cfsdump(), cleanup Tsuper hack in cwrecur()
add checktag and nil checks in cfsdump() making sure to notice
when the roroot directory structures is corrupted.

cwrecur() used tag == Tsuper to indicate that this is the first
level recursive invocation. this is confusing as we really expect
Tdir tag in that case for the root directory. instead, we now
pass the correct tag (Tdir) and use cw->depth > 1 to see if we
are past the root.

the block tag was only checked when the block was not in
the memory cache. check the tag always!
2013-10-11 06:01:55 +02:00
cinap_lenrek 7f57d5d9c5 unzip/zipfs: handle optional data descriptor signature in trailer 2013-10-10 07:42:13 +02:00
cinap_lenrek 3b99a60154 mothra: handle <input type=image> 2013-10-10 23:59:19 +02:00
cinap_lenrek f72da96f28 exportfs: start filter in separate rendezvous group 2013-10-08 20:58:55 +02:00
cinap_lenrek bc18faccde libpanel: fix memory corruption bug in plinitentry(), add pl_erealloc() 2013-10-08 19:58:55 +02:00
cinap_lenrek 1c1bef69aa libc: remove doprint 2013-10-08 19:23:53 +02:00
cinap_lenrek 50e3c936fa ip/torrent: check piece offset, vlong cast 2013-10-08 08:12:05 +02:00
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
stanley lieber 565a4d478e rename /rc/bin/ok to /rc/bin/webpaste 2013-09-20 11:32:42 -04:00
cinap_lenrek 5e2478ccbb acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
go seems to accidently creates ridiculous long symbol names
causing acid to crash.
2013-09-20 16:02:10 +02:00
cinap_lenrek 9c2fb9602d merge 2013-09-20 15:00:49 +02:00
cinap_lenrek 539fe6990f 5c: apply richard millers 5c-nan-cmp patch (from sources)
On ARM, it turns out that comparisons with NaN can be made to do the
right thing with no code penalty, by a more careful selection of
condition code values in the subsequent conditional branch.  The
meaning of the CC bits in the PSR is subtly different when they've
been copied from the floating point status register.

Suggested patch is 5c-nan-cmp (works on both vfp and emulated arm7500).
2013-09-20 14:58:43 +02:00
stanley lieber 8aeb7a926e rc-httpd(8): fix typo (thanks, _trav) 2013-09-20 03:09:40 -04:00
stanley lieber 25e5507c57 pkg(1): fix for plan9.bell-labs.com; update repository list 2013-09-18 15:25:18 -04:00
stanley lieber 4d9ce0fb3c add /rc/bin/ok, tool for okturing.com pastebin 2013-09-18 15:03:50 -04:00
cinap_lenrek 171aafcc22 faces: fix callerpc for realloctag in erealloc (thanks qrstuv) 2013-09-18 09:53:20 +02:00
cinap_lenrek 8556b8dae1 libevent: drop queued mouse events
the changeset r541ead66e8af:

"libdraw: make ebread() return buffer immidiately if available"

makes mouse sluggish when the program cant keep up as mouse
events queue up. this more or less restores the original
behaviour but only for mouse events.
2013-09-18 01:54:22 +02:00
cinap_lenrek 34cd9dc4c4 kernel: reset up->setargs on sysexec(), fix race with devproc
up->setargs wasnt reset in sysexec(). also, up->args should only
be exchanged/freed under up->debug qlock. otherwise double free
could happen.
2013-09-18 01:07:06 +02:00
cinap_lenrek 8a7a6f778d ether8169, etherdp83820, ethervt6102: fix snprint READSTR bugs (thanks pap)
should probably use seprint() instead.
2013-09-17 03:08:32 +02:00
cinap_lenrek ad993a2618 rio: translate window when scaling results in bad window rect on screen resize
when the screen is resized, we scale the windows to
match the new screen size. when the screen is too
small tho, the scaled down window rect might result
in a bad window rect. before, we kept the window
in its original position and size making it possible
to move a window out of the screen by resizing its
outer rio.

now, if we get a bad rectangle after scaling, we
just tralslate position to the new scaled r.min
point but preserve its orginal size. this keeps
the window always accessible.
2013-09-17 01:30:35 +02:00
cinap_lenrek 2fd6c5e0f6 faces: fix minor image memory leak 2013-09-17 00:45:11 +02:00
cinap_lenrek 29f4de5f53 rio: fix Xfidwrite memory leak on flush 2013-09-16 17:28:49 +02:00
cinap_lenrek 15c7d856bc apm: fix wrong segment load, zero segment registers
we loaded APMDSEG instead of APMDSEL into DS. (ouch!)

its not really clear why we loaded DS (wong) in the
first place as bios is supposed to do this. for the
machines where this worked it could have no effect
anyway because it was wrong so removing the DS load
and just zero all segment registers.
2013-09-16 16:23:51 +02:00
cinap_lenrek b5aab82488 libauth: add sanity check for auth_proxy write size 2013-09-16 03:56:53 +02:00
cinap_lenrek eee51d7720 aux/statusbar, aux/statusmsg: dont fork in background for window, cleanup 2013-09-16 02:10:18 +02:00
cinap_lenrek c24dd620f9 e820: handle duplicate and overlapping e820 entries, handle overflows
new algorithm:

sort entries by top address first. then for each entry we use:

base = max(base, last)

so we'll never map the same addresses twice.
2013-09-16 23:36:06 +02:00
cinap_lenrek c3a8711d12 kbdfs: set exit status 2013-09-15 16:22:21 +02:00
cinap_lenrek f8cbd5d12f nusb/serial: set exit status 2013-09-15 16:21:43 +02:00
cinap_lenrek 319bb17e1c vncs: fix cmdpid fork bug
we cannot do:

cmdpid = rfork(... RFMEM);

because cmdpid is a global variable in the data segment
and hence shared between parent and child process. use a
temporary variable on the stack.
2013-09-15 16:04:32 +02:00
cinap_lenrek e220636fd3 vncv: fix missing free for window label 2013-09-15 15:14:12 +02:00
cinap_lenrek 474c2c8a2c upas/fs: fix potential filedescriptor leaks 2013-09-15 14:45:57 +02:00
cinap_lenrek 1d4fff69c6 pmmc: add support for Ricoh 5U23 SD/MMC controller 2013-09-15 01:24:08 +02:00
cinap_lenrek 56836bfdbd tls: fix various tlsClient()/tlsServer() related bugs
- TLSconn structure on stack but not initialized (zeroed)
- original filedescriptor double closed in error case
- original filedescriptor leaked in success case
- leaked TLSconn.sessionID and TLSconn.cert
- clarify in pushtls(2) and pushssl(2)
2013-09-14 19:19:08 +02:00
cinap_lenrek be5992955d acme: use threadexitsall() to tear down mouse and keyboard procs on error 2013-09-11 21:23:45 +02:00
cinap_lenrek 6c5deb9b50 pci: fix compiler warning about unused variables 2013-09-09 00:51:36 +02:00
cinap_lenrek 8aff0e5be6 mp/pci: msi support for hypertransport platform 2013-09-09 00:44:08 +02:00
cinap_lenrek 058188117b dossrv(4): remove reference to a:, b:, c:, d: and 9fat: 2013-09-08 20:59:09 +02:00
cinap_lenrek 699ea8bd1f cpu, ratrace, trace: remove unused #include <bio.h> 2013-09-08 20:34:58 +02:00
cinap_lenrek 9fd0b3bad1 md5sum, srv: remove unused #include <bio.h> 2013-09-08 19:52:44 +02:00
cinap_lenrek 9e695e5321 merge 2013-09-08 19:30:27 +02:00
cinap_lenrek eae48ac606 sha1sum: remove unused #include <bio.h> (thanks BurnZeZ) 2013-09-08 19:25:55 +02:00
stanley lieber 8c86eb0079 fortunes: "Not here, not here the darkness, in this twittering world." -- T.S. Eliot 2013-09-07 22:48:28 -04:00
cinap_lenrek b8c0243773 archacpi: make pcibusno() work on non pci bridges (fixes pciaddr()), distribute irqs in setuplink(), remove debug prints 2013-09-08 02:33:25 +02:00
cinap_lenrek 0182cc9db8 acme: avoid useless tagline/window redraw if not needed
window resize is only neccesary if tagline changed.
2013-09-07 20:07:00 +02:00
cinap_lenrek ebf2c5cd69 mk: handle rc blocks in shell quote
this is so we cna handle:

foo = `{echo `{echo bar}}

thanks to erik and friedrich psiorz on 9fans for
bringing the issue up.
2013-09-07 18:42:40 +02:00
cinap_lenrek 12596736e9 libaml: fix formating 2013-09-07 16:22:35 +02:00
cinap_lenrek ad1edf7541 libaml: fix uninitialized variable in getle(), make amleval() work with buildin methods 2013-09-07 16:14:08 +02:00
cinap_lenrek 1b32bd5f0f libaml: use FP->env to access method arguments instead of FP->arg in evalosi() 2013-09-07 14:50:17 +02:00
cinap_lenrek dba77caa35 archacpi: implement amldelay(), remove unused variable in setuplink() 2013-09-07 14:41:08 +02:00
cinap_lenrek cf166c3850 libaml: amldelay(), _OSI(), fix bug in Load() (from plhk's acpi patch)
export amldelay() for microsecond sleeps.

implement _OSI() method.

fix rwreg argument in evalload()
2013-09-07 14:40:24 +02:00
cinap_lenrek 81618e61df libc: set malloctag for runesmprint() 2013-09-06 16:55:13 +02:00
cinap_lenrek 1eb2c757e7 scram: remove amlalloc()/amlfree()
these are now part of libaml but can still be overridden
when needed.
2013-09-06 16:54:02 +02:00
cinap_lenrek 616eb1f9ba archacpi: experimental handling of interrupt link devices, io access 2013-09-06 16:50:43 +02:00
cinap_lenrek 9add5b765f libaml: new io interface, add amlnew()/amltake()/amldrop(), late binding names, FindSetLeftBit/FindSetRightBit
new io interface was added. user defines amlmapio() and amlunmapio() functions
that will fill out Amlio structure with function pointers to read/write
routines for a particular region.

amlnew() function added allowing the creation of aml objects like buffers
or packages. these can be passed to amleval() with b, p or * format.

amltake()/amldrop() exclude an aml object from garbage collection.

on load, names are not always resolvable until the whole table is loaded.
for this, we create n objects that are just name strings. after load, we
recursively traverse the namespace and resolve them (see fixnames()).

the FindSetLeftBit and FindSetRightBit opcodes got implemened.
2013-09-06 16:48:27 +02:00
cinap_lenrek 95fac5e873 libhtml: fix potential linked list corruption
the difficulty is freeing items while parsing because items might already
be linked into various linked lists like in docinfo.images or form.fiels.
so we link images, tables and formfields to the docinfo as the final step
of getitems() pass using the new recursive function linkitems(). as only
reachable items get linked theres no danger of dangeling pointers.
2013-09-05 00:55:58 +02:00
cinap_lenrek cca9a1b523 abaco: fix memory leaks 2013-09-04 21:27:59 +02:00
cinap_lenrek 32236b4957 libhtml: fix memory leaks 2013-09-04 21:27:15 +02:00
cinap_lenrek 425338fd1f webfs: add exits(0) to main() 2013-09-03 21:27:48 +02:00
cinap_lenrek c1562daee0 libhtml: fix double free of form action 2013-09-02 23:18:46 +02:00
cinap_lenrek b14138c2ae 9bootfat: always try plan9 partition even when not marked active, fix bug
always look for 9fat in plan9 partition even tho the partition
is *not* maked active. marking partitions active is not
recommended anymore with grub so this makes life easier for
some people. multiple plan9 partitions on a single drive
is not supported.

have to copy partition table as buf gets trashed when reading
first block of fat partition. it worked only when the first
fat partition found (the one marked active) was the right one,
but conffat() can fail.
2013-09-01 21:18:11 +02:00
ppatience0 243cb68011 jpg(1), jpg: add -y flag to usage
png: colorspace will never be CYCbCr (this is no
doubt from copy-pasting from jpg)

tif: everyone else uses colorspace as a function
argument, so we will too

readtif, writetif: credit paul bourke
2013-08-31 13:39:51 -04:00
cinap_lenrek f104cc9d79 usbehci: portreset timing
assert port reset for 50ms, not 10ms.
2013-08-30 16:00:03 +02:00
mveety f459320bb4 removed unused variable resize in wind.c 2013-08-28 23:05:52 -04:00
mveety ba7c22f781 Added the p9p acme patch the allows multiline tags (thanks rsc and lf94). 2013-08-28 23:01:23 -04:00
cinap_lenrek 12ecb3e568 usbehci: fix portreset.
Port Reset R/W. 1=Port is in Reset. 0=Port is not in Reset. Default = 0. When
software writes a one to this bit (from a zero), the bus reset sequence as defined in the
USB Specification Revision 2.0 is started. Software writes a zero to this bit to terminate
the bus reset sequence. Software must keep this bit at a one long enough to ensure the
reset sequence, as specified in the USB Specification Revision 2.0, completes. Note:
when software writes this bit to a one, it must also write a zero to the Port Enable bit.
Note that when software writes a zero to this bit there may be a delay before the bit
status changes to a zero. The bit status will not read as a zero until after the reset
has completed.
2013-08-27 19:01:41 +02:00
cinap_lenrek d76eccaf88 imap4d: apply djc's patch to fix search (from /n/sources/patch/imap4d-cistrcmp)
Fix SEARCH command in imap4d by replacing the cistrstr typo with cistrcmp.
2013-08-27 00:34:17 +02:00
cinap_lenrek 43d3c87294 devproc: properly handle exclusive refcount for /proc/trace 2013-08-27 23:57:17 +02:00
cinap_lenrek 84109a3159 devshr, devaudio: openmode()/devopen() error handling 2013-08-27 23:27:46 +02:00
cinap_lenrek 52a84514ac devmouse: fix openmode() handling
openmode() can raise error with invalid mode passed, but we already
incremented the exclusive mouse refcount at that point! call openmode()
early to avoid this.
2013-08-27 23:26:30 +02:00
cinap_lenrek 244d2ee84b devkbd: fix wrong refcount on open error
only decrement refcount when file was successfully opend
on clunk, fix refcount when devopen() errors.
2013-08-27 23:23:29 +02:00
cinap_lenrek 5e37e6361c etheriwl: recover from rfkill toggle or firmware crash
spawn a kernel process to check the broken state of the controller.
if the firmware crashed, or rfkill was toggled we will reset and
reboot the firmware. also power down the card when rfkill is off.
2013-08-25 18:50:14 +02:00
ppatience0 334054e0e7 nusb/ether: add aue driver for admtek pegasus usb ethernet adapter 2013-08-24 19:18:15 -04:00
cinap_lenrek 808480f76b usbehci, usbuhci: paranoia
double the td abort delay and make sure the tsleep() isnt
shortened by a pending note. in that case, tsleep() would
raise error(Eintr); immidiately and would not sleep the
requested amount potentially cauing us to release active
dma memory too early! so we wrap the tsleep() call in a
while(waserror()) so we will at least wait the Abortdelay
amount if error is raised.

also, only try to idle the still active td's.

do not copy data in epio() when there was an error, theres
no reason to touch user buffer in that case.

for uhci, we also check that theres not more data in the
buffers than requested to avoid overflowing user buffer
in epio(). this should not happen but we'r paranoid.

for ehci, we also halt the queue head first in aborttds().
mark the queue heads as Qfree after unlinking and remove
some silly nil checks that are impossible.
2013-08-25 22:03:02 +02:00
stanley lieber 1556afae40 2c(1), torrent(1), uhtml(1), kbd(3), cwfs(4), hgfs(4), cifsd(8), cryptsetup(8), hjfs(8), kbdfs(8), realemu(8), wpa(8): fix spelling, typos 2013-08-23 15:48:52 -04:00
stanley lieber eca2dbed8b audio(1), hget(1), nusb(4), page(1): fix spelling, typos 2013-08-23 11:27:30 -04:00
stanley lieber d2ac298a80 webfs(4): read the whole man page before committing corrections 2013-08-23 11:15:52 -04:00