Userspace: implement basic stat

I tried to format the output pretty much how linux does, except for
uid and git -> name resolution which is not implemented
This commit is contained in:
Bananymous
2023-08-10 11:15:17 +03:00
parent 165a379c73
commit 313b00b11f
3 changed files with 92 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.26)
project(stat CXX)
set(SOURCES
main.cpp
)
add_executable(stat ${SOURCES})
target_compile_options(stat PUBLIC -O2 -g)
target_link_libraries(stat PUBLIC libc ban)
add_custom_target(stat-install
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/stat ${BANAN_BIN}/
DEPENDS stat
)