]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
8 years agokernel: dont rely on atoi() parsing hex for netif/devbridge
cinap_lenrek [Mon, 3 Aug 2015 14:24:14 +0000 (16:24 +0200)]
kernel: dont rely on atoi() parsing hex for netif/devbridge

8 years agowebcookies: fix typo
cinap_lenrek [Mon, 3 Aug 2015 13:52:03 +0000 (15:52 +0200)]
webcookies: fix typo

8 years ago9pcon: use strtol() to parse integers
cinap_lenrek [Mon, 3 Aug 2015 13:48:01 +0000 (15:48 +0200)]
9pcon: use strtol() to parse integers

8 years agolibcontrol: use strtol() to parse integer arguments
cinap_lenrek [Mon, 3 Aug 2015 13:32:16 +0000 (15:32 +0200)]
libcontrol: use strtol() to parse integer arguments

8 years agolibhttpd: use strtol to parse decimal character references in httpunesc()
cinap_lenrek [Mon, 3 Aug 2015 13:26:33 +0000 (15:26 +0200)]
libhttpd: use strtol to parse decimal character references in httpunesc()

8 years agosnoopy: dont rely on atoi() being able to parse hex
cinap_lenrek [Mon, 3 Aug 2015 12:58:41 +0000 (14:58 +0200)]
snoopy: dont rely on atoi() being able to parse hex

8 years agobitsy/keyboard: do not rely on atoi() being able to parse hex
cinap_lenrek [Mon, 3 Aug 2015 12:52:07 +0000 (14:52 +0200)]
bitsy/keyboard: do not rely on atoi() being able to parse hex

8 years agolibauthsrv: readnvram() use vlong for nvroff, parse $nvlen/$nvoff with strtol() inste...
cinap_lenrek [Mon, 3 Aug 2015 12:45:23 +0000 (14:45 +0200)]
libauthsrv: readnvram() use vlong for nvroff, parse $nvlen/$nvoff with strtol() instead of atoi()

8 years agowebcookies: use strtol() to parse HH:MM:SS
cinap_lenrek [Mon, 3 Aug 2015 12:28:16 +0000 (14:28 +0200)]
webcookies: use strtol() to parse HH:MM:SS

atoi() currently interprets leading zeros as octal (BUG!),
so use strtol with explicit base 10 avoiding the issue.

8 years agoaux/vga: dont rely on atoi() being able to parse hex
cinap_lenrek [Mon, 3 Aug 2015 12:24:29 +0000 (14:24 +0200)]
aux/vga: dont rely on atoi() being able to parse hex

8 years agodevenv: simplify envremove(), cleanup
cinap_lenrek [Mon, 3 Aug 2015 20:08:10 +0000 (22:08 +0200)]
devenv: simplify envremove(), cleanup

8 years agodevenv: avoid indirection, keep Evalue's allocated in an array
cinap_lenrek [Sun, 2 Aug 2015 19:39:33 +0000 (21:39 +0200)]
devenv: avoid indirection, keep Evalue's allocated in an array

avoid the indirection for envlookup() by allocating Evalue structs
together in an array. remove unused link field in Evalue.

8 years ago1c,2c,7c,kc,vc: honor suppress condition for outstring() in swt.c
cinap_lenrek [Sun, 2 Aug 2015 12:52:54 +0000 (14:52 +0200)]
1c,2c,7c,kc,vc: honor suppress condition for outstring() in swt.c

8 years agoipv6on: fix search for ip attribute (thanks kenji arisawa)
cinap_lenrek [Sun, 2 Aug 2015 12:48:53 +0000 (14:48 +0200)]
ipv6on: fix search for ip attribute (thanks kenji arisawa)

8 years agopc, pc64: set *bootscreen= when framebuffer changes
cinap_lenrek [Sun, 2 Aug 2015 05:32:49 +0000 (07:32 +0200)]
pc, pc64: set *bootscreen= when framebuffer changes

add bootscreenconf(VGAscr *) function, that is called whenever
the framebuffer configuration is changed by devvga. that way, we
can pass the current setting of the framebuffer to the new
kernel when using /dev/reboot.

