aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* extras/: clarify licensing, it's supposed to be GPL-3.0+, not 3BSDHEADmasterFerass El Hafidi2024-05-102-2/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: tputFerass El Hafidi2023-04-142-0/+41
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* config.mk: add version nameFerass El Hafidi2023-04-111-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* common/common.c: typofixFerass El Hafidi2023-04-111-1/+1
| | | | 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>
* common/common.c: new format for print_usage()Ferass El Hafidi2023-04-111-3/+2
| | | | | | | | | Here's how it's supposed to look like: fases cat (d84hd34s): Concatenate files to stdout Usage: cat [file...] 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-1047-1/+149
| | | | 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-082-211/+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-083-40/+23
| | | | | | | 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>
* Makefile: add '-pedantic' to CFLAGSFerass El Hafidi2023-04-081-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* man/: unlink.1Ferass El Hafidi2023-04-061-0/+25
| | | | 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-042-0/+82
| | | | 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>
* man/: tee.1Ferass El Hafidi2023-02-271-0/+38
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: teeFerass El Hafidi2023-02-272-0/+54
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* Makefile: Fix box not compiling && man/: cmp.1Ferass El Hafidi2023-02-224-3/+42
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: cmpFerass El Hafidi2023-02-212-0/+55
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* man/: tty.1Ferass El Hafidi2023-02-191-0/+27
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: ttyFerass El Hafidi2023-02-192-0/+22
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* box/Makefile: Be able to not include core utilitiesFerass El Hafidi2023-02-193-85/+11
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* Makefile: Fix error when running 'make' or 'make all'Ferass El Hafidi2023-02-192-1/+9
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* all: use SPDX identifiers and add a new MAINTAINERS file.Ferass El Hafidi2023-02-1644-1097/+81
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* sh: shorten commentsFerass El Hafidi2023-02-022-22/+5
| | | | 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>
* common/common.c: Just say fases && extras/errno: Refactor (use strerrno and ↵Ferass El Hafidi2023-01-113-255/+8
| | | | | | print_usage() ) 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-1125-59/+59
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>