Commit graph

2337 commits

Author SHA1 Message Date
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
Jonas 'Sortie' Termansen
7098286b34 Rename struct DIR to struct __DIR. 2015-08-22 01:29:37 +02:00
Jonas 'Sortie' Termansen
b8c91e36f4 Remove FLOAT_WORD_ORDER. 2015-08-22 01:29:37 +02:00
Jonas 'Sortie' Termansen
75cf34cb8e Add random device. 2015-08-22 01:04:58 +02:00
Jonas 'Sortie' Termansen
6405e2ea6e Add arc4random support to the kernel. 2015-08-22 01:04:58 +02:00
Jonas 'Sortie' Termansen
5ba37a9924 Honor feature macros in <termios.h>. 2015-08-22 00:44:39 +02:00
Jonas 'Sortie' Termansen
d7b1dce054 Dumb down echo(1).
Options and escape sequences are fatally incompatible with historic echo
that has no room for such extensions. Instead they pose risk because it is
harder to use echo on unvalidated input safely and because any further
extensions potentially break existing scripts. Use printf(1) instead.
2015-08-22 00:44:39 +02:00
Jonas 'Sortie' Termansen
91ab47f99c Deprecate stdio_ext API. 2015-08-21 21:25:01 +02:00
Jonas 'Sortie' Termansen
20698b35c7 Refactor kernel log. 2015-08-21 21:25:01 +02:00
Jonas 'Sortie' Termansen
77467b7768 Detect physical memory before initializing the kernel log. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
218875eb79 Initialize paging before KernelInit. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
a422c394b8 Initialize the GDT in the bootstrap assembly. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
cf55531aae Make nfds_t size_t. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
248f446089 Remove st_atime, st_ctime and st_mtime deprecation warnings.
This battle isn't worth fighting at this time.
2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
ef45218660 Add S_ISGID and S_ISUID.
I originally left them out because Sortix doesn't have setuid and setgid
executable support, but this created considerable compatibility issues and
it is better to supply them as the mode bits still exist and can be set.
2015-08-21 21:25:00 +02:00