From e255bb961b9db20fa9602e9313d9949ee92ec702 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 24 Jan 2022 21:26:19 +0100 Subject: Added false and true utilities --- .gitignore | 2 ++ Makefile | 5 +++-- false.c | 6 ++++++ true.c | 6 ++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 false.c create mode 100644 true.c diff --git a/.gitignore b/.gitignore index 7b0dc11..765f41a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.o cat fallocate +false +true diff --git a/Makefile b/Makefile index 2027646..5fcfbbc 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ CFLAGS+=-std=c11 -Wall -Wextra -Wpedantic -D_POSIX_C_SOURCE=200809L +UTILS=cat fallocate false true -all: cat fallocate +all: ${UTILS} cat: cat.o panic.o clean: - rm -f *.o cat fallocate + rm -f *.o ${UTILS} .PHONY: all clean diff --git a/false.c b/false.c new file mode 100644 index 0000000..0b38bd2 --- /dev/null +++ b/false.c @@ -0,0 +1,6 @@ +int main(int argc, char * argv[]) +{ + (void) argc; + (void) argv; + return 1; +} diff --git a/true.c b/true.c new file mode 100644 index 0000000..e16a6df --- /dev/null +++ b/true.c @@ -0,0 +1,6 @@ +int main(int argc, char * argv[]) +{ + (void) argc; + (void) argv; + return 0; +} -- cgit v1.1