Add /bin/false and /bin/true for fun. :^)

This commit is contained in:
Andreas Kling 2018-10-25 21:39:37 +02:00
parent dc6f57f19c
commit 3faaa3e04a
Notes: sideshowbarker 2024-07-19 18:38:39 +09:00
6 changed files with 24 additions and 2 deletions

Binary file not shown.

View file

@ -7,5 +7,7 @@ cp ../Userland/ls mnt/bin/ls
cp ../Userland/pwd mnt/bin/pwd
cp ../Userland/sleep mnt/bin/sleep
cp ../Userland/date mnt/bin/date
cp ../Userland/true mnt/bin/true
cp ../Userland/false mnt/bin/false
umount mnt
sync

2
Userland/.gitignore vendored
View file

@ -5,4 +5,6 @@ ls
pwd
sleep
date
false
true
*.o

View file

@ -5,7 +5,9 @@ OBJS = \
ls.o \
pwd.o \
sleep.o \
date.o
date.o \
true.o \
false.o
APPS = \
id \
@ -14,7 +16,9 @@ APPS = \
ls \
pwd \
sleep \
date
date \
true \
false
ARCH_FLAGS =
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib
@ -55,6 +59,12 @@ sleep: sleep.o
date: date.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
true: true.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
false: false.o
$(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<

4
Userland/false.cpp Normal file
View file

@ -0,0 +1,4 @@
int main()
{
return 1;
}

4
Userland/true.cpp Normal file
View file

@ -0,0 +1,4 @@
int main()
{
return 0;
}