8 years agokernel: cleanup qlock.c to use nil instead of 0 for pointers
cinap_lenrek [Sun, 2 Aug 2015 03:36:35 +0000 (05:36 +0200)]
kernel: cleanup qlock.c to use nil instead of 0 for pointers

8 years agomothra: show <source> tag within <video>/<audio> tags
cinap_lenrek [Sat, 1 Aug 2015 14:38:55 +0000 (16:38 +0200)]
mothra: show <source> tag within <video>/<audio> tags

8 years agomothra: fix nil crash on missing name/src attributes for source/video/audio/embed...
cinap_lenrek [Sat, 1 Aug 2015 14:18:02 +0000 (16:18 +0200)]
mothra: fix nil crash on missing name/src attributes for source/video/audio/embed/frame/iframe

8 years agomothra: enable compiler warnings and type checking, cleanup
cinap_lenrek [Sat, 1 Aug 2015 12:55:33 +0000 (14:55 +0200)]
mothra: enable compiler warnings and type checking, cleanup

8 years agomothra: fix double button hit
cinap_lenrek [Sat, 1 Aug 2015 11:53:16 +0000 (13:53 +0200)]
mothra: fix double button hit

dolink() was hitting the button a second time!

8 years agomothra: cleanup url handling
cinap_lenrek [Sat, 1 Aug 2015 11:06:24 +0000 (13:06 +0200)]
mothra: cleanup url handling

8 years agomothra: fix selurl()
cinap_lenrek [Sat, 1 Aug 2015 10:51:52 +0000 (12:51 +0200)]
mothra: fix selurl()

8 years agojpg/ico: fix mkfile
cinap_lenrek [Sat, 1 Aug 2015 09:56:01 +0000 (11:56 +0200)]
jpg/ico: fix mkfile

8 years agomothra: support for inline images and <image> tag
cinap_lenrek [Sat, 1 Aug 2015 09:20:28 +0000 (11:20 +0200)]
mothra: support for inline images and <image> tag

8 years agowebcookies: create lockfile with 0600 permission, always use create() with perm 0600...
cinap_lenrek [Sat, 1 Aug 2015 01:18:44 +0000 (03:18 +0200)]
webcookies: create lockfile with 0600 permission, always use create() with perm 0600 for rewriting jar

8 years agobio(2): Bterm() closes filedescriptor for Bfdopen() allocated buffer
cinap_lenrek [Sat, 1 Aug 2015 01:16:35 +0000 (03:16 +0200)]
bio(2): Bterm() closes filedescriptor for Bfdopen() allocated buffer

8 years agojpg/ico: support for embedded png icons
cinap_lenrek [Fri, 31 Jul 2015 10:58:58 +0000 (12:58 +0200)]
jpg/ico: support for embedded png icons

8 years agowebcookies: fix implicit path cookie handling
cinap_lenrek [Thu, 30 Jul 2015 23:10:53 +0000 (01:10 +0200)]
webcookies: fix implicit path cookie handling

parsecookie() used to inplace modify the request path
for implicit path (to get the directory from path) and
also did it wrong. now have a static copy and do not
remove the last slash.

8 years agoaux/vga: sandybridge support for igfx (unfinished)
cinap_lenrek [Fri, 31 Jul 2015 21:03:45 +0000 (23:03 +0200)]
aux/vga: sandybridge support for igfx (unfinished)

as usual, the dude with the hardware vanished so i cannot
develop this further. setting mode worked the last time
but only when using vesa before, so some bits are still
missing. commiting this as it is so i dont have to start
from scratch once we have hardware again.

8 years agoiostats: add -C to usage
cinap_lenrek [Fri, 31 Jul 2015 20:51:52 +0000 (22:51 +0200)]
iostats: add -C to usage

8 years agodevmnt: fix mntcache()
cinap_lenrek [Thu, 30 Jul 2015 19:00:13 +0000 (21:00 +0200)]
devmnt: fix mntcache()

make sure mntcache() wont cache data beyond what was read from
the block list.

8 years agogames/doom: fix config file never being loaded or saved (thanks qu7uux)
cinap_lenrek [Thu, 30 Jul 2015 18:30:47 +0000 (20:30 +0200)]
games/doom: fix config file never being loaded or saved (thanks qu7uux)

