Commit graph

3641 commits

Author SHA1 Message Date
cinap_lenrek
c5214cd6d9 pc64: cleanup mmuzap 2014-05-25 20:34:26 +02:00
aiju
79355486f7 games/md: first bug fixes 2014-05-25 01:11:21 +02:00
aiju
93cfa1be72 added crude version of games/md 2014-05-25 23:14:23 +02:00
cinap_lenrek
ea480e74bb libauth: dont print blobs in auth_proxy error strings 2014-05-24 19:49:54 +02:00
cinap_lenrek
20883bd7de cpu: remove duplicate environment and chdir($home) code (thanks qrstuv)
newns() (called by auth_chuid()) already prepares the
environment variables and puts us in a sane working
directory (as specified by the namespace file).
2014-05-24 02:09:52 +02:00
cinap_lenrek
2185188f83 kernel: fix read size calculation in pio() demand load
on amd64, the text segment is aligned and padded to
2MB, but segment granularity is 4K which can give
us page faults that are beyond the highest file
offset. this is perfectly valid, but was not handled
correctly in pio().
2014-05-24 01:27:57 +02:00
cinap_lenrek
eef4565003 libc: avoid static table and supurious reads in nsec()
use two per process memory slots, one for the
pid and one for the fd instead of a global table
avoiding the case when the table gets full.

instead of calling pread() on the cached fd
(dangerous as it has side effects when the
fd was not closed), we check if the cached fd
is still good  using fd2path() when called
the first time in this process.
2014-05-23 18:56:20 +02:00
cinap_lenrek
440202d029 libc: revert nsec() change, bring back filedescriptor caching
theres big performance regression with this using
cwfs. cwfs calls time() to update atime on every
read/write which now causes walks on /dev.

reverting to the previous version for now. in the
long run, we'll use new _nsec() syscall but this
has to wait for a later release once new kernels
are established.
2014-05-20 07:05:53 +02:00
cinap_lenrek
e7b94ba052 syscall: add missing _nsec() declaration 2014-05-20 05:21:22 +02:00
cinap_lenrek
3207e8b6a4 add _nsec() syscall 53 for binary compatibility with labs distribution
the new syscall is added under the symbol _nsec() for
binary compatibility.

nsec() is still a library function reading /dev/bintime.
2014-05-20 05:06:31 +02:00
cinap_lenrek
7abf926bcf libc: dont cache /dev/bintime filedescriptor for nsec() 2014-05-20 05:01:26 +02:00
cinap_lenrek
c7be3ba9e6 init: dont interpret environment var contents as fmtstring, cleanup 2014-05-19 06:58:53 +02:00
cinap_lenrek
06ad4e5fff pc64: remove cpuserver bigboy hack and honor *kernelpercent= 2014-05-19 06:57:04 +02:00
cinap_lenrek
7ae98ac5a6 ip/torrent: use "torrent" as default user agent 2014-05-19 04:56:07 +02:00
cinap_lenrek
1055b951f3 ip/torrent: fix usage, add -A option to set user-agent
trackers do like the new default Mozilla/5.0 (compatible)
user agent. so force useragent to hjdicks and give option
to override it in case trackers get even more clever in
the future.
2014-05-19 23:23:08 +02:00
cinap_lenrek
c994152a90 ipconfig: fix dhcp watch
in dhcpwatch, the sleep time "secs" could become
zero potentially freezing the lease time.

give up when in Sinit state in dhcpquery() as this
is a terminal state.
2014-05-18 19:20:31 +02:00
stanley lieber
48a644aa31 fortunes: 14:37 -!- kfx was kicked from #suckless by __20h__ [kfx] 2014-05-16 16:31:41 -04:00
cinap_lenrek
b3eeb59964 sdiahci: fix (unused) hba reset function (thanks erik quanstro)
from the specification:

software may reset the entire HBA by setting GHC.HR to '1'.
When software sets the GHC.HR bit to '1', the HBA shall perform
an internal reset action. The bit shall be cleared to '0'
by the HBA when the reset is complete.
2014-05-16 21:33:49 +02:00
Matthew Veety
eb687adecd added devgpio (thanks Krystian!). Also added getrevision() to vcore which allows you to get the raspberry pi board revision. I kept in the segment that allows direct access to the gpio memory 2014-05-16 10:56:23 -04:00
cinap_lenrek
88c998b265 merge 2014-05-14 01:17:22 +02:00
cinap_lenrek
b98b2c57cf play: set user-agent, otherwise server thinks we'r mozilla m( 2014-05-14 01:15:33 +02:00
ftrvxmtrx
ead171d29f sam(1): add ctrl+b 2014-05-12 14:49:10 +02:00
ftrvxmtrx
704bd2b513 samterm: fix esc, change ctrl+b behaviour to a more useful one (thanks cinap) 2014-05-12 14:19:22 +02:00
ftrvxmtrx
e993ea3e30 samterm: clean up key defines. use ctrl+b as in rio 2014-05-12 12:58:24 +02:00
cinap_lenrek
bf093528fd usps: remove redundant uhtml pipeline 2014-05-12 02:46:04 +02:00
cinap_lenrek
679b092ee0 htmlfmt: use uhtml for character set conversion 2014-05-12 02:38:53 +02:00
cinap_lenrek
66f76c2821 doom: get rid of floating point code for division 2014-05-11 20:24:27 +02:00
cinap_lenrek
17d932eca9 pc, pc64: add simd error exception name in trap.c 2014-05-11 06:17:13 +02:00
cinap_lenrek
a9155014c0 pc, pc64: handle sse simd exceptions 2014-05-11 05:59:10 +02:00
cinap_lenrek
edca217bb9 tcs: handle surrogate pairs 2014-05-11 00:54:59 +02:00
cinap_lenrek
7388792a12 tcs: prevent accidents with runes beyond 16-bit 2014-05-11 22:29:47 +02:00
cinap_lenrek
14cd6df332 tcs: fix inplace 16 bit unicode conversion
inplace conversions do not work anymore as
Rune is not unsigned short anymore.
2014-05-10 17:28:17 +02:00
cinap_lenrek
807af1d847 webfs: use mozilla compatible user agent as default
sites like google return the wrong characterset when
they do not recognize the user-agent. so setting default
user agent to something thats likely to pass these
idiotic browser tests.
2014-05-09 18:22:51 +02:00
cinap_lenrek
144c4ab223 abaco: need more stack on amd64 2014-05-09 17:16:34 +02:00
cinap_lenrek
87fd5240f0 remove old copies of kernels l.s from cmd/?a 2014-05-08 18:48:51 +02:00
cinap_lenrek
47d131c088 abaco: remove strange line 2014-05-08 18:41:30 +02:00
ftrvxmtrx
7ea0732c55 tail: fix follow for empty files (thanks cinap_lenrek) 2014-05-08 14:29:44 +02:00
ftrvxmtrx
1c835e370f tail: seek to EOF to check if seekable. fixes tail on /proc files 2014-05-08 12:33:24 +02:00
cinap_lenrek
f4f2ff6038 hgfs: avoid revlogupdate() calls when reading root (thanks burnzez)
we do not need to check for revlog updates on every
(directory) read when reading the root. only do it
when reading from the start.
2014-05-08 22:20:26 +02:00
ftrvxmtrx
428cc541f8 sed: remove unused ecmp function 2014-05-07 14:43:11 +02:00
cinap_lenrek
3426459ab5 cc: fix spurious warning on comparsion with scope redeclared variable (thanks aiju)
> warning: a.c:9 useless or misleading comparison: UINT < 0

the error can be observed by compiling the following code
with warnings enabled:

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

uint r;

void
main(int argc, char *argv[])
{
	int r;

	if(r < 0){
		exits(0);
	}
}

the offending code in the compiler is:

-	if(l->op == ONAME && l->sym->type){
-		lt = l->sym->type;
-		if(lt->etype == TARRAY)
-			lt = lt->link;
-	}

compiler handles scope by overwritin and reverting
symbols while parsing. in the ccom phase, the nodes symbol
(n->sym) is not in the right scope and we wrongly think r
is uint instead of int.

it is not clear to me what this code tried to accomplish in
the first place nor could anyone answer me this question.

the risk is small as this change doesnt affect the compiled
program, only the warning, so removing the offending code.
2014-05-06 21:36:28 +02:00
cinap_lenrek
59e53f818d pc64: fix embrassing typo in mmuzap() 2014-05-06 18:59:56 +02:00
cinap_lenrek
ff7d68e41a gs: fix /undefined in --setcolor-- errors on amd64 2014-05-05 00:49:26 +02:00
ftrvxmtrx
e5a90c0e3c merge 2014-05-04 03:16:37 +02:00
ftrvxmtrx
4373c0b828 vga font: hammer and sickle 2014-05-04 03:16:11 +02:00
ftrvxmtrx
3f1e6903d6 fonts: add swastika to naga10. fixes swastika in default font 2014-05-04 22:14:45 +02:00
cinap_lenrek
826f4c0daf gs: remove PStorage data type from ttf interpreter
i dont see that pointers are stored in PStorage at all,
so just use PLong directly avoding all this confusion.
2014-05-04 00:17:27 +02:00
cinap_lenrek
9cc9d6113c gs: fix truetype interpreter for amd64 2014-05-04 23:31:59 +02:00
ftrvxmtrx
d2c3185bfa fix threadsetname usage in few places 2014-05-03 13:07:52 +02:00
ftrvxmtrx
6f58f7fed4 thread.h: varargck argpos for threadsetname 2014-05-03 12:09:53 +02:00