]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
10 years agopool: update debug log format string for poolallocalign()
cinap_lenrek [Tue, 17 Dec 2013 14:32:48 +0000 (15:32 +0100)]
pool: update debug log format string for poolallocalign()

10 years agodevether: fix spelling mistype
cinap_lenrek [Tue, 17 Dec 2013 11:48:17 +0000 (12:48 +0100)]
devether: fix spelling mistype

10 years agoether82598, ether82563: remove packblock() avoidance hack
cinap_lenrek [Mon, 16 Dec 2013 20:47:06 +0000 (21:47 +0100)]
ether82598, ether82563: remove packblock() avoidance hack

10 years agoetheryuk: fix problems with yukon2 ep+ rev0, deoptimize
cinap_lenrek [Mon, 16 Dec 2013 20:39:22 +0000 (21:39 +0100)]
etheryuk: fix problems with yukon2 ep+ rev0, deoptimize

10 years agodevether: remove qfull prints and fix loopback packet handling of etheroq()
cinap_lenrek [Mon, 16 Dec 2013 18:19:15 +0000 (19:19 +0100)]
devether: remove qfull prints and fix loopback packet handling of etheroq()

dont spam the console with qfull warnings. this makes things worse.

handle loopback packets as stated in the comment. we call etheriq()
with fromwire=1 for loopback packets so etheriq() can pass the packet
on (without copying) or free it. dont inhibit interrupts while calling
etheriq(). etheriq() can safely be called from process and interrupt
context. it is unclear what this was supposed to fix and testing didnt
seem to have any odd effects.

10 years agodevssl: use parsecmd() to process control message to get rid of 128 byte stack buffer...
cinap_lenrek [Mon, 16 Dec 2013 09:06:34 +0000 (10:06 +0100)]
devssl: use parsecmd() to process control message to get rid of 128 byte stack buffer limit

 (11:02:29 PM) me: why is buf in /sys/src/9/port/devssl.c:/^sslwrite only 128 bytes?
 (11:02:58 PM) me: it makes it so you can't use a 128 bytes secret as negotiated by infauth in a secretin or secretout ctl message
 (11:03:30 PM) me: which in turn means you can't use such a secret with pushssl(2)
 (11:06:15 PM) me: inferno's sslwrite is limited to 32 bytes, but its ssl library writes to the secret files instead of to the ctl file
 (11:08:50 PM) mischief: what should it be instead of 128 bytes
 (11:08:58 PM) me: larger
 (11:09:16 PM) mischief: how about 129 bytes?
 (11:09:59 PM) me: also broken in 9front, by the way
 (11:15:14 PM) me: i guess it should be replaced with parsecmd

10 years agoexportfs: get rid of limits, cleanup
cinap_lenrek [Sun, 15 Dec 2013 06:49:53 +0000 (07:49 +0100)]
exportfs: get rid of limits, cleanup

get rid of the service buffer limit. keep service buffers
on a global freelist protected by lock.

dont fatal when we hit the process limit. instead, just
abort the rpc with an error.

handle rendezvous() interrupts.

10 years agogod damn it forgot fucking fns.h from my last commit
Matthew Veety [Fri, 13 Dec 2013 07:24:15 +0000 (02:24 -0500)]
god damn it forgot fucking fns.h from my last commit

10 years agoAdded in /dev/cputemp for bcm kernel (Thanks Krystian!)
Matthew Veety [Fri, 13 Dec 2013 07:20:29 +0000 (02:20 -0500)]
Added in /dev/cputemp for bcm kernel (Thanks Krystian!)

10 years agocifs(4): fix documentation for -d flag
cinap_lenrek [Wed, 11 Dec 2013 05:48:02 +0000 (06:48 +0100)]
cifs(4): fix documentation for -d flag

10 years agofactotum: add ntlmv2 (mschap2) client auth for cifs
cinap_lenrek [Wed, 11 Dec 2013 04:48:48 +0000 (05:48 +0100)]
factotum: add ntlmv2 (mschap2) client auth for cifs

10 years agodraw: fix drawing of replicated source image on memlayer with a clip rectangle
cinap_lenrek [Mon, 9 Dec 2013 02:35:01 +0000 (03:35 +0100)]
draw: fix drawing of replicated source image on memlayer with a clip rectangle