basedefault[], the default path to the config file, is never set and remains
blank, unless -config %s is used (cd d_main.c). when games/doom attempts to
open the file, it silently fails and no config file is ever read or written.
this patch sets basedefault to a file in whatever directory a valid wad is
found in I_IdentifyWAD().

8 years agogames/doom: display correct message on medkit pickup when health low (thanks qu7uux)
cinap_lenrek [Thu, 30 Jul 2015 18:02:23 +0000 (20:02 +0200)]
games/doom: display correct message on medkit pickup when health low (thanks qu7uux)

due to a typo in p_inter.c:P_TouchSpecialThing(), a message that is supposed
to show up when the player picks up a medikit while low on health (< 25), is
never displayed. the check for low health is done after the health is already
increased, so the condition is never true.
a cosmetic bug in all old doom executables that also seems interesting to fix.
to test: compare message displayed when picking up a medikit with and without
the patch

8 years agogames/doom: fix ouchface not being shown when it should be (thanks qu7uux)
cinap_lenrek [Thu, 30 Jul 2015 18:00:43 +0000 (20:00 +0200)]
games/doom: fix ouchface not being shown when it should be (thanks qu7uux)

due to a typo in st_stuff.c:ST_updateFaceWidget(), doomguy mistakenly never
looks shocked when taking more than 20 damage, but rather when he gains more
than 20 health while being hit.
this is a cosmetic bug in all old versions of doom's executables, but it seems
appropriate to fix.
simple test: fire a rocket at a nearby wall, taking enough damage.

8 years agogames/doom: add bug compatibility switches (thanks qu7uux)
cinap_lenrek [Thu, 30 Jul 2015 17:55:13 +0000 (19:55 +0200)]
games/doom: add bug compatibility switches (thanks qu7uux)

these emulate bugs present in select versions of the released doom executables.
they are required to correctly play demos recorded with these but affect the
gameplay, so should be otherwise disabled.

-nobounce: lost souls don't bounce off floors and ceilings like intended due
to a misplaced check; this is fixed from ultimate doom on, but doom and doom2
are still affected.

-noztele: in final doom 1.9, things' altitude was erroneously not set to the
floor's height after teleporting. this was fixed in later versions of the
executables.

examples of desyncing demos:
(plutonia.wad, without -noztele) http://doomedsda.us/lmps/946/2/30pl2646.zip
(doom2.wad, without -nobounce) http://doomedsda.us/lmps/945/3/30nm2939.zip

8 years agogames/doom: fix switch textures swapping in ultimate doom (thansk qu7uux)
cinap_lenrek [Thu, 30 Jul 2015 17:51:11 +0000 (19:51 +0200)]
games/doom: fix switch textures swapping in ultimate doom (thansk qu7uux)

gamemode is set according to the name of the main wad (cf. d_main.c), i.e.:
- doom1.wad: (shareware doom1, ep1 only) gamemode == shareware
- doom.wad: (registered doom1, ep1-3) gamemode == registered
- doomu.wad: (ultimate doom, ep1-4) gamemode == retail
- doom2.wad, plutonia.wad, tnt.wad: gamemode == commercial
most doom.wad's distributed online are, in fact, ultimate doom.
if your ultimate doom wad is correctly named doomu.wad, some switches in
episodes 2-4 won't swap their texture when toggled, because
p_switch.c:P_InitSwitchList() is only checking for registered doom1.

easy way to test: demo2 in either registered or ultimate doom: the player flips
a switch right at the beginning of the demo; if the main wad is called
doomu.wad, the switch won't change its texture.
% games/doom -playdemo demo2
if you rename the wad to doom.wad or alter d_main.c:IdentifyVersion, the switch
will swap its texture like it should.

8 years agogames/doom: implement filelength() (thanks quux)
cinap_lenrek [Wed, 29 Jul 2015 12:51:00 +0000 (14:51 +0200)]
games/doom: implement filelength() (thanks quux)

this function is used when playing demos from external lumps. the game just
exits without this patch.
to test this, download a demo lump from somewhere, and play it with -playdemo %s
where %s is the file's name, without the .lmp extension:

