Commit graph

3179 commits

Author SHA1 Message Date
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
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