From 3faaa3e04a3eef72554e9235cb81327642b62ab7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 25 Oct 2018 21:39:37 +0200 Subject: [PATCH] Add /bin/false and /bin/true for fun. :^) --- Kernel/_fs_contents | Bin 1024000 -> 1024000 bytes Kernel/sync-sh | 2 ++ Userland/.gitignore | 2 ++ Userland/Makefile | 14 ++++++++++++-- Userland/false.cpp | 4 ++++ Userland/true.cpp | 4 ++++ 6 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Userland/false.cpp create mode 100644 Userland/true.cpp diff --git a/Kernel/_fs_contents b/Kernel/_fs_contents index 9dd078d965a83547e636605386639ad2101f24e4..82f977dc26e266b38909d1dcec039b37831c8315 100644 GIT binary patch delta 1654 zcmbV~Uu+ar6vpqFnQf=r!Opg{EN-c@WhqO9(uLMlt4)m|A(4VjjDTRfOK1CsZrf$L z2vyW#%)}T?oL& zXU@IfonPvkU+Vi&Q+#7GV*@;(gz5t2pAhw2U`D-^DEDN8Q3l=3%osvN!1{Y4?bve z^u4?si@qjW5O{mUwpN1(^8`2xCP5lZfoU)UGT8BA5g3gAW`EaWfume^LozYwsqA zUu~CoN4$-9cLjMl9^JP-+>csfh^xE=J_H|ukHNe{&vWy|)`bpb*L6IsN4bxMr&Zxa z{$+=Hl?#849Cauta&B%S=M#~$znHqacq=1+)A4g+JY#4~Av2jx9Y9TCXRY(8gRno9 zeKeX(&*sC)UnNKX_G4UaD~`AK*04Uj>qdpk{gh7=?OSS@?DlE_#Tb0d>kxVpxHu*R*5mO4i= z8J3#PT63OdS<^FYcs84~vTQ0jAzrf&5UyB=B5C~S?-AE(p{52amF~=@E@nHuaMvlR z$K2aH)R_BQ4{0Rx%MY5|>nBO~#gQ2m%a_Dq>Oemb;{*<=V-`Nqm*`yuhk!W0@QE?Z z2YuTDZ@?0}Pk5W(T<1+-t+<0jv{h8D-Xbi<67F)Fx_e6k<{coOjo*#kms%A>b-4G3 zX{T=-=47SyrB~?4mCq>LTrIIyh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7lC}`wcu@ z&q(iMjPNml>?6Vyt1D&v-SXPJ*KR z4b0!jcnjld#yc7BWxSv9Ax518MLUn{Oc!3ZvZ9@FCnFss8Xz4YLY)K!zQ(-1FM)rX z`GbrfFn+{%l#w!Ev}aB+|HTr1Az$aZRN$xqVSC0hYQ9tm_y}a1u~&e!6xt`2!>lsz zV?39?m`rWGc<=g-?pqQ~J#eSV~() z*;I8p6ThF&h7A8uj?$^><&h}Y2m#rrQbqYxm6!!tvm>K~s#;94R!2q|RkfRBn;aRX zRMnZSknM0}lv8z0vef7XYg~LK4p>xbwG*X+u=hB57fh{IAc&czQ>zsy9UYaOgkjg? zMhj$cBT-oa%Hf|AWVWD%Jvyh`joy4fZe^d)(*di_59n-?EofdA7X`w8tg@ULSHgF4c$)V?cv~ZJ- zzUeB6e@^sVf&UzUTj{@S3Vn4pB6V#zc8x)zL@%_ zaig?vzuxy)6&bX9Sm@o)M|l4pQ)913C$cM##`M^Y9vcxu(1_^-MMivv>&HPx&py?cZZf477B3?vZ7 is3RHpSp`x3Vb_LUb3?DSp?Bzp-oy>PNze2S>-!J%jy5^~ diff --git a/Kernel/sync-sh b/Kernel/sync-sh index 4053a3ab205..8b8b687be38 100755 --- a/Kernel/sync-sh +++ b/Kernel/sync-sh @@ -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 diff --git a/Userland/.gitignore b/Userland/.gitignore index e17fc117291..b132ad73f04 100644 --- a/Userland/.gitignore +++ b/Userland/.gitignore @@ -5,4 +5,6 @@ ls pwd sleep date +false +true *.o diff --git a/Userland/Makefile b/Userland/Makefile index 1615f689b51..3631838c712 100644 --- a/Userland/Makefile +++ b/Userland/Makefile @@ -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 $< diff --git a/Userland/false.cpp b/Userland/false.cpp new file mode 100644 index 00000000000..2227c3aa8f2 --- /dev/null +++ b/Userland/false.cpp @@ -0,0 +1,4 @@ +int main() +{ + return 1; +} diff --git a/Userland/true.cpp b/Userland/true.cpp new file mode 100644 index 00000000000..905869dfa38 --- /dev/null +++ b/Userland/true.cpp @@ -0,0 +1,4 @@ +int main() +{ + return 0; +}