(note that this one is a doom 2 demo, so it requires doom2.wad)
% hget http://doomedsda.us/lmps/945/3/30nm2939.zip | unzip -sv
extracting 30nm2939.LMP
extracting 30nm2939.txt
% mv 30nm2939.LMP 30nm2939.lmp # checking for a lump filename is case sensitive
% games/doom -playdemo 30nm2939

the game exits when the demo ends. also, note that this demo will desync on
map06 (the crusher), because of an unrelated bug (that's another patch :>)

note: filelength() returns vlong, but file lengths for doom lumps are ints.
however, this might be used elsewhere (networking), so i'd leave it this way.

8 years agoetheriwl: add pciid for Centrino Wireless-N 1000 (thanks qu7uux)
cinap_lenrek [Wed, 29 Jul 2015 12:17:55 +0000 (14:17 +0200)]
etheriwl: add pciid for Centrino Wireless-N 1000 (thanks qu7uux)

card seems to work fine with just this.
http://sysinfo.9front.org/src/125/body

8 years agowebcookies: fix isdomainmatch() (fixes livejournal.com login)
cinap_lenrek [Wed, 29 Jul 2015 06:50:53 +0000 (08:50 +0200)]
webcookies: fix isdomainmatch() (fixes livejournal.com login)

when cookie is domain=example.com, then we implicitely add
dot to the domain name, which made us reject the cookie as the
request domain "example.com" != ".example.com". fix by making
isdomainmatch() skip the implicit dot in pattern before string
comparsion.

8 years agoratrace: avoid blank line prints, make writer the parent
cinap_lenrek [Wed, 29 Jul 2015 03:19:24 +0000 (05:19 +0200)]
ratrace: avoid blank line prints, make writer the parent

when there where multiple syscalls returning out of order,
it would print blank lines between the exits. avoid this
by remembering if the last char written was a newline and
conditionally insert newline on out of order return.

sometimes, ratrace would return before all messages have
been printed. make the writer process the parent so ratrace
wont exit until all readers are finished avoiding the
problem.

8 years agoratrace: various improvements
cinap_lenrek [Wed, 29 Jul 2015 01:53:11 +0000 (03:53 +0200)]
ratrace: various improvements

error handling, serialize exits, close reader filedescriptors,
fix channel types, embedd the string buffer in the Msg struct.

8 years agocc: provide fake realloc() for getenv()
cinap_lenrek [Tue, 28 Jul 2015 10:06:29 +0000 (12:06 +0200)]
cc: provide fake realloc() for getenv()

8 years agokernel: remove obsolete comment from namec()
cinap_lenrek [Tue, 28 Jul 2015 08:01:05 +0000 (10:01 +0200)]
kernel: remove obsolete comment from namec()

8 years agokernel: export mntattach() from devmnt.c avoiding bogus struct passing and special...
cinap_lenrek [Tue, 28 Jul 2015 07:52:21 +0000 (09:52 +0200)]
kernel: export mntattach() from devmnt.c avoiding bogus struct passing and special case in namec()

we already export mntauth() and mntversion(), so why not stop
being sneaky and just export mntattach() so bindmount() and
devshr can just call it directly with proper arguments being
checked.

we can also avoid handling #M attach specially in namec()
by having the devmnt's attach function do error(Enoattach).

8 years agoether79c970: set mbps for proper queue sizes, assume gigabit ethernet for vmware
cinap_lenrek [Tue, 28 Jul 2015 01:30:21 +0000 (03:30 +0200)]
ether79c970: set mbps for proper queue sizes, assume gigabit ethernet for vmware

8 years agolib9p: return "write prohibited" error as documented in 9p(2) when srv->write is...
cinap_lenrek [Mon, 27 Jul 2015 23:24:02 +0000 (01:24 +0200)]
lib9p: return "write prohibited" error as documented in 9p(2) when srv->write is nil (thanks silasm)

8 years agokernel: clunk the cache when removing cache flag on a channel, only call cread()...
cinap_lenrek [Mon, 27 Jul 2015 04:42:41 +0000 (06:42 +0200)]
kernel: clunk the cache when removing cache flag on a channel, only call cread() chen CCACHE flag is set

to avoid double caching, attachimage() and setswapchan() clear
the CCACHE flag on the channel but this keeps the read ahread
state of the cache arround (until the chan gets closed), so also
call cclunk() to detach the mcp and free the read ahead state.

avoid the call to cread() when CCACHE flag is clear.

8 years agodevmnt: use c->iounit instead of msize-IOHDRSZ to chunk reads and writes, reduce...
cinap_lenrek [Mon, 27 Jul 2015 02:33:46 +0000 (04:33 +0200)]
devmnt: use c->iounit instead of msize-IOHDRSZ to chunk reads and writes, reduce memory overhead for Mntrpc, mntalloc lock

use the actual iounit returned from Ropen/Rcreate to chunk reads and writes
instead of c->mux->msize-IOHDRSZ.

dont preallocate the rpc buffers to msize, most 9p requests are rather small
(except Twrite of course). so we allocate the buffer on demand in mountio()
with some rounding to avoid frequent reallocations.

avoid malloc()/free() while holding mntalloc lock.

8 years agodevmnt: dont reset readahead window when requested offset still has pending rpc
cinap_lenrek [Sun, 26 Jul 2015 11:55:51 +0000 (13:55 +0200)]
devmnt: dont reset readahead window when requested offset still has pending rpc

8 years agokernel: pipelined read ahead for the mount cache
cinap_lenrek [Sun, 26 Jul 2015 03:43:26 +0000 (05:43 +0200)]
kernel: pipelined read ahead for the mount cache

this changes devmnt adding mntrahread() function and some helpers
for it to do pipelined sequential read ahead for the mount cache.

basically, cread() calls mntrahread() with Mntrah structure and it
figures out if we where reading sequentially and if thats the case
issues reads of c->iounit size in advance.

the read ahead state (Mntrah) is kept in the mount cache so we can
handle (read ahead) cache invalidation in the presence of writes.

8 years agopage: fix deadlock, nil vs 0 for pointer comparsion, cleanup
cinap_lenrek [Fri, 24 Jul 2015 09:45:48 +0000 (11:45 +0200)]
page: fix deadlock, nil vs 0 for pointer comparsion, cleanup

8 years agolibsec: increase handshake message buffer size (MaxChunk) to 32K (thanks sl)
cinap_lenrek [Fri, 24 Jul 2015 04:18:59 +0000 (06:18 +0200)]
libsec: increase handshake message buffer size (MaxChunk) to 32K (thanks sl)

_sl → webfs doesn't like packetfire.org: '/mnt/web/body' 0 No status tls: local handshake message too long 30781 16384

8 years agofortunes: go away.
stanley lieber [Thu, 23 Jul 2015 01:35:50 +0000 (21:35 -0400)]
fortunes: go away.

8 years agoip/httpfile: fix flushes, fix concurrent reads, set error string
cinap_lenrek [Thu, 23 Jul 2015 01:24:39 +0000 (03:24 +0200)]
ip/httpfile: fix flushes, fix concurrent reads, set error string

Tflush handling was wrong, we cannot respond to the old
request if we have not actually removed the req from the
in progress block queue.

when reads are issued concurrently, we have to set b->len
before the block is inserted into the inprogress list.
otherwise findblock() is unable to find it and no requests
can be queued on the block. this caused the same offset
to be downloaded multiple times.

set the errstr in getrange() so in case of an error, we dont
get some random previous error string.

8 years agokernel: make sure fd is in range in fdclose()
cinap_lenrek [Thu, 23 Jul 2015 20:56:49 +0000 (22:56 +0200)]
kernel: make sure fd is in range in fdclose()

as the Fgrp can be shared with other processes, we have to
recheck the fd index after locking the Fgrp in fdclose()
to make sure not to read beyond the bounds of the fd array.

8 years agokernel: simplify syspipe()
cinap_lenrek [Thu, 23 Jul 2015 20:34:58 +0000 (22:34 +0200)]
kernel: simplify syspipe()

8 years agodevaoe: more nil vs. 0
cinap_lenrek [Thu, 23 Jul 2015 20:05:46 +0000 (22:05 +0200)]
devaoe: more nil vs. 0

8 years agodevaoe: fix off by one in aoeerror(), consistent use of nil for pointers, error handling
cinap_lenrek [Wed, 22 Jul 2015 19:56:11 +0000 (21:56 +0200)]
devaoe: fix off by one in aoeerror(), consistent use of nil for pointers, error handling

8 years agokernel: consistent use of nil for pointer in sysfile.c
cinap_lenrek [Wed, 22 Jul 2015 19:54:07 +0000 (21:54 +0200)]
kernel: consistent use of nil for pointer in sysfile.c

8 years agokernel: cleanup chan.c to consistenly use nil instead of 0 for pointers
cinap_lenrek [Wed, 22 Jul 2015 17:17:10 +0000 (19:17 +0200)]
kernel: cleanup chan.c to consistenly use nil instead of 0 for pointers

8 years agokernel: make sure the swap device has a reasonable capacity in setswapchan()
cinap_lenrek [Wed, 22 Jul 2015 17:15:51 +0000 (19:15 +0200)]
kernel: make sure the swap device has a reasonable capacity in setswapchan()

8 years agodevmnt: do not use user buffer to update the mount cache
cinap_lenrek [Sun, 19 Jul 2015 18:25:42 +0000 (20:25 +0200)]
devmnt: do not use user buffer to update the mount cache

using the user buffer has a race where the user can modify
the buffer from another process before it is copied into the cache.
this allows poisoning the cache for every file where the user
has read access.

instead, we update the cache from kernel memory.

8 years agodevstream: fix mistake
cinap_lenrek [Sun, 19 Jul 2015 01:36:53 +0000 (03:36 +0200)]
devstream: fix mistake

8 years agostream(3): fix reference
cinap_lenrek [Sun, 19 Jul 2015 01:34:08 +0000 (03:34 +0200)]
stream(3): fix reference

8 years agofcp: use iounit() to determine buffer size, reduce number of worker procs to 8
cinap_lenrek [Sun, 19 Jul 2015 01:32:38 +0000 (03:32 +0200)]
fcp: use iounit() to determine buffer size, reduce number of worker procs to 8

8 years agocp: experimental stream support
cinap_lenrek [Sun, 19 Jul 2015 01:32:09 +0000 (03:32 +0200)]
cp: experimental stream support

8 years agodevstream: fast sequential file access with 9p pipelining experiment
cinap_lenrek [Sun, 19 Jul 2015 01:31:17 +0000 (03:31 +0200)]
devstream: fast sequential file access with 9p pipelining experiment

8 years agopc: check Sse (bit 25) in cpuiddx before enabling fxsr in cr4 (fixes crash on the...
cinap_lenrek [Thu, 16 Jul 2015 06:51:06 +0000 (08:51 +0200)]
pc: check Sse (bit 25) in cpuiddx before enabling fxsr in cr4 (fixes crash on the pentium II)

8 years agoaux/cpuid: make sure extended feature bits are available (fixes crash on the pentium II)
cinap_lenrek [Thu, 16 Jul 2015 06:49:24 +0000 (08:49 +0200)]
aux/cpuid: make sure extended feature bits are available (fixes crash on the pentium II)

8 years agodevproc: make sure statbufread offset wont turn negative
cinap_lenrek [Wed, 15 Jul 2015 15:09:05 +0000 (17:09 +0200)]
devproc: make sure statbufread offset wont turn negative

8 years agofcp: fix wrong write pointer offset when read returns less than DEFB bytes
cinap_lenrek [Tue, 14 Jul 2015 18:44:34 +0000 (20:44 +0200)]
fcp: fix wrong write pointer offset when read returns less than DEFB bytes

8 years agokernel: remove debugalloc.c
cinap_lenrek [Tue, 14 Jul 2015 04:51:02 +0000 (06:51 +0200)]
kernel: remove debugalloc.c

8 years agomk9660: write data in alphabetical order
cinap_lenrek [Tue, 14 Jul 2015 20:33:27 +0000 (22:33 +0200)]
mk9660: write data in alphabetical order

*after* writing, the directory tree gets alphabetically sorted for
path table. this causes data to not be in the same order as it was
written causing seeks when taring up the filesystem.

so instead write the files in alphabetical order as well to better
match the directory sorting.

8 years ago9660srv: keep data and metadata separate in the cache with a tag
cinap_lenrek [Tue, 14 Jul 2015 20:23:16 +0000 (22:23 +0200)]
9660srv: keep data and metadata separate in the cache with a tag

data on the disk is layed out sequentially and directory information
is at the end of the disk. we want to keep data and metadata separated
so that reading large sequential files will not evict the directory
information from the cache causing long seeks.

for that, we tag the clusters (an 8th for metadata, and the rest
for data) and getbuf() will only evict clusters of the same tag.

8 years ago9660srv: go back to 128k clusters
cinap_lenrek [Mon, 13 Jul 2015 16:37:56 +0000 (18:37 +0200)]
9660srv: go back to 128k clusters

doing tests taring up 9front.iso shows the following:

lowering the cluster size back to 128k avoids over half the
reads. 837888 sectors read for 512k vs. 347712 sectors with
128k cluster size.

8 years agoinst: fix download task using ip/httpfile to mount a iso over http and prompt for...
cinap_lenrek [Mon, 13 Jul 2015 04:28:46 +0000 (06:28 +0200)]
inst: fix download task using ip/httpfile to mount a iso over http and prompt for installurl

8 years agohttpfile: fix evictblock() so we wont consume all the memory
cinap_lenrek [Mon, 13 Jul 2015 03:51:04 +0000 (05:51 +0200)]
httpfile: fix evictblock() so we wont consume all the memory

8 years agolibFLAC: fix compiler warnings by properly declaring void function arguments
cinap_lenrek [Mon, 13 Jul 2015 00:56:51 +0000 (02:56 +0200)]
libFLAC: fix compiler warnings by properly declaring void function arguments

8 years agopython: HAVE_STDINT_H 1
cinap_lenrek [Mon, 13 Jul 2015 00:38:05 +0000 (02:38 +0200)]
python: HAVE_STDINT_H 1

8 years agoape: add stdint.h, fix SSIZE_MAX and add SIZE_MAX to limits.h
cinap_lenrek [Mon, 13 Jul 2015 00:36:48 +0000 (02:36 +0200)]
ape: add stdint.h, fix SSIZE_MAX and add SIZE_MAX to limits.h

8 years agocpp: search source file directory first for quoted #include (thanks Ori_B)
cinap_lenrek [Sun, 12 Jul 2015 22:54:56 +0000 (00:54 +0200)]
cpp: search source file directory first for quoted #include (thanks Ori_B)

foo.c includes bar/bar.h, which includes "baz.h"; it wants bar/baz.h
meanwhile, it also includes meh/quux.h, which includes "baz.h"; it wants meh/baz.h

8 years agoether82563: fix multicast filter (based on openbsd em(4) driver)
cinap_lenrek [Sun, 12 Jul 2015 17:21:53 +0000 (19:21 +0200)]
ether82563: fix multicast filter (based on openbsd em(4) driver)

8 years agopage: make lookahead fetch work in backwards direction
cinap_lenrek [Sat, 11 Jul 2015 00:42:14 +0000 (02:42 +0200)]
page: make lookahead fetch work in backwards direction

8 years agotftpd: count only options we understand so we wont send empty oack message
cinap_lenrek [Sat, 11 Jul 2015 00:35:49 +0000 (02:35 +0200)]
tftpd: count only options we understand so we wont send empty oack message

8 years agoetherrt2860: add multicast stub
cinap_lenrek [Sat, 11 Jul 2015 00:34:28 +0000 (02:34 +0200)]
etherrt2860: add multicast stub

8 years agoetheriwl: add multicast stub
cinap_lenrek [Sat, 11 Jul 2015 00:33:57 +0000 (02:33 +0200)]
etheriwl: add multicast stub

8 years agoetherwpi: dont enable transmit power for invalid channels, add multicast stub
cinap_lenrek [Sat, 11 Jul 2015 00:33:16 +0000 (02:33 +0200)]
etherwpi: dont enable transmit power for invalid channels, add multicast stub

8 years agowifi: reflect current transmit rate in mbps
cinap_lenrek [Fri, 10 Jul 2015 17:13:15 +0000 (19:13 +0200)]
wifi: reflect current transmit rate in mbps

8 years agoetherwpi: afra support
cinap_lenrek [Fri, 10 Jul 2015 16:59:57 +0000 (18:59 +0200)]
etherwpi: afra support

8 years agoetheriwl: dont clear descriptors after completion
cinap_lenrek [Fri, 10 Jul 2015 16:50:37 +0000 (18:50 +0200)]
etheriwl: dont clear descriptors after completion

8 years agowifi: adjust transmit rate on error (for etheriwl), small mkfile changes
cinap_lenrek [Fri, 10 Jul 2015 07:04:05 +0000 (09:04 +0200)]
wifi: adjust transmit rate on error (for etheriwl), small mkfile changes

Wnode gets two new counters: txcount and txerror
and actrate pointer that will be between minrate
and maxrate.

driver should use actrate instead of maxrate for
transmission when it can provide error feedback.

when a driver detects a transmission failed, it calls
wifitxfail() with the original packet. wifitxfail() then
reduces wn->actrate.

every 256th packet, we optimistically increase wn->actrate
before transmitting.

8 years agokernel: use HDR_MAGIC constant to handle Exec header extension, make rebootcmd()...
cinap_lenrek [Fri, 10 Jul 2015 21:56:39 +0000 (23:56 +0200)]
kernel: use HDR_MAGIC constant to handle Exec header extension, make rebootcmd() handle AOUT_MAGIC macro

8 years agosysexec(): need () arround AOUT_MAGIC comparsion to handle #define hack on mips
cinap_lenrek [Thu, 9 Jul 2015 06:51:38 +0000 (08:51 +0200)]
sysexec(): need () arround AOUT_MAGIC comparsion to handle #define hack on mips

8 years agosysexec(): make the mips compiler happy
cinap_lenrek [Thu, 9 Jul 2015 06:34:20 +0000 (08:34 +0200)]
sysexec(): make the mips compiler happy

8 years agokernel: reject bogus two byte "#!" shell scripts in sysexec()
cinap_lenrek [Thu, 9 Jul 2015 06:03:18 +0000 (08:03 +0200)]
kernel: reject bogus two byte "#!" shell scripts in sysexec()

- reject files smaller or equal to two bytes, they are bogus
- fix out of bounds access in shargs() when n <= 2
- only copy the bytes read into line buffer
- use nil for pointers instead of 0

8 years agokernel: various cleanups of imagereclaim(), pagereclaim(), freepages(), putimage()
cinap_lenrek [Wed, 8 Jul 2015 22:01:50 +0000 (00:01 +0200)]
kernel: various cleanups of imagereclaim(), pagereclaim(), freepages(), putimage()

imagereclaim(), pagereclaim():
- move imagereclaim() and pagereclaim() declarations to portfns.h
- consistently use ulong type for page counts
- name number of pages to free "pages" instead of "min"
- check for pages == 0 on entry

freepages():
- move pagechaindone() call to wakeup newpage() consumers inside
  palloc critical section.

putimage():
- use long type for refcount

8 years ago5e: enable VFP emulation by default, doubles only need to be 4 byte aligned
cinap_lenrek [Wed, 8 Jul 2015 00:13:16 +0000 (02:13 +0200)]
5e: enable VFP emulation by default, doubles only need to be 4 byte aligned

this adds -F flag to 5e (same as 5l) to disable VFP emulation
and makes VFP emulation the default.

9 years agopc64: use unsigned long for kmapindex and mmu counts avoiding signed integer division
cinap_lenrek [Tue, 7 Jul 2015 19:13:36 +0000 (21:13 +0200)]
pc64: use unsigned long for kmapindex and mmu counts avoiding signed integer division

9 years agoape: port libc smp tas() for arm
cinap_lenrek [Tue, 7 Jul 2015 17:53:26 +0000 (19:53 +0200)]
ape: port libc smp tas() for arm

9 years agolibc/arm: implement _tas() with LDREX/STREX, execute memory barrier on smp systems...
cinap_lenrek [Tue, 7 Jul 2015 17:24:10 +0000 (19:24 +0200)]
libc/arm: implement _tas() with LDREX/STREX, execute memory barrier on smp systems (zynq)