when a replicated source image with a clipr with clipr.min > Pt(0, 0),
drawclip() would properly translate the src->clipr on the dstr
but then clamp the source rectangle back on src->r.

while traversing down multiple layers, this would cause the translation to
be applied multiple times to the dst rectangle giving the wrong image result.

this change adds a new drawclipnorepl() function that avoids the clamping
of source and mask rectangles to src->r and mask->r. this is then used in
libmemlayer.

the final memimagedraw() call will call drawclip() which will do the final
claming.

a testcase is provided:

#include <u.h>
#include <libc.h>
#include <draw.h>

Image *blue;
Image *red;

void
main(int, char *argv[])
{
Image *i;

if(initdraw(nil, nil, argv[0]) < 0)
sysfatal("initdraw: %r");
i = allocimage(display, screen->r, screen->chan, 1, DWhite);

red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed);
blue = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPaleblue);
replclipr(red, 1, Rect(10, 10, 110, 110));
replclipr(blue, 1, Rect(11, 11, 111, 111));

/* draw on non-layer, works correctly */
draw(i, i->r, red, nil, ZP);
draw(i, i->r, blue, nil, ZP);
draw(screen, screen->r, i, nil, i->r.min);
flushimage(display, 1);

/* draw on (screen) layer is too far to the right */
draw(screen, screen->r, red, nil, ZP);
draw(screen, screen->r, blue, nil, ZP);
flushimage(display, 1);

for(;;){
sleep(1000);
}
}

10 years agocifs: fix compiler warning
cinap_lenrek [Sun, 8 Dec 2013 07:38:44 +0000 (08:38 +0100)]
cifs: fix compiler warning

10 years agohandle NIL user domain, and Z(4) at end of nt blob for ntlmv2
cinap_lenrek [Sun, 8 Dec 2013 07:34:31 +0000 (08:34 +0100)]
handle NIL user domain, and Z(4) at end of nt blob for ntlmv2

the nt blob ends with 4 zero bytes, this is not the same as
the EOL av-pair terminator!

this makes ntlmv2 work with windows xp with LmCompatibityLevel = 3

10 years agoexperimental ntlmv2 server authenticaion support for cifsd
cinap_lenrek [Sun, 8 Dec 2013 01:22:12 +0000 (02:22 +0100)]
experimental ntlmv2 server authenticaion support for cifsd

extending factotums and the auth servers mschap implementation
to handle variable length NT response for NTLMv2.

fix some minor bugs.

only tested with cifs so far.

10 years agokernel: simplify pexit(), avoid making wait record for RFNOWAIT (parentless) procs
cinap_lenrek [Sat, 7 Dec 2013 07:25:26 +0000 (08:25 +0100)]
kernel: simplify pexit(), avoid making wait record for RFNOWAIT (parentless) procs

replaced the p->pid != 0 check with up->parentpid != 0 so
p->pid == up->parentpid is never true for p->pid == 0.

avoid allocating the wait records when up->parentpid == 0.

10 years agodevproc: make sure /proc/n/wait waits for the right process children
cinap_lenrek [Sat, 7 Dec 2013 06:17:32 +0000 (07:17 +0100)]
devproc: make sure /proc/n/wait waits for the right process children

theres a race when we wait for a process children and that
process exits before we sleep().

10 years agokernel: fix pexit() Waitmsg memory leak.
cinap_lenrek [Sat, 7 Dec 2013 04:38:31 +0000 (05:38 +0100)]
kernel: fix pexit() Waitmsg memory leak.

when a process got forked with RFNOWAIT, its p->parent will still
point to the parent process, but its p->parentpid == 0.

this causes the "parent still alive" check in pexit to get confused
as it only checked p->pid == up->parentpid. this condition is *TRUE*
in the case of RFNOWAIT when the parent process is actually dead
(p->pid == 0) so we attached the wait structure to the dead parent
leaking the memory.

10 years agogif: remove warning when animated gif is rendered to bitmap
cinap_lenrek [Fri, 6 Dec 2013 23:53:01 +0000 (00:53 +0100)]
gif: remove warning when animated gif is rendered to bitmap

