Commit graph

2451 commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen
a5d050fc49 Add realpath(1). 2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen
875ce1adf7 Fix faccessat(2) not reporting correct permissions. 2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen
4c2a93ea02 Fix munmap(2) shrink from right logic.
This fixes a rather nasty issue where gcc's garbage collection triggered a
munmap call with the effect that it began unmapping huge amounts of kernel
data until the system triple faulted.
2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen
40c2fd12dc Fix logterminal TERMMODE_UNICODE checking. 2015-10-01 22:49:02 +02:00
Jonas 'Sortie' Termansen
6725972e11 Fix LinkInodeInDir return value.
The callers expected it to return an int different than 0 on failure. The
link method returns different than 0 on failure. This actually worked by
lucky coincidence. Change the return type to int and 0 on success, and -1
on failure per popular demand.

Thanks to Meisaka Yukara for spotting this.
2015-09-25 15:01:20 +02:00
Jonas 'Sortie' Termansen
275541383c Fix dtable return value type errors and missing input validation.
Update to current coding conventions while here.

Thanks to Meisaka Yukara for spotting the return value type errors.
2015-09-25 15:01:20 +02:00
Jonas 'Sortie' Termansen
3501b1e701 Fix console margin not having color of nearest neighbour. 2015-09-25 15:01:19 +02:00
Jonas 'Sortie' Termansen
ac6f016748 Fix partition reads and writes at end. 2015-09-25 14:59:04 +02:00
Jonas 'Sortie' Termansen
6813a26196 Fix box drawing character ninth column rendering. 2015-09-25 14:59:04 +02:00
Jonas 'Sortie' Termansen
73a182f80c Add interface to get 32-bit pages. 2015-08-28 15:24:54 +02:00
Jonas 'Sortie' Termansen
eb11613da6 Add interface to wait for IO port changes. 2015-08-28 15:24:54 +02:00
Jonas 'Sortie' Termansen
39d8894fc0 Write newline when closing the kernel debugger. 2015-08-27 22:12:45 +02:00
Jonas 'Sortie' Termansen
41d4dbdce7 Fix extfs read-only support. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
e2202b2ddb Fix extfs unhandled allocation failures.
This is not sufficient. The operator new calls are dangerous right now
because they throw exceptions (not handled) on error instead of returning
NULL. This needs to be changed to operator new nothrow instead.
2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
bc928e99a4 Fix extfs coding style and general issues.
This cleans up constructors so fields are initialized in the same order they
are declared in. This makes it trivial to spot accidentally uninitialized
fields.

This fixes a minor argument parsing bug when the mount path isn't set, but
fortunately argv[argc] is NULL and we wanted to set it to NULL anyway.

This prevents excessively large block sizes from being used.

This improves inode value range checks in the fsmarshall code. Inode 0 is
not a valid inode. The new code for this is also simpler.

This prevents creating links with names larger than 255 bytes.

This adds a check to ensure inodes don't overflow the hardlink count.

This ensures the dirent filetype is only set if supported.
2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
c88dadae8b Fix extfs fuse readlink buffer overrun. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
7953023517 Fix extfs fsmarshall symlink error case. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
0da44df5ce Fix extfs fsmarshall read/write/readlink error reporting. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
dd8b4198ec Fix extfs unmaintained invariant on bitmap free. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
5deb51eeae Fix extfs reference counts. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
21c82e4467 Fix missing static keyword in extfs. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
b5b2d159c6 Fix extfs mkdir setting bad mode. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
ac785d861e Add extfs optimized symlink write support. 2015-08-27 22:12:11 +02:00
Jonas 'Sortie' Termansen
147aae31b1 Sync extfs device file descriptor. 2015-08-26 23:12:55 +02:00
Jonas 'Sortie' Termansen
78d3a673aa Add statvfs support to extfs. 2015-08-26 23:12:55 +02:00
Jonas 'Sortie' Termansen
d85f446da9 Add tcgetblob support to extfs. 2015-08-26 23:12:55 +02:00
Jonas 'Sortie' Termansen
6e8f17b5df Add extfs background sync thread. 2015-08-26 23:12:55 +02:00
Jonas 'Sortie' Termansen
26336de7ff Split extfs frontends into their own files. 2015-08-26 23:12:55 +02:00
Jonas 'Sortie' Termansen
de21e9c8e2 Refactor extfs dirty pattern to BeginWrite then FinishWrite pattern. 2015-08-26 23:12:45 +02:00
Jonas 'Sortie' Termansen
34a832dbf3 Add tcgetblob and statvfs support to kramfs. 2015-08-26 23:12:45 +02:00
Jonas 'Sortie' Termansen
143e0a2059 Pass --keep-directory-symlink to tix-install child tar extract. 2015-08-26 21:49:42 +02:00
Jonas 'Sortie' Termansen
8f8ead93f1 Add id(1). 2015-08-26 21:35:11 +02:00
Jonas 'Sortie' Termansen
213b3636bb Add open_memstream(3). 2015-08-26 18:10:24 +02:00
Jonas 'Sortie' Termansen
00f3e97cf7 Replace userland perror calls. 2015-08-26 18:10:24 +02:00
Jonas 'Sortie' Termansen
f1571ebaf4 Add err(3). 2015-08-26 18:10:24 +02:00
Jonas 'Sortie' Termansen
211bc0c5f2 Clean up asteroids. 2015-08-26 18:10:24 +02:00
Jonas 'Sortie' Termansen
ae1ed0c13c Replace strtok_r uses with strsep. 2015-08-26 17:49:28 +02:00
Jonas 'Sortie' Termansen
b180a14412 Add mktemp(1). 2015-08-26 17:49:28 +02:00
Jonas 'Sortie' Termansen
3ef38cf936 Remove P_tmpdir. 2015-08-26 16:49:18 +02:00
Jonas 'Sortie' Termansen
59e7dd00c5 Add mkdtemps(3). 2015-08-26 16:49:18 +02:00
Jonas 'Sortie' Termansen
fb29ff42e0 Optimize puts and fputs. 2015-08-26 16:29:18 +02:00
Jonas 'Sortie' Termansen
0fc3d70716 Clear registers after system calls. 2015-08-26 16:29:18 +02:00
Jonas 'Sortie' Termansen
33c7f48909 Add unset variable feature to tix-build. 2015-08-26 16:29:18 +02:00
Jonas 'Sortie' Termansen
095a264d26 Always set tool variables in tix-build. 2015-08-26 16:29:18 +02:00
Jonas 'Sortie' Termansen
a79aeed0c1 Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
Jonas 'Sortie' Termansen
5915e2cd14 Add closefrom(2). 2015-08-26 14:01:25 +02:00
Jonas 'Sortie' Termansen
aa09f8cecc Simplify kernel PrepareLookup. 2015-08-22 01:29:38 +02:00
Jonas 'Sortie' Termansen
f3f7ede68d Remove _DIRENT_HAVE_D_FOO and _D_BAR_NAMLEN. 2015-08-22 01:29:38 +02:00
Jonas 'Sortie' Termansen
4cb9ccfc4b Rename libc/time/times.cpp to libc/sys/times/times.cpp. 2015-08-22 01:29:37 +02:00
Jonas 'Sortie' Termansen
3750de1f11 Rename struct FILE to struct __FILE. 2015-08-22 01:29:37 +02:00