Commit graph

1748 commits

Author SHA1 Message Date
cinap_lenrek 29a53a52fd 1c,2c,7c,kc,vc: honor suppress condition for outstring() in swt.c 2015-08-02 14:52:54 +02:00
cinap_lenrek dd96b1d965 mothra: show <source> tag within <video>/<audio> tags 2015-08-01 16:38:55 +02:00
cinap_lenrek 660f54b198 mothra: fix nil crash on missing name/src attributes for source/video/audio/embed/frame/iframe 2015-08-01 16:18:02 +02:00
cinap_lenrek 71c57070c6 mothra: enable compiler warnings and type checking, cleanup 2015-08-01 14:55:33 +02:00
cinap_lenrek fe5ede9792 mothra: fix double button hit
dolink() was hitting the button a second time!
2015-08-01 13:53:16 +02:00
cinap_lenrek b408b386e1 mothra: cleanup url handling 2015-08-01 13:06:24 +02:00
cinap_lenrek d6fb42f496 mothra: fix selurl() 2015-08-01 12:51:52 +02:00
cinap_lenrek 0140f20af4 jpg/ico: fix mkfile 2015-08-01 11:56:01 +02:00
cinap_lenrek 815c2ba22b mothra: support for inline images and <image> tag 2015-08-01 11:20:28 +02:00
cinap_lenrek f62a2efb7a webcookies: create lockfile with 0600 permission, always use create() with perm 0600 for rewriting jar 2015-08-01 03:18:44 +02:00
cinap_lenrek 69daa9fd96 jpg/ico: support for embedded png icons 2015-07-31 12:58:58 +02:00
cinap_lenrek 18169e03de 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.
2015-07-31 01:10:53 +02:00
cinap_lenrek 9d59fb28cf 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.
2015-07-31 23:03:45 +02:00
cinap_lenrek 34e2e047cc iostats: add -C to usage 2015-07-31 22:51:52 +02:00
cinap_lenrek a8735c02b6 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.
2015-07-29 08:50:53 +02:00
cinap_lenrek 34f3df213c 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.
2015-07-29 05:19:24 +02:00
cinap_lenrek 059c85dd75 ratrace: various improvements
error handling, serialize exits, close reader filedescriptors,
fix channel types, embedd the string buffer in the Msg struct.
2015-07-29 03:53:11 +02:00
cinap_lenrek d48dcf08aa cc: provide fake realloc() for getenv() 2015-07-28 12:06:29 +02:00
cinap_lenrek 918cb76040 page: fix deadlock, nil vs 0 for pointer comparsion, cleanup 2015-07-24 11:45:48 +02:00
cinap_lenrek ab4b7c2573 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.
2015-07-23 03:24:39 +02:00
cinap_lenrek 9150d2773f fcp: use iounit() to determine buffer size, reduce number of worker procs to 8 2015-07-19 03:32:38 +02:00
cinap_lenrek 1d93677070 cp: experimental stream support 2015-07-19 03:32:09 +02:00
cinap_lenrek e6d84a3fa6 aux/cpuid: make sure extended feature bits are available (fixes crash on the pentium II) 2015-07-16 08:49:24 +02:00
cinap_lenrek ea7bca1829 fcp: fix wrong write pointer offset when read returns less than DEFB bytes 2015-07-14 20:44:34 +02:00
cinap_lenrek 90bd02d5af 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.
2015-07-14 22:33:27 +02:00
cinap_lenrek 2e85e32886 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.
2015-07-14 22:23:16 +02:00
cinap_lenrek f5688dd6c9 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.
2015-07-13 18:37:56 +02:00
cinap_lenrek 41372f346a httpfile: fix evictblock() so we wont consume all the memory 2015-07-13 05:51:04 +02:00
cinap_lenrek 39c9f1abbb libFLAC: fix compiler warnings by properly declaring void function arguments 2015-07-13 02:56:51 +02:00
cinap_lenrek bab59e5749 python: HAVE_STDINT_H 1 2015-07-13 02:38:05 +02:00
cinap_lenrek cd9da74cbc 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
2015-07-13 00:54:56 +02:00
cinap_lenrek cbd1ca6877 page: make lookahead fetch work in backwards direction 2015-07-11 02:42:14 +02:00
cinap_lenrek 1d5a2aa487 tftpd: count only options we understand so we wont send empty oack message 2015-07-11 02:35:49 +02:00
cinap_lenrek fcb9abccbb 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.
2015-07-08 02:13:16 +02:00
cinap_lenrek e2a6e622c7 5e: approximate LL/SC with cas() 2015-07-07 06:30:34 +02:00
cinap_lenrek fcfc849dd5 5e: make sure stack base is aligned to avoid unaligned memory trap on arm 2015-07-07 06:26:56 +02:00
cinap_lenrek 562f1b51ee nusb/audio: dont sysfatal on bad endpoint (no altc) 2015-06-29 22:28:23 +02:00
cinap_lenrek 8799bf292d wpa: do not prompt for key when there is already one in factotum 2015-06-28 20:40:19 +02:00
cinap_lenrek 6b4a9c5d8d 5e: implement DSB,DMB,ISB and CLREX instructions 2015-06-19 14:43:32 +02:00
cinap_lenrek 921aa0a6c3 stats: add kernel malloc and kernel draw allocation size graphs 2015-06-16 08:08:42 +02:00
cinap_lenrek 9ab48ee370 hjfs: defer parent directory permission check for wstat
check parent directory permission *after* we determined
that the new name does not exist in the parent, so that
when the new name is the same as old name then no write
permission is required in the parent directory.
2015-06-15 08:28:10 +02:00
cinap_lenrek 13ec55922f hjfs: fix wstat
- rename to same name is ok
- only truncate when file size is different
- check for uid/gid *change*, not if it is specified or not
2015-06-15 01:57:54 +02:00
cinap_lenrek 5adf0606f1 nusb/serial: remove unused channel 2015-06-15 00:30:19 +02:00
cinap_lenrek 65db705481 ndb/dns: cleanup forwarding code (redistrib())
instead of copying the whole packet, just save the
udp header and restore it aftwards. dont call redistrib()
when there are no forwards (this should be almost always
the case).
2015-06-14 21:31:44 +02:00
ftrvxmtrx a55eed44c6 aux/vga: == is not strncmp 2015-06-13 21:28:33 +02:00
cinap_lenrek 7f4b037b0b htmlroff: fix wrong newline in \name handling (| -> ||) 2015-06-13 20:58:56 +02:00
ftrvxmtrx 453ca8db43 qc, 9/ppc, 9/mtx: fix wrong if statements 2015-06-13 20:21:26 +02:00
cinap_lenrek 27fb90eb6e vblade, cifs, usbuhci: fix parenthesis 2015-06-13 15:03:56 +02:00
cinap_lenrek 9c1dff3fa9 lock: reopen lockfile after changing mode to make lock effective
lock is acquired on open/create when file has DMEXCL set in mode,
so we need to reopen the file after setting the bit with wstat.
2015-06-13 15:01:02 +02:00
cinap_lenrek 1473e5d437 lib9p: fix lib9p wstat qid.type/mode checks (fixes lock(1) for ramfs/hjfs) 2015-06-13 12:43:15 +02:00
cinap_lenrek f92057cc39 ndb/dns: use same buffer size of udp packet in redistrib() as dnudpserver() (fixes assert) 2015-06-13 22:37:26 +02:00
ftrvxmtrx 98640950d7 merge 2015-06-11 22:14:24 +02:00
ftrvxmtrx a25758dce7 fix strncmp/memcmp used with a wrong number 2015-06-11 22:13:55 +02:00
cinap_lenrek 036ae2e397 cifsd: smbrename is still ok when file is readonly (fixed git) 2015-06-10 17:18:31 +02:00
ftrvxmtrx 0fc761bc84 unix is BUGGERED. remove it 2015-06-09 00:15:59 +02:00
ftrvxmtrx 7a95bef00e authsrv: remove unused opasstokey 2015-06-09 23:53:07 +02:00
cinap_lenrek 14a7c237b5 aux/vga: disable nvidiascale() as it broke modeset on kenjis card
this code needs revision, need a list of cards where this actually
works.
2015-06-08 02:43:49 +02:00
cinap_lenrek 1613fd9f52 disk/edisk: create esp partition in addition to plan9 partition in auto mode 2015-06-05 21:57:08 +02:00
cinap_lenrek 16b3a688c3 dossrv: maintain file creation date/time on disk, fsinfo sector can be 0 (disabled) 2015-06-04 04:34:08 +02:00
cinap_lenrek e83ef3d1e2 disk/format: create Fatinfo sector for fat32 2015-06-04 03:58:03 +02:00
cinap_lenrek 137a762eca disk/edisk: fix blank mode
there where two problems with blank (-b flag):

