store errno on the private process stack so its always per process
and not just per memory space. errno itself becomes a macro
dereferencing int *_errnoloc; which is initialized from main9.s
pointing to the private stack location.
various fixes in programs that just imported errno variable with
"extern int errno;" instead of including <errno.h>.
in ape close(), do the real filedescriptor _CLOSE() *after* we cleared
the _fdinfo[] slot because once closed, we dont own the slot anymore and
another process doing open() can trash the slot. make sure open() retuns
fd < OPEN_MAX.
double check in _startbuf() holding mux->lock if the fd is already buffered
preveting running double copyprocs on a fd.
dont zero the mux->rwant/ewant bitmaps at the end of select() as we do not
hold the mix->lock.
in _closebuf() kill copyproc while holding the mux->lock to make sure the
copyproc isnt holding it at the time it is killed. run kill() multiple times
to make sure the proc is gone.
python uses processes sharing memory. it requires at least fopen() to
be called by multiple threads at once so we introduce _IO_newfile()
which allocates the FILE structure slot under a lock.
diskparts fails on thinkpad x200 sdcard reader if we dont
give the unit some time to startup. the device took about
100ms to become ready so status poll loop with a long
timeout would be overkill.
1. Go group spotted that a slightly-obscured pointer move was done by AMOVL not AMOVQ.
2. Inspecting the code further, I noticed that other pointer types were set to TLONG not TIND,
causing similar truncation of pointers to 32 bits.
add PASS_MAX to limits.h for ape, and make getpass respect it. also increase the size of
the maximum passwords (we use long ones at work). Needed for native port of SVN (in progress).
the kernel would go into endless loop when stating "stats" and "ifstats"
files and the network interface having no connections, or otherwise return
wrong stat info.
boot(8) claims that boot will launch /$objtype/init;
that is incorrect. It launches /$cputype/init (so says
both boot.c and cpurc(8)). That's the more sensible
choice. This patch fixes the man page to resolve the
mismatch.
the channel= plan9.ini parameter isnt needed anymore as we now
hop the channels to scan for beacons. the status is also indicated
with the link led :-)
handle all these flags on packet transmission like RTS for big
packets and sending data packets to the AP instead of broadcasting
everything.
properly setup bss hardware node table and filtering. now promisc
mode is only used when requested.
handle deauth message from ap.
increase node table to 32 entries.
Fix the behavior of exportfs -r.
Check the return of chdir(srv) to prevent exporting accidentally
the current working directory when the directory specified
with option -r doesn't exist.
Also fix at the same time the missing trailing \n in error
messages printed just before exits().
we gave wrong content-length in range requests. r->stop - r->start
is wrong because r->stop is the byte offset of the *last* byte, not
the *next* byte after the last.
Another band-aid fix to the usb mouse driver, to cope with a mouse which has
an interrupt endpoint number 3 but no number 1 or 2, and a report descriptor
more than 128 bytes long.
use the Srv.end callback for freeing the srv and closing the
file descriptor of a connection. this makes sure we wont free
the srv while there are still outstanding requests that would
access the srv when doing the respond() call.
we used to do getbuf() with nodata flag so it only worked when
we where lucky and got the same in memory block back. this
is uncritical once you have reamed the filesystem, its just
that sometimes ream would fail with "ream successfull, then
hjfs: fsinit: file ./hjfs not found".
in multithreaded programs, we have to wait until all outstanding
requests have been responded before closing down the srv.
dont make write errors sysfatal(), only print them. in case if
listensrv() is used we dont want to exit the process in respond()
called by some worker thread.
make sure Tversion is only handled when there are no outstanding
requests and make sure message size is sane.
on almost all machines, we get tons of these prints for pci busses that
are not physically there but are described in the ACPI namespace. the
reason that we enumerate these is because we do not enumerate _INI and _STA
methods to check if they are present. we just match the information with
the PCI devices we enumerated with our generic pci code. this works fine and
doesnt require aml code to poke arround in pci config space.
some controls are inverted. we reflect this by specifying
negative range in the volume table now and let genaudiovolread()
and genaudiovolwrite() do the conversion.
this makes sure tcp boot will have ther user /tmp's
the same way as from local cwfs. we used /srv/cwfs
to prevent a deadlock with 9660srv as a root filesystem
which has been fixed now.
we have to run the 9p service process in its own namespace
otherwise the attach filename might point onto the served
filesystem causing it to deadlock. this happens especially
if 9660srv is used as root filesystem. (cdboot)
set adc (recording) sample rate the same as playback for now.
make these separate entries later when we reintroduce in/out
attributes to volume controls.
access to non standard serial port COM3 at i/o port 0x200 causes
kernel panic on some machines (Toshiba Sattelite 1415-S115). also,
some machines have gameport at 0x200.
i readded uartisa to the pcf and pccpuf kernel configurations so
one can use plan9.ini to add non standard uarts like:
uart2=type=isa port=0x200 irq=5
instead of trying to make rio not change the window image too fast
and give the client some time to attach it (which turns out to be
impossible), we acknowledge that there is a race and just retry
the window reattach as long as the winname keeps changing in
gengetwindow().
if a window gets hidden/unhidden/resized too fast, the client might have no
chance attaching to that image using winname. so we move the window
offscreen instead and delay the freeimage() by doing it in the deletethread().
the text for a menu entry is drawn from:
y = textr.min.y + i*(font->height+Vspacing);
but we calculated the item from:
r = insetrect(textr);
i = (p.y - r.min.y) / (font->height+Vspacing);
the insetrect is wrong.
some devices freeze up with inqiry allocation length
other than 36 bytes. as we do not really care about
the vendor specific part of the inquiry, lets only do
36 byte inquiry for now.
previously, we had to maintain 3 sets of pci vid/did's:
1) in /lib/vgadb for detection
2) in the userspace driver in aux/vga
3) in the kernel mode driver
this change makes the kernel mode driver more dumb in
the cases where possible. we let userspace do the pci
enumeration and if needed, it can set the pci address
of the vga card. kernel mode drivers can assume to get
the right pci device passed in scr->pci for enable()
and linear() functions and just do very basic sanity
checking before mapping framebuffer and mmio regions.
vgalinearpciid() was removed as userspace is responsible
to pick pci device.
theres a new vgactl message "pcidev" where userspace
can set the bus address. we initialize scr->pci in
vgareset() to the first pci graphics card found. this
should cover cases when an old aux/vga binary is used
that doesnt use the new pcidev message.
userspace drivers will now use the pci device that got
a match from /lib/vgadb and skip ther own enumeration.
this way, vga cards can be made to work by simply adding
an entry in vgadb with no need to modify userspace or
kernelspace drivers. this is not always possible if
the driver derives information from the specific card
model.
after some thought, the file attachment headers Attach: and Include:
(before Inline:) are more like the Subject: line and should be interpreted
every time.
mouse acceleration can be done by software in the kernels
devmouse device like:
echo hwaccel off >/dev/mousectl
echo accelerated 5 >/dev/mousectl
it is hard to pass nusb/kb parameters anyway as it is started
from nusbrc in bootfs.paq, so i remove the option.
the unit inquiry data might change in case the drive got pulled
with ahci. so keep track if we locked the ctl in a local stack
variable instead of relying on that the inquiry data stays the
same.
Bread() always reads exactly nbytes of data if it can. only
when it reaches end of file or an error it will return less.
so the Breadn() function that was introduced has been removed.
sorry for the confusion.
matushita dvd-ram on thinkpad x301 hangs on the inquiry command
done from scsiverify(). not sure whats wrong with it, but at least
this makes the machine boot.
wait for the drives to become ready or missing in iaonline()
and iaverify() to prevent nobootprompt= race.
handle task file error status (this can happen for atapi)
under some circumstances and would hang the io if not
handled.
preventively poll interrupts from the checkdrive kproc in
case we loose interrupts (bad via machine).
implement bios handoff procedure.
make sure the port is idle before programming the port dma
regios in configdrive(), do not start command processing
on the port unless phylink has been established.
instead of forcing mouse to boot protocol, which often
doesnt work, we set it to report protocol and parse
the hid report descriptor. if thers no such descriptor
we revert to boot protocol.
all mouse packet parsing is done by report parser,
even for boot protocol. also all the work arrounds
for the leadbyte hack (report id?) are removed.
keyboards should not be affected by this change.
to support µ-law audio embedded in wav and big endian pcm
in sun audio files the µ-law and a-law and big endian integer
decoding was added to pcmconv. sundec now parses the sun
audio header supporting stereo now.
there are devices which do not return a string if used
with invalid language id, so at least try to use the first
one and choose english if failed.
this fixes CDC ethernet for N900