10 years agomothra: remove debug code, dont create $home/lib/mothra/mothra.err file
cinap_lenrek [Fri, 6 Dec 2013 23:51:19 +0000 (00:51 +0100)]
mothra: remove debug code, dont create $home/lib/mothra/mothra.err file

10 years agoetheriwl.c: add did 4232 for intel wifi link 5100 (thanks, hmr)
stanley lieber [Fri, 6 Dec 2013 14:43:52 +0000 (09:43 -0500)]
etheriwl.c: add did 4232 for intel wifi link 5100 (thanks, hmr)

10 years agolibthread: avoid calling thread waiting for fork/execed process to finish if we dont...
cinap_lenrek [Fri, 6 Dec 2013 04:03:35 +0000 (05:03 +0100)]
libthread: avoid calling thread waiting for fork/execed process to finish if we dont have to

we do not need to wait for fork/execed program to finish when
not collecting waitmsg. this reduces the number of rio
processes hanging arround for each window shell just waiting
for it to terminate and then dumping the waitmsg.

10 years agotelnet: simplify previous change by moving the notkbd check into consctlcmd()
cinap_lenrek [Thu, 5 Dec 2013 21:43:44 +0000 (22:43 +0100)]
telnet: simplify previous change by moving the notkbd check into consctlcmd()

10 years agocpu: add -n flag for the remote site to allow "none" authentification method (inspire...
cinap_lenrek [Thu, 5 Dec 2013 21:39:43 +0000 (22:39 +0100)]
cpu: add -n flag for the remote site to allow "none" authentification method (inspired from sources cpu-noauth patch)

10 years agotelnet: disable changing raw mode when a pipe was being used (from sources telnet...
cinap_lenrek [Thu, 5 Dec 2013 21:05:57 +0000 (22:05 +0100)]
telnet: disable changing raw mode when a pipe was being used (from sources telnet-notkbd patch)

This patch corrects a minor problem with telnet when using
the notkbd option (-n).

10 years agondb/dns: check bad name length in convM2DNS.c:^gname()
cinap_lenrek [Thu, 28 Nov 2013 22:47:49 +0000 (23:47 +0100)]
ndb/dns: check bad name length in convM2DNS.c:^gname()

10 years agou9fs: fix misuse of Fcall.afid in p9any authentication module. (from sources patch...
cinap_lenrek [Thu, 28 Nov 2013 22:06:03 +0000 (23:06 +0100)]
u9fs: fix misuse of Fcall.afid in p9any authentication module. (from sources patch/u9fs-afid)

U9fs(4) misuses Fcall.afid in its p9any authentication module.

The afid field of Fcall structure is only valid with Tauth or Tattach.
Tread, Twrite, Tclunk should use rx->fid instead.  It's been lucky so
far to get the job done because rx->afid survives from previous
Tauth/Tattach.  The issue pops up when several authentications happen
concurrently.

Test case:
u9fs = 'host with u9fs on tcp!*!564'
9fs $u9fs; for(i in 1 2 3 4 5 6 7 8){ 9fs $u9fs & }; wait
Should:
no errors
Should not:
mount failed: authentication failed

10 years agondb/dns: do dnresolve() loopcheck only on hosts that we havnt already tried
cinap_lenrek [Tue, 26 Nov 2013 21:31:23 +0000 (22:31 +0100)]
ndb/dns: do dnresolve() loopcheck only on hosts that we havnt already tried

we might get a unreachable nameserver ip from a parent
nameserver. if the remaining set of nameservers does not
loop, we should try to resolve them.

so skip the loopcheck for nameservers already tried.

10 years agotheo: Don't like it? Then walk away.
stanley lieber [Mon, 25 Nov 2013 03:11:46 +0000 (22:11 -0500)]
theo: Don't like it?  Then walk away.

10 years agofaces: use 9front icon for googlecode.com/plan9front
cinap_lenrek [Mon, 25 Nov 2013 22:22:05 +0000 (23:22 +0100)]
faces: use 9front icon for googlecode.com/plan9front

10 years agoabaco: make validurl() accept internationalized domain names
cinap_lenrek [Mon, 25 Nov 2013 22:04:06 +0000 (23:04 +0100)]
abaco: make validurl() accept internationalized domain names

validurl() is just used to check if the string is a full
absolute url with a protocol scheme. we do not have to
match the host part *exactly*, only if there is *something*
in the hostpart.

10 years agowebfs: preserve unicode hostname, only convert to ascii when sending over the wire
cinap_lenrek [Sun, 24 Nov 2013 20:28:48 +0000 (21:28 +0100)]
webfs: preserve unicode hostname, only convert to ascii when sending over the wire

we'd like to keep Url.host in unicode for factotum key
lookup. only when we send the url in a request, we have
to convert it to ascii.

10 years agowebfs: support for internationalized domain name urls
cinap_lenrek [Sun, 24 Nov 2013 10:56:33 +0000 (11:56 +0100)]
webfs: support for internationalized domain name urls

10 years agondb/dns: add support for internationalized domain names
cinap_lenrek [Sun, 24 Nov 2013 10:55:26 +0000 (11:55 +0100)]
ndb/dns: add support for internationalized domain names

10 years agokbdfs: fix ctlr+alt+del with new escape pages
cinap_lenrek [Sun, 24 Nov 2013 08:07:28 +0000 (09:07 +0100)]
kbdfs: fix ctlr+alt+del with new escape pages

10 years agofaces: add 9front.org/unknown (thanks qrstuv)
cinap_lenrek [Sat, 23 Nov 2013 21:08:19 +0000 (22:08 +0100)]
faces: add 9front.org/unknown (thanks qrstuv)

10 years agondb/dns: ignore refused (5) error replies
cinap_lenrek [Sat, 23 Nov 2013 03:46:14 +0000 (04:46 +0100)]
ndb/dns: ignore refused (5) error replies

10 years agoremoving (outdated) drawterm
cinap_lenrek [Sat, 23 Nov 2013 00:05:33 +0000 (01:05 +0100)]
removing (outdated) drawterm

drawterm is much better maintained by russ cox,
so removing this outdated copy.

for a more recent version, go to:

http://swtch.com/drawterm/

10 years agokbdfs: add esc1+shift and esc1+ctrl pages (see sources kbmap-uk-weird patch)
cinap_lenrek [Fri, 22 Nov 2013 23:50:15 +0000 (00:50 +0100)]
kbdfs: add esc1+shift and esc1+ctrl pages (see sources kbmap-uk-weird patch)

Add pages for esc1+shift and esc1+ctrl - some UK USB keyboards (Dell) and it seems some
German ones: https://groups.google.com/forum/#!topic/comp.os.plan9/ycok6NTCWCg seem to
generate an esc1 + code scancode combination for the pipe/backslash key. Seems like
overkill to add two whole pages for just two keys, but there again RAM is cheap these days.

Probably should take the changes across to omap/kbd.c (and by extension bcm/kbd.c)
but the changes are trivial.

10 years agokernel: more kproc pexit() and sleep error handling
cinap_lenrek [Fri, 22 Nov 2013 21:56:34 +0000 (22:56 +0100)]
kernel: more kproc pexit() and sleep error handling

10 years agopc kernel: kproc error and exit
cinap_lenrek [Fri, 22 Nov 2013 21:29:31 +0000 (22:29 +0100)]
pc kernel: kproc error and exit

catch the error() that can be thrown by sleep() and tsleep()
in kprocs.

add missing pexit() calls.

always set the freemem argument to pexit() from kproc otherwise
the process gets added to the broken list.

10 years agokernel: kproc error and exit
cinap_lenrek [Fri, 22 Nov 2013 21:28:20 +0000 (22:28 +0100)]
kernel: kproc error and exit

catch the error() that can be thrown by sleep() and tsleep()
in kprocs.

add missing pexit() calls.

always set the freemem argument to pexit() from kproc otherwise
the process gets added to the broken list.

10 years agoacme: fix arrow key oddity (thanks mark van atten and erik)
cinap_lenrek [Fri, 22 Nov 2013 18:19:37 +0000 (19:19 +0100)]
acme: fix arrow key oddity (thanks mark van atten and erik)

from 9atom/acmearrowfun patch:

reported by mark van atten

In Plan 9 acme, if you type

{}

then go back and type text between the brackets

{Curiouser and curiouser!}

the right arrow is blocked when you want to go over the closing
bracket to continue typing to its right. (If you first go to the left,
and then back to the right, it works.)

Same for the other brackets: [ ], ( ), < >.

noted that brackets are not necessary.  same behavior with any
character.

fix is to textcommit before moving.

10 years agorio -b: make lighttitlecol darker
stanley lieber [Wed, 20 Nov 2013 23:40:51 +0000 (18:40 -0500)]
rio -b: make lighttitlecol darker

10 years agofortunes: That's the process.
stanley lieber [Wed, 20 Nov 2013 23:38:49 +0000 (18:38 -0500)]
fortunes: That's the process.

10 years agondb/dns: filter dns answers avoiding cache poisoning
cinap_lenrek [Wed, 20 Nov 2013 21:35:52 +0000 (22:35 +0100)]
ndb/dns: filter dns answers avoiding cache poisoning

only cache what we asked for or need to resolve the
query. filter out everything else.

10 years agondb/dns: another attempt...
cinap_lenrek [Sun, 17 Nov 2013 05:55:39 +0000 (06:55 +0100)]
ndb/dns: another attempt...

we have to fail the whole query that got no cached
nameservers and nameservers are looping, not just omit
the looping nameserver. issuequery() will refresh
nameserver info for the domain when recursing up.

10 years agondb/dns: detect query loops
cinap_lenrek [Sat, 16 Nov 2013 03:42:09 +0000 (04:42 +0100)]
ndb/dns: detect query loops

never try to resolve a nameserver address when that nameserver
is in the set of nameservers already being queried.

this situation can happen when the Ta and Taaaa RR's expire, but
the Tns records are still in the cache so there is no usable
nameserver but they still refer to each another.

10 years agondb/dns: various changes
cinap_lenrek [Fri, 15 Nov 2013 01:00:47 +0000 (02:00 +0100)]
ndb/dns: various changes

stop absolute/relative dual use of RR.ttl. now RR.ttl is
*always* the *relative* ttl value. we derive absolute
timeout in RR.expire.

remove unused lookuptime field in DN. replace refs and
keep with mark field in DN. we do not care about the
number of references. only *iff* it is referenced, so
use a single bit for that (bit 0). for keep, we use
bit 1.

remove dolock parameter in dnagenever(), it is not
needed. we always need to lock.

mark local dns servers and domains as never to be aged.

the keeper bit is *just* a cache optimization, preventing
the domain and the domains it points to from being flushed.
it should not be used as a write protect bit in rrattach()
for preventing spoofing as it will prevent updates of say,
cname domains.

remove "removing spam ..." message. these are usualy just
hints, so normal. still, remove the hint as we currently
do no check if the nameserver has authority over the
cname domain.

remove "mydnsquery: trying to send to myself (%s); bzzzt"
message. this can happen when myaddr() fails for other
reasons. myaddr() will print error for us anyway.

10 years agondb/dns: case sensitive ndb attributes, Domlen consistency, dblookup() inplace lower...
cinap_lenrek [Wed, 13 Nov 2013 17:44:45 +0000 (18:44 +0100)]
ndb/dns: case sensitive ndb attributes, Domlen consistency, dblookup() inplace lower case conversion, cleanups

ndb keys are strictly case sensitive, so consitently
use strcmp() when comparing attribute keys.

dblookup() used to lower case convert its name argument
inplace to match domain/sys name in ndb. better to do
the convesion in its own buffer and only read from the
name argument.

always use cistrcmp() when comparing DN.name.

the Domlen constant denotes the size of the buffer including
the null terminator. consistently use it as such.

have to hold dnlock in freearea() before reading list
head pointer.

10 years ago/lib/roa: fix blank line at the end
cinap_lenrek [Tue, 12 Nov 2013 21:36:46 +0000 (22:36 +0100)]
/lib/roa: fix blank line at the end

10 years agokernel: handle memimageinit() error
cinap_lenrek [Tue, 12 Nov 2013 20:43:38 +0000 (21:43 +0100)]
kernel: handle memimageinit() error

10 years agolibmemdraw: change memimageinit() to return integer error (for kernel), minor cleanups
cinap_lenrek [Tue, 12 Nov 2013 20:42:05 +0000 (21:42 +0100)]
libmemdraw: change memimageinit() to return integer error (for kernel), minor cleanups

10 years agodevsd: fix scsi emulation for disks bigger than 4 billion sectors (from erik quanstro...
cinap_lenrek [Tue, 12 Nov 2013 19:00:15 +0000 (20:00 +0100)]
devsd: fix scsi emulation for disks bigger than 4 billion sectors (from erik quanstros 9atom)

for read capacity (10 (0x25) if we have more than
4 billion sectors, we must not return nsectors % (1<<32),
we must return 0xffffffff.

10 years agolibjson: don't perform chartorune in getch() when char is null terminator, and remove...
BurnZeZ [Sun, 10 Nov 2013 08:35:25 +0000 (03:35 -0500)]
libjson: don't perform chartorune in getch() when char is null terminator, and remove empty string check added last commit

10 years agolibjson: check for empty string in jsonparse()
BurnZeZ [Mon, 11 Nov 2013 01:11:46 +0000 (20:11 -0500)]
libjson: check for empty string in jsonparse()

10 years agosdide: add pci did for VIA VT6415 PATA IDE controller
BurnZeZ [Mon, 11 Nov 2013 00:40:01 +0000 (19:40 -0500)]
sdide: add pci did for VIA VT6415 PATA IDE controller

10 years agoarch(3): english
stanley lieber [Sun, 10 Nov 2013 23:44:33 +0000 (18:44 -0500)]
arch(3): english

10 years agoarch(3), aml(2): document /dev/acpitbls file
cinap_lenrek [Sun, 10 Nov 2013 20:26:11 +0000 (21:26 +0100)]
arch(3), aml(2): document /dev/acpitbls file

10 years agondb/common: add ipv6 addresses of root name servers
cinap_lenrek [Sun, 10 Nov 2013 18:35:33 +0000 (19:35 +0100)]
ndb/common: add ipv6 addresses of root name servers

10 years agoaml(2): tabelize by function, move hardware linkage on separate page
cinap_lenrek [Sun, 10 Nov 2013 17:58:00 +0000 (18:58 +0100)]
aml(2): tabelize by function, move hardware linkage on separate page

10 years agomerge
cinap_lenrek [Fri, 8 Nov 2013 21:33:48 +0000 (22:33 +0100)]
merge

10 years agokernel: make image cache not hold onto the channel, remove nocache flag
cinap_lenrek [Fri, 8 Nov 2013 21:31:26 +0000 (22:31 +0100)]
kernel: make image cache not hold onto the channel, remove nocache flag

the image cache should not hold onto the text file channel
when not neccesary. now, the image keeps track of the number
of page cache references in Image.pgref. if the number of
page cache references and Image.ref are equal, this means
all the references to this image are from the page cache.
so no segments are using this image. in that case, we can
close the channel, but keep the Image in the hash table.

when attachimage() finds our image, it will check if Image.c
is nil and reattach the channel to the image before it is
used.

the Image.nocache flag isnt needed anymore.

10 years ago/rc/bin/": fix typo
stanley lieber [Fri, 8 Nov 2013 20:19:32 +0000 (15:19 -0500)]
/rc/bin/": fix typo

10 years agoacidleak: show free blocks as free (leak -b)
cinap_lenrek [Fri, 8 Nov 2013 16:42:15 +0000 (17:42 +0100)]
acidleak: show free blocks as free (leak -b)

10 years agofortunes: that's great
stanley lieber [Thu, 7 Nov 2013 19:02:34 +0000 (14:02 -0500)]
fortunes: that's great

10 years ago/rc/bin/", /rc/bin/"": handle the venerable ; prompt
stanley lieber [Thu, 7 Nov 2013 19:01:42 +0000 (14:01 -0500)]
/rc/bin/", /rc/bin/"": handle the venerable ; prompt

10 years agomerge
cinap_lenrek [Wed, 6 Nov 2013 21:19:59 +0000 (22:19 +0100)]
merge

10 years agomp3dec: fix volume for mp3dec
cinap_lenrek [Wed, 6 Nov 2013 21:18:36 +0000 (22:18 +0100)]
mp3dec: fix volume for mp3dec

the libmad samples need to be scaled properly. the
previous assumption was that it is 32 bits, but it
really is MAD_F_FRACTBITS + sign bit and rest used
for overflow.

thanks eekee!

10 years agosynchronize ape's vfprintf with libstdio
mischief [Wed, 6 Nov 2013 19:22:15 +0000 (11:22 -0800)]
synchronize ape's vfprintf with libstdio

in ape's vfprintf we don't check if the file we're writing is actually a string buffer, resulting in a return of -1, when we should actually return the number of bytes that would be written.

10 years agomerge
cinap_lenrek [Tue, 5 Nov 2013 07:01:43 +0000 (08:01 +0100)]
merge

10 years agorio: eleminate temporary allocations before frinsert() and in namecomplete()
cinap_lenrek [Tue, 5 Nov 2013 07:00:26 +0000 (08:00 +0100)]
rio: eleminate temporary allocations before frinsert() and in namecomplete()

frinsert() shouldnt modify the runes passed and the
buffer isnt going to be modified my us during the call
so removing the temporary copies.

namecomplete() makes utf-8 copies of the rune strings so
theres no need to copy the runes.

10 years agofortunes: AFTER READ THE PAGE YOU UNDRSTAND WHAT IM TALKING TO YOU !
stanley lieber [Mon, 4 Nov 2013 01:01:52 +0000 (20:01 -0500)]
fortunes: AFTER READ THE PAGE YOU UNDRSTAND WHAT IM TALKING TO YOU !

10 years agoaml(2): english
stanley lieber [Mon, 4 Nov 2013 01:01:03 +0000 (20:01 -0500)]
aml(2): english

10 years agoaml(2): fix amldelay() decscription. it takes microseconds, not milliseconds.
cinap_lenrek [Sun, 3 Nov 2013 23:09:28 +0000 (00:09 +0100)]
aml(2): fix amldelay() decscription. it takes microseconds, not milliseconds.

10 years agoadd aml(2) manual page
cinap_lenrek [Sun, 3 Nov 2013 21:13:03 +0000 (22:13 +0100)]
add aml(2) manual page

10 years agorio: do backspace \b processing inplace avoiding buffer allocation
cinap_lenrek [Sun, 3 Nov 2013 03:03:38 +0000 (04:03 +0100)]
rio: do backspace \b processing inplace avoiding buffer allocation

10 years agorio: cleanup and error handling
cinap_lenrek [Sat, 2 Nov 2013 23:34:35 +0000 (00:34 +0100)]
rio: cleanup and error handling

10 years agorio: huge simplification of flush handling
cinap_lenrek [Sat, 2 Nov 2013 16:54:42 +0000 (17:54 +0100)]
rio: huge simplification of flush handling

xfidflush() now uses a simpler way to flush another xfid.

when we can send to Xfid.c channel, we know that the
xfid is completed. so all xfidflush() needs todo is to
do an alt sending to both Xfid.c and Xfid.flushc.

once the send to Xfid.c succeeds, we know the xfid is gone
and we can respond to the flush request.

theres no need to keep track of flush state anymore. so
Xfid.active and Xfid.flushing can be removed.

note, that it is ok to respond normally to a currently
flushed request.

10 years agorio: add sanity check in xfidallocthread()
cinap_lenrek [Fri, 1 Nov 2013 20:28:03 +0000 (21:28 +0100)]
rio: add sanity check in xfidallocthread()

10 years agorio: enforce flush reply ordering for all xfids
cinap_lenrek [Fri, 1 Nov 2013 20:21:24 +0000 (21:21 +0100)]
rio: enforce flush reply ordering for all xfids

flushing isnt optional for concurrently handled requests.
we need to ensure that Rflush is replied *after* the
origianl request.

so we assign the flushtag for *every* xfid in xfidctl(),
and filsysrespond() checks if the xfid was flushed
*after* replying and wakes up the flushing xfid.

10 years agorio: properly handle follow up flushes (fixes unexpected reply tag)
cinap_lenrek [Fri, 1 Nov 2013 17:57:11 +0000 (18:57 +0100)]
rio: properly handle follow up flushes (fixes unexpected reply tag)

when multiple flushes are send, they need to be replied
in order. we ensure this by having the flush xfid taking
over the flushtag (synchronized with a new fs->csyncflush
channel) so the next flush will flush the previous flush.

10 years agomake auto negotiation work on 82562et (thanks mischief!)
cinap_lenrek [Fri, 1 Nov 2013 22:39:41 +0000 (23:39 +0100)]
make auto negotiation work on 82562et (thanks mischief!)

the diver used to skip auto negotiation when
auto-negotiation enable (bit 12 in command register)
was clear.

setting the bit now, which makes auto negotiation work.

we skip auto negotiation only when it was already enabled
and status regiser indicates completion (bit 9).

10 years agofix format compiler warning
cinap_lenrek [Thu, 31 Oct 2013 14:51:15 +0000 (15:51 +0100)]
fix format compiler warning

10 years agokernel: add support for multiboot memory map
cinap_lenrek [Thu, 31 Oct 2013 14:50:25 +0000 (15:50 +0100)]
kernel: add support for multiboot memory map

10 years agolibplumb: search for plumber only at /mnt/plumb, and don't try to mount $plumbsrv...
BurnZeZ [Thu, 31 Oct 2013 08:26:01 +0000 (04:26 -0400)]
libplumb: search for plumber only at /mnt/plumb, and don't try to mount $plumbsrv if the search fails

10 years agosmtp: fix free on uninitialized pointer
BurnZeZ [Wed, 30 Oct 2013 07:12:53 +0000 (03:12 -0400)]
smtp: fix free on uninitialized pointer

10 years agofix devshr related panic caused by Mount.to being nil (thanks mischief!)
cinap_lenrek [Wed, 30 Oct 2013 20:24:44 +0000 (21:24 +0100)]
fix devshr related panic caused by Mount.to being nil (thanks mischief!)

the shr mount is linked into the Mhead with m->to initially nil. only
after the the server has been attached is m->to set. just check for
it in createdir().

10 years agoinit: dont rely on path containing dot
cinap_lenrek [Tue, 29 Oct 2013 23:38:12 +0000 (00:38 +0100)]
init: dont rely on path containing dot

10 years agoplay: guess file type from file extension if mimetype fails
cinap_lenrek [Tue, 29 Oct 2013 23:09:27 +0000 (00:09 +0100)]
play: guess file type from file extension if mimetype fails

10 years agovt: discard unhandle OSC escapes, and use nelem instead of sizeof for title buffer
mischief [Mon, 28 Oct 2013 09:13:35 +0000 (02:13 -0700)]
vt: discard unhandle OSC escapes, and use nelem instead of sizeof for title buffer

10 years agolibjson: fix missing buffer free, slight cleanup
BurnZeZ [Mon, 28 Oct 2013 07:17:53 +0000 (03:17 -0400)]
libjson: fix missing buffer free, slight cleanup

10 years agolibjson: dynamically allocate buffer
BurnZeZ [Tue, 29 Oct 2013 03:21:07 +0000 (23:21 -0400)]
libjson: dynamically allocate buffer

10 years agorsa2ssh: fix the megashit
cinap_lenrek [Mon, 28 Oct 2013 08:20:07 +0000 (09:20 +0100)]
rsa2ssh: fix the megashit

10 years agoauth/rsa2ssh: add SSH2 RSA output format (from plan9port)
mischief [Mon, 28 Oct 2013 01:50:14 +0000 (18:50 -0700)]
auth/rsa2ssh: add SSH2 RSA output format (from plan9port)

10 years agocmd/vt: fix xterm function keys
mischief [Mon, 28 Oct 2013 01:40:21 +0000 (18:40 -0700)]
cmd/vt: fix xterm function keys

10 years agolibjson: fix mistake... (harmless)
cinap_lenrek [Mon, 28 Oct 2013 00:24:03 +0000 (01:24 +0100)]
libjson: fix mistake... (harmless)

10 years agolibjson: fix for 21 bit runes, implement utf-16 surrogates
cinap_lenrek [Mon, 28 Oct 2013 00:19:01 +0000 (01:19 +0100)]
libjson: fix for 21 bit runes, implement utf-16 surrogates

10 years agolibjson: fix mistake in unicode handler (thanks cinap)
BurnZeZ [Sun, 27 Oct 2013 23:29:02 +0000 (19:29 -0400)]
libjson: fix mistake in unicode handler (thanks cinap)

10 years agolibjson: handle unicode escapes
BurnZeZ [Sun, 27 Oct 2013 19:52:35 +0000 (15:52 -0400)]
libjson: handle unicode escapes