aboutsummaryrefslogtreecommitdiff
path: root/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core/: tputFerass El Hafidi2023-04-141-0/+40
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/tty: fix compiler errorFerass El Hafidi2023-04-111-1/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/wc: rewind(file) won't work with stdinFerass El Hafidi2023-04-101-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* treewide: readd copyrightsFerass El Hafidi2023-04-1030-0/+95
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: return errnoFerass El Hafidi2023-04-091-2/+1
| | | | | Reported-by: Leah Rowe <leah@libreboot.org> Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: only support 2 arguments (not counting argv[0] before getopt())Ferass El Hafidi2023-04-091-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: get rid of useless for loopFerass El Hafidi2023-04-091-15/+13
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/utilities.csv: remove, not neededFerass El Hafidi2023-04-091-2/+0
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: get rid of viFerass El Hafidi2023-04-081-210/+0
| | | | | | | It's poorly implemented and ugly, it segfaults and doesn't compile with -Werr. The time is now! Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: fix error handling!Ferass El Hafidi2023-04-081-3/+3
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: don't use *paramsFerass El Hafidi2023-04-081-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: get rid of *params, uselessFerass El Hafidi2023-04-081-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: handle errors when calling remove()Ferass El Hafidi2023-04-081-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* */Makefile: reduce duplicationFerass El Hafidi2023-04-081-20/+2
| | | | | | | Both core/Makefile and extras/Makefile were almost identical. This commit unifies the identical parts in one file. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/Makefile: remove test suiteFerass El Hafidi2023-04-081-17/+0
| | | | | | It's useless Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/uname: fix argument parsingFerass El Hafidi2023-03-311-2/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/rm: argv[0] -> argv0 (typo)Ferass El Hafidi2023-03-311-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/more: don't exit on EOFFerass El Hafidi2023-03-312-4/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ln: TODO -- fix error handlingFerass El Hafidi2023-03-312-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/chown: fix argv handlingFerass El Hafidi2023-03-301-6/+5
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/*: Return errprint.Ferass El Hafidi2023-03-0413-13/+29
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/touch: Add missing 'return 0'Ferass El Hafidi2023-03-041-0/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: touchFerass El Hafidi2023-03-041-0/+81
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/Makefile: Remove shell built-in utilsFerass El Hafidi2023-03-041-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/head: Properly handle standard inputFerass El Hafidi2023-03-041-12/+9
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/head: Fix a tiny typo (that introduced a bug) and a segmentation faultFerass El Hafidi2023-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | Those bugs were basically introduced by typos... First bug --------- `head` was checking if argc was less than 2, which is incorrect because after getopt() is ran, argc would be equal to 1 if ran this way: $ head file As such, it would read standard input, then the file, which is a bug. Second bug ---------- The file got closed after the first line was read. When trying to read the (now closed) file it returns a segmentation fault. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/[: Check argv[0], don't use basename()Ferass El Hafidi2023-03-031-2/+1
| | | | | | | | | | | | | | | POSIX says this: > Applications using the exec() family of functions to execute > these utilities shall ensure that the argument passed in arg0 > or argv[0] is '[' when executing the [ utility and has a > basename of "test" when executing the test utility. Which basically means (in pseudo-code if you will): if argv[0] is "[" -> behave like the POSIX [ else -> behave like the POSIX test [ used to compare with the basename of argv[0], which is POSIXly incorrect. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/[: Use lstat() instead of stat()Ferass El Hafidi2023-03-021-1/+1
| | | | | | | That fixes a bug where [/test always returns 1 when used with `-L` or `-h`. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/wc: Fix bug -- see descriptionFerass El Hafidi2023-03-021-1/+1
| | | | | | | | wc used to always return 'total %d %d %d %s\n' (in pseudo-printf here) regardless of if one or multiple files were specified. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/cat: Fix bug - see descriptionFerass El Hafidi2023-03-021-1/+2
| | | | | | | | | | | | `cat` used to not concatenate at all when ran like this: $ cat It did read standard input, but did not output anything to standard output. fdopen() was used on STDIN_FILENO when it shouldn't. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/uname: Fix argument parsingFerass El Hafidi2023-03-011-11/+7
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: teeFerass El Hafidi2023-02-271-0/+53
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: cmpFerass El Hafidi2023-02-211-0/+54
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: ttyFerass El Hafidi2023-02-191-0/+21
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* all: use SPDX identifiers and add a new MAINTAINERS file.Ferass El Hafidi2023-02-1627-750/+27
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ls: Use OPERANDS instead of (char *)params in getopt() and remove the ↵Ferass El Hafidi2023-01-281-8/+2
| | | | | | -R option. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/common.*: Move them somewhere else so they can be used by non-POSIX utilsFerass El Hafidi2023-01-1123-142/+56
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: Properly use getopt()Ferass El Hafidi2023-01-1114-107/+86
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/mv: Fix error handlingFerass El Hafidi2023-01-081-2/+3
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* Makefiles: Remove useless `echo`es and don't compile in a subdirectoryFerass El Hafidi2023-01-072-5/+3
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/ls: Fix compiler errors in Alpine LinuxFerass El Hafidi2023-01-061-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* Remove useless fileFerass El Hafidi2023-01-061-0/+0
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* make: Set CORE to the currently-implemented utils insteadFerass El Hafidi2023-01-062-1/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* *: Update Copyright date #2Ferass 'Vitali64' EL HAFIDI2023-01-051-1/+1
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* *: Update Copyright dateFerass 'Vitali64' EL HAFIDI2023-01-0528-28/+28
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/Makefile, config.mk: Add all POSIX utilities and ignore those who ↵Ferass 'Vitali64' EL HAFIDI2023-01-051-163/+3
| | | | | | aren't implemented Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* (happy new year!) sh: Fix compiler errors && core/: Move print_usage to ↵Ferass 'Vitali64' EL HAFIDI2023-01-0525-117/+143
| | | | | | common.h and add errprint() Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* branding: Rename 'Ferass' Base System' to just 'fases'.Ferass 'Vitali64' EL HAFIDI2022-12-251-1/+1
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/, Makefile, box: Get rid of version.h and use -DVERSION in CFLAGS instead.Ferass 'Vitali64' EL HAFIDI2022-12-2523-150/+37
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* */Makefile && config.mk: Simplify and remove unnecessary echoes.Ferass 'Vitali64' EL HAFIDI2022-12-251-25/+30
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>