Commit graph

2924 commits

Author SHA1 Message Date
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
stanley lieber e1dfd6defe webfs(4): fix typo 2013-08-23 11:07:59 -04:00
stanley lieber 4ac8d862c1 webfs(4): correct typo 2013-08-22 17:58:51 -04:00
stanley lieber 89c964d0a4 fortunes: seems that so much is up on the net, it is hard to comprehend it all. 2013-08-22 12:15:29 -04:00
stanley lieber e112160105 file(1): recognize AAC audio files, from sources 2013-08-22 12:14:57 -04:00
cinap_lenrek e5095cca49 wifi: remove pool.h include 2013-08-20 19:48:39 +02:00
cinap_lenrek 9a3a722dde rc: flush environment variables (update /env) before fork
on races... normal forks will all share the /env environment but
not the in memory variables of rc. so when we would normally fork
whoever does an exec (flush) first will override what the values of the
/env variables are, *independent* of the variables that where
actually modified *in* the process.

when we flush *before* fork, then at least both processes start out
with marked clean in memory variables and the processes will flush
only the things they actually change.
2013-08-20 23:56:15 +02:00
cinap_lenrek d8cd5d197d rio: position keyboard window (-k) at the bottom of the screen 2013-08-20 23:48:18 +02:00
cinap_lenrek a0bc81f0be bitsy/keyboard: dont resize our own window
the resizing fails if run with rio in rio. dont try
to be too clever.
2013-08-20 23:36:04 +02:00
cinap_lenrek dda7b2c49f wpa: repeat rsne setup after deassociation (roamng between access points)
the "auth" ctl command only sets the rsne of the current selected
access point. so on deassociation, we wait for the connection to
the potentially new access point and then setup new rsne before
processing eapol messages.
2013-08-19 16:07:07 +02:00
stanley lieber 232dad19ad fortunes: GitHub is down...uh...now what? 2013-08-15 12:12:26 -04:00
cinap_lenrek 3c3a573562 libsec: only send client cert when we have one (fix regression from r6e976b2004dd) 2013-08-15 00:29:42 +02:00
cinap_lenrek c23a2f6a79 libc: Prevent infinite recursion when modf is called with NaN or Inf argument. (apply richard millers / modf-nan patch from sources) 2013-08-14 18:49:45 +02:00
cinap_lenrek 508b53a29a libdraw: fix leftover processes or programs failing to restore window labels when receiving interrupt note
fix the default note handler for event programs. only handle non system
notes or notes in the slave processes. for interrupt in the main process,
just call exits() which will do the cleanup and restore window label
properly.

this makes completely overriding the note handler in gping and
stats uneccesary.
2013-08-13 21:46:13 +02:00
cinap_lenrek df9597ecde resample: fix XRGB32 color channel handling 2013-08-12 19:28:10 +02:00
cinap_lenrek 1b58ec9279 esd: enlightenment sound daemon
this program allows one to stream audio from linux/windows
to plan9 /dev/audio. sometimes handy to augment vnc sessions
with sound.
2013-08-12 03:43:42 +02:00
cinap_lenrek d4f39b35bf games/doom: remove useless allocation of screen[0] buffer
screens 0-3 are already initialized by V_Init().
2013-08-12 00:40:09 +02:00
cinap_lenrek 762093d212 games/juggle, games/catclock: keep up with queued mouse events
many queued mouse events delay eresize() because
new ebread() takes from the queue first before attempting
to read from the event pipe. this is a waste of memory, so
just process (dequeue) all the events as long as there are
any on each iteration.
2013-08-12 00:08:51 +02:00
cinap_lenrek 883ded7b49 catclock: protect black border with clip rectangle and dont print when window is too small 2013-08-12 23:31:53 +02:00