Commit graph

3173 commits

Author SHA1 Message Date
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
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
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
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
ftrvxmtrx
462f1d0688 bio.h: add varargck argpos pragma for Berror 2014-05-03 11:46:01 +02:00
ftrvxmtrx
19cdd8c4b9 uniq: document -s option (thanks heaumer) 2014-05-03 11:38:36 +02:00
ftrvxmtrx
306bee92e1 uniq: use Bsize for buffers 2014-05-03 10:48:13 +02:00
cinap_lenrek
4c639475ce cwfs: fix 1GB memsize limitation
the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!

to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.
2014-05-03 00:51:45 +02:00
ftrvxmtrx
72e4d850a4 wc: simplify and avoid buffer overflow on long filenames 2014-05-03 23:38:17 +02:00
cinap_lenrek
bd3e9e4b7c 1l, 2l, 7l, kl, vl: add missing setmalloctag() dummy in compat.c 2014-05-02 05:17:40 +02:00
ftrvxmtrx
f7f3e4780a bio: Brdstr, Bopen: set malloc tag to the caller 2014-05-02 04:27:29 +02:00
cinap_lenrek
beb665051b sdide: never timeout or retry scsi commands from the controller driver
this was a big mistake. we should never attempt to
timeout or retry a scsi command from the controller
driver because theres no way to tell how long a
command would take or if a command has side effects
when being retried.
2014-05-02 04:23:21 +02:00
ftrvxmtrx
8fea0399b0 bio: on a second thought, make it one line less 2014-05-02 04:03:35 +02:00
ftrvxmtrx
f9b6c4c5a3 bio: do not leak memory if realloc fails 2014-05-02 03:58:38 +02:00
ftrvxmtrx
e610c573d7 samterm: free() after getenv() 2014-05-02 03:47:18 +02:00
cinap_lenrek
405de1e6a2 pc64: increase sizes of physical memory bank maps
number of bank slots in Conf.mem[4] was too small
for kenjis machine, set it to maximum 16 (the
size of the RAM map in pc64/memory.c).

also increasing the UPA memory map to 64. the
e820 map on my x200s has 31 entries and many
holes. this gets rid of the "mapfree: ... losing"
messages on boot.
2014-05-01 17:24:50 +02:00
ftrvxmtrx
a1ee457ebc leak(1): typo 2014-05-01 13:08:43 +02:00
cinap_lenrek
a2d96d47c9 kernel: always reset notepending in eqlock, handle forceclosefgrp in eqlocks 2014-04-29 21:17:07 +02:00
cinap_lenrek
b7d8431036 kernel: stop queue bloat before allocating blocks 2014-04-29 21:15:09 +02:00
ftrvxmtrx
a2f0fdbfa0 aan(8): fix aanuke synopsis 2014-04-29 23:17:06 +02:00
cinap_lenrek
40b6959788 devmnt: make abandoning fid on botched clunk handle flushes
make mntflushfree() return the original rpc and do the
botched clunk check on the original instead of the
current rpc.

so if we get a botched flush of a clunk, we abandon the
fid of the channel as well.
2014-04-28 06:55:06 +02:00
cinap_lenrek
2c2a71cd51 devmnt: abandon fid on botched Tclunk or Tremove
if theres an error transmitting a Tclunk or Tremove request,
we cannot assume the fid to be clunked. in case this was
a transient error, reusing the fid on further requests
will fail.

as a work arround, we zero the channels fid and allocate
a new fid before the chan is reused.

this is not correct as we essentially leak the fid
on the fileserver, but we will still be able to use
the mount.
2014-04-28 05:59:10 +02:00
cinap_lenrek
219c312163 libip: use snprint() in myetheraddr() to prevent accidents 2014-04-28 02:32:06 +02:00
cinap_lenrek
391198888a 8c, 6c: fix peephole bug for eleminating CMPL $0,R after shift
the shift instructions does not change the zero flag
when the shift count is 0, so we cannot remove the
compare instruction in this case.

this fixes oggdec under 386.
2014-04-28 22:53:50 +02:00
ftrvxmtrx
7b8f4b25be btc mkfile: mkdir -p 2014-04-28 22:39:12 +02:00
ftrvxmtrx
9f2e627ec6 iwl: support another (broken) variant of centrino ultimate-n 6300 2014-04-27 15:12:15 +02:00