Commit Graph

658 Commits

Author SHA1 Message Date
b2f321c0b8 libc: Parse the mode string 2022-10-28 17:02:08 +02:00
8ed0ff1381 libc: Ensure /dev/random is opened with O_CLOEXEC on init 2022-10-27 17:50:15 +02:00
d93a4062a2 libc: Do not use the heavy variadic syscall() function for wrappers
That function is meant more for user programs, and should still be rarely used, since it's not portable.
Instead, we already know the number of arguments. We just call __lc_fast_syscallN, which also sets errno.
2022-10-27 17:42:00 +02:00
0eb0ca4028 libc: Add an empty locale.h 2022-10-27 17:23:59 +02:00
7155cf8d6b libc: Add alloca.h 2022-10-27 17:23:50 +02:00
703b0a1435 libc: Make tv_usec in timeval signed, as it should be 2022-10-27 17:20:46 +02:00
50cda50f01 Kernel, libc: Add F_GETFD, F_SETFD and FD_CLOEXEC 2022-10-27 17:17:24 +02:00
fcf53ef6a5 Kernel: Make waitpid() block by default unless WNOHANG is specified 2022-10-27 17:05:42 +02:00
da8a3de480 It's actually S_ISCHR in this case 2022-10-27 08:10:35 +02:00
cdb1f46b93 libc: Add S_ISDEV 2022-10-27 08:09:10 +02:00
06e6429567 Kernel: Reorganize a bit of scheduler code 2022-10-27 08:07:34 +02:00
f9dad8a8d6 Kernel, libc: Stub out struct stat.st_dev 2022-10-27 08:01:33 +02:00
9b0f6b6595 Kernel, libc: Add O_EXCL 2022-10-27 07:55:59 +02:00
211c76f920 libc: Provide a definition for timeval 2022-10-27 07:55:02 +02:00
1c35eabb2b open(): Add a third optional mode argument 2022-10-27 07:52:57 +02:00
a3c6635f3e Kernel, libc: Add O_APPEND and stub out O_CREAT and O_TRUNC 2022-10-27 07:43:55 +02:00
651ffe6d64 Ports: Simplify remove-port.sh 2022-10-26 22:00:31 +02:00
d875224045 Ports: Add mpc, mpfr and gmp ports 2022-10-26 21:56:43 +02:00
f004122735 cat: Remove unnecessary include 2022-10-26 20:55:08 +02:00
41f7232b77 Devices: Return EOF after first read for some devices
Still not optimal.
2022-10-26 20:54:47 +02:00
d5a64319f9 apps: Add cat 2022-10-26 20:51:20 +02:00
2512acc716 ls: Use command-line arguments 2022-10-26 20:30:22 +02:00
e1f58c0163 Kernel: If wrapping a line at screen bottom, scroll properly 2022-10-26 20:14:24 +02:00
6892fd96d0 sh: Split a command into arguments and pass those on
This is a big achievement!!
2022-10-26 20:06:21 +02:00
a4e430d35e Kernel: count the null byte while calculating how much stack space argv will use 2022-10-26 20:05:24 +02:00
23b12d2d56 sh: Clear exit status if we do not execute another command 2022-10-26 19:39:04 +02:00
5492b1b44d sh: Implement our own execvp() while we wait for libc.
Of course, this is a very primitive execvp with hardcoded paths.
If it were decent, it would be integrated into libc instantly.
2022-10-26 19:36:09 +02:00
796d61020b argv might be null when we're init 2022-10-26 19:22:50 +02:00
4f6333ca17 compilation fix 2022-10-26 19:17:26 +02:00
8eb986df63 libc: Add program_invocation_name
This is a GNU extension, but I'm fine with adding it to libc.
It's guarded by the _GNU_SOURCE feature test macro anyways.
2022-10-26 19:17:05 +02:00
7d20c507b1 Kernel, libc, userspace: Implement command-line arguments (argv)
The only thing missing now is for sh to pass them on.
2022-10-26 18:57:06 +02:00
0bad662c2f sh: If fork() fails, show an error containing fork 2022-10-26 17:13:47 +02:00
9b1e50ae27 libc: Add EACCES 2022-10-25 20:29:56 +02:00
57658f2d3e libc: Add EOPNOTSUPP 2022-10-25 20:28:12 +02:00
13fce2c4b3 libc: Update headers with more comments 2022-10-25 19:27:24 +02:00
af452e2b2a Kernel, libc: Add dup2() 2022-10-25 18:58:06 +02:00
af46b8d9ac Kernel: Cleanup file descriptor validation 2022-10-25 18:35:17 +02:00
ec2c314234 Kernel: Add /dev/null 2022-10-25 17:59:55 +02:00
8cfede341f Tools: Fix run.sh and update rebuild-and-run.sh to use fast-run.sh 2022-10-24 21:18:28 +02:00
ada7f1e701 Update README.md 2022-10-24 21:15:22 +02:00
7c460855cc Update README.md with information about hourly builds 2022-10-24 21:12:22 +02:00
35da7e0223 Fix up install-built-ports.sh if ports.list is not present 2022-10-24 20:52:52 +02:00
d458c5c848 Fix kernel/Makefile 2022-10-24 20:52:11 +02:00
1716a81e82 no need to unset filter-lines 2022-10-24 20:48:57 +02:00
b17ff6319a libc: compilation fix for libc's printf 2022-10-24 20:47:00 +02:00
040fbde462 Unset LD and AR so gcc doesn't get confused 2022-10-24 18:33:29 +00:00
bd56c7f496 Unset LD and AR so binutils doesn't get confused during the build process 2022-10-24 18:32:57 +00:00
33f6765a5c libc: Make the userspace printf much better 2022-10-24 17:21:40 +02:00
315d2f9f24 libc: actually return buf in getcwd() 2022-10-24 17:08:40 +02:00
0dec5f7bad libc: Add dummy getcwd() 2022-10-24 17:05:28 +02:00