we did not update the backup header when there was already a valid
backup header in place. we always want to initialize a new backup header
in blank mode!

we now also check the backup header matches the primary (or the other
way arround depending on which header could be read), reporting any
mismatches and restoring the backup from the data of the primary.

the protective mbr needs to start at sector 1 not 0 (apparently, this
matters for ovmf).
2015-06-03 23:19:13 +02:00
cinap_lenrek 8caf4d3bcb authsrv: use plan9 key for http authentication
in addition to /sys/lib/httppasswords, allow http authentication
to use the plan9 password, which can be changed by the user.
2015-06-02 01:15:43 +02:00
cinap_lenrek 0afac04530 hgweb.cgi: +x 2015-06-02 23:44:39 +02:00
cinap_lenrek cfd0698dbd hgweb.cgi: take REPO_ROOT and REPO_NAME from env, so can be used out of the box 2015-06-02 23:41:16 +02:00
cinap_lenrek 42484b6ef2 disk/fdisk: learn about EFI system partition (type 0xEF), honor protective mbr (type 0xEE)
efi systems may use traditional dos partition table
with an esp (efi system partition). otherwise, honor
the protective mbr partition (0xEE) and exit when we
encounter it.
2015-05-31 19:30:38 +02:00
cinap_lenrek ce76af64fe disk/edisk: little improvements
- make UU() shorter by using long long constant to encode node field
- store Flag as a mask, not as a shift count
- put the attributes before the name in cmdsum() as it is fixed length
2015-05-31 11:19:22 +02:00
cinap_lenrek c770b09f43 test: use libc.h constants for access() mode (thanks qrstuv) 2015-05-31 09:37:59 +02:00
cinap_lenrek 1376d559ed disk/edisk: fix usage (was disk/gdisk) 2015-05-30 03:36:58 +02:00
cinap_lenrek 4a4575bd4e disk/edisk: gpt partition table editor (no manpage, work in progress) 2015-05-30 03:22:08 +02:00
cinap_lenrek 09b6a92145 disk/partfs: adding identical partition is no-op 2015-05-30 22:37:46 +02:00
cinap_lenrek b5cbd0bebd disk/fdisk: fix help text 2015-05-30 22:26:18 +02:00
cinap_lenrek 3ceedfd1e1 nusb/disk: adding identical partition is a no-op 2015-05-30 22:24:55 +02:00
cinap_lenrek e333a07ded tcs: fix swaped alias mapping gb <-> gb2312 2015-05-28 16:39:04 +02:00
cinap_lenrek 3d1e12363d uhtml: check if document is valid utf8 even with charset specified
often, documents specify charsets but are really utf-8 encoded.
we now try to decode as utf-8 and only if that fails assume
the charset specified in the document.
2015-05-28 16:37:55 +02:00
cinap_lenrek d6a91e0ae4 cc: set unspecified elements to zero in local variable initializers
the compiler used to skip zero initialization when initializer
list was given not covering unspecified elements. now we zero
all non explicitely initialized elements. for example:

typedef struct F F;
struct F
{
	int a;
	int b;
	int c;
};

void
main(void)
{
	char a[16] = { 1, 2, 3 };	/* a[3..15] initialized to zero */
	F f = { .b = 1 };			/* f.a, f.c initialized to zero */
}
2015-05-26 19:25:06 +02:00
stanley lieber 0853e2cc3b remove pkg(1): we regret the error 2015-05-25 15:03:44 -04:00
cinap_lenrek 0d87019a9b cc: handle unaligned data in = {0} local initializer
the emited code that initializes local variables did not handle
unaligned data causing stack corruption, affecting code like:

void main(void)
{
	char a[9] = {0};
}

this change will emit code that does byte stores for the unaligned
bytes and also handles small objects (<= 16 bytes) without branches.
2015-05-25 01:57:18 +02:00
mischief a94a8a06de revert httpd log file goof 2015-05-20 18:16:54 -07:00
cinap_lenrek 890c459567 webfs: send servername in tls client hello (SNI) 2015-05-21 02:28:06 +02:00
mischief a1bbf39c34 ip/httpd: fix syslog file 2015-05-20 15:38:56 -07:00
cinap_lenrek 8f8c2d6779 aux/vga: dont use /proc/$pid/mem to access vga bios
using /proc/$pid/mem to access vga bios is not portable and crashes
sgi machines when aux/vga is run. instead, try /dev/realmodemem
first (provided by realemu), then #v/vgabios.
2015-05-19 14:02:02 +02:00
cinap_lenrek 041d732be7 tar, tarfs: implement longname support
this allows extracting tar archives that use longnames extension,
where the real filename is stored in a special entry with
linkflag == 'L' before the file entry. also skip longlink entries
with linkflag == 'K'.
2015-05-19 12:39:45 +02:00
cinap_lenrek 76ee4c3988 usbd: set device info for control file (see usb(3), thanks qeed) 2015-05-18 01:26:29 +02:00
cinap_lenrek bf74dfbc7a kbdfs: Runemax is inclusive. 2015-05-17 06:59:09 +02:00
cinap_lenrek 0d701b7759 gunzip: the extra length field (XLEN) is two bytes instead of one
example file:
https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R50f.tgz
2015-05-15 07:53:22 +02:00
Matthew Veety 2b4a488762 fixed by fuck up 2015-05-13 00:15:18 -04:00
Matthew Veety 80845af98b removed ukill. 2015-05-13 00:11:59 -04:00
cinap_lenrek 4bfd4122d9 nusb/serial: recognize aijuboard jtag interface 2015-05-11 02:34:54 +02:00
cinap_lenrek 5275d49d8f webfs: fix proxy authentication 2015-05-10 07:46:53 +02:00
cinap_lenrek 0da5888901 realemu: ignore access to CMOS/RTC address/data registers
the kernel wont allow access to i/o ports 0x70/0x71, so
ignore the access. reads return 0xFF. this fixes vesa on
lenovo e540.
2015-05-09 07:50:05 +02:00
cinap_lenrek e9c9ea4235 sam: don't make scroll-wheel-up change focus (thanks clsmith) 2015-04-28 19:32:21 +02:00
cinap_lenrek da689241d0 sam: prevent array overflow with multiple -i and -a arguments (thanks clsmith) 2015-04-28 19:30:52 +02:00
cinap_lenrek 99718a581b bzfs: handle erealloc(..., 0) 2015-04-23 18:40:00 +02:00
cinap_lenrek 4e7efadf12 hjfs: fix erealloc(..., 0) crash when removing member from group array makes it empty (thanks 9dan) 2015-04-23 18:19:48 +02:00
cinap_lenrek c1ff805e23 cc: fix non constant pointer initializer for other compilers than 8c/6c
i made a mistake here as this change breaks the arm and mips compilers
which lack an optimiation in xcom() that folds constant pointer arithmetic
into the offset. on arm, the a node is a complex expression with op OADD of
type TIND but the test rejected the (valid) pointer arithmetic.

instead, we now test for the operations which cannot be constant instead
of using the type as a proxy.
2015-04-23 05:12:57 +02:00
cinap_lenrek 7f0728b7f4 aux/listen: removing service script sholud kill listener (thanks mischief)
mischief spotted that the only way for listeners to go away was
truncating (but not removing) a service script. this is wrong and
not as described in the manpage.

this change makes removing (or truncating) a listen script stop
the listener.

scandir() first marks all current announces, then reads the service
directory adding announces which will clear the marks for the ones
already there or add a new unmarked one. finally, we shoot down and
remove all still marked announces.
2015-04-23 03:17:25 +02:00
cinap_lenrek 07faf720c9 secstore: don't print errors for dial() and readnvram() when not in verbose mode
when no secstore server has been configured or no nvram is
setup, exit silently with error status.
2015-04-22 20:08:50 +02:00
cinap_lenrek fd80dde429 hjfs: preserve newlines in commit message (thanks BurnZeZ) 2015-04-22 19:54:13 +02:00
cinap_lenrek 81cbff917f gs: avoid 6c type propagation / constant folding issue for set_cb_end()
6c changed "- cmd_lagest_size + 1" into a *unsigned* 32bit constant. which
got added to 64bit pointer making pcb->limit > pcb->end resulting
in errors for partial commands in the buffer. removing the parentesis
propagates the operation to 64bit.
2015-04-17 06:18:43 +02:00
cinap_lenrek 433b18ec2b cc: catch non constant pointer initializers
char	FOO[] = "abc";	/* ok */
char	*BAR = FOO;		/* ok */
char	*BAZ = BAR;		/* wrong */
2015-04-16 14:32:42 +02:00