25 Commits

Author SHA1 Message Date
Enrico Fraccaroli ee2f95e51d Merge pull request #26 from fischerling/fix-ext2-write
Fix some regressions in ext2_write
2024-02-28 12:09:56 -05:00
Enrico Fraccaroli b617fccee4 Merge pull request #25 from fischerling/improve-text-printing
Improve text printing
2024-02-26 10:02:01 -05:00
Enrico Fraccaroli 14474130ad Merge pull request #24 from fischerling/improve-ls-long-output
ls: improve --long output format
2024-02-26 10:00:24 -05:00
Enrico Fraccaroli 18504170ec Merge pull request #23 from fischerling/add-some-man-pages
add simple manual pages for rmdir, mkdir, showpid
2024-02-26 09:59:16 -05:00
Enrico Fraccaroli 404f4c20f0 Merge pull request #22 from fischerling/fix-execvp
libc: prevent execvp to search for files containing '/'
2024-02-26 09:57:46 -05:00
Florian Fischer dea54c7dae libc: prevent execvpe to search for files containing '/'
The current implementation always searches for the file in PATH
if it is not an absolute path.
This prevents executing relative paths like ./executable.

As specified by exec(3) the p-family of exec functions only search if
the filename does not contain slash '/' characters.
2024-02-14 11:37:06 +01:00
Florian Fischer 44b1acf33c ext2: update the vfs_file_t length after writing
The vfs_file_t->length field is initialized but never used afterwards.
It seams correct to updated it after the inode size possibly changed.
2024-02-13 21:59:57 +01:00
Florian Fischer 4d4504486d ext2: write the inode back if its size is updated
If there is enough space in an inode but the file grows the
inode is never written back to the device and thus the new size is
not persisted.

	int fd = creat("foo", 660);
	write(fd, "foo", 3); // New blocks are allocated and inode written back
	write(fd, "\n", 1); // size is adapted but not written back
	close(fd);
	// Reading the file afterwards will only return "foo".

The code snippet reproduces the bug.

This is fixed by always writing the inode back to the device if
the size is updated.
2024-02-13 21:59:57 +01:00
Florian Fischer f7e53f9b00 ext2: do not update inode size when allocating new blocks
New blocks for an inode are allocated when data blocks
should be written and not enough blocks are allocated yet
or during allocating new direntries in ext2_allocate_direntry.

When writing the first time to a newly created file (inode.size==0),
new blocks must be allocated and the inode size is erroneously set to
(blocks_count / fs->blocks_per_block_count) * fs->block_size
regardless of the actually written data.

	int fd = creat("foo", 0660);
	write(fd, "foo", 3);

This code snippet will create a new inode with size 4096 instead
of the correct size 3.

ext2_write_inode_data will correctly set the size to 3.
However, ext2_allocate_block called by ext2_write_inode_block will
set the inode size to 4096.

This is fixed by removing the size update during ext2_allocate_block.
2024-02-13 21:51:04 +01:00
Florian Fischer beacbde52e man: use cat as pager to print man pages
This reduces the required code in man and additionally,
replaces the old broken read/puts implementation.

Puts expects a null-terminated string, but write does not return
a null-terminted string.
2024-02-13 13:15:58 +01:00
Florian Fischer cad4804a95 cat: improve exist status
Exit with status 1 if one or more arguments could not be printed.
2024-02-13 13:15:36 +01:00
Florian Fischer e2e608b073 cat: properly output the read data
Using puts to output data retrieved through write is broken.
Puts expects a null-terminated string, which is not returned by read.
Use write to exactly output the data previously read.
2024-02-13 13:15:29 +01:00
Florian Fischer bb1bca458e ls: improve --long output format
Add padding using zeros instead of whitespace to the date values.
2024-02-13 13:11:03 +01:00
Florian Fischer b489df26ba add simple manual pages for rmdir, mkdir, showpid 2024-02-13 13:10:01 +01:00
Enrico Fraccaroli 1832c77fdb Merge pull request #21 from fischerling/fix-creat-fd-flags
creat: set flags in opened file descriptor
2024-01-29 05:24:58 +01:00
Enrico Fraccaroli ce98a0d3de Merge pull request #20 from fischerling/fix-dir-permission-check
vfs: fix permission check when creating files
2024-01-29 05:24:06 +01:00
Florian Fischer 89e6d75627 creat: set flags in opened file descriptor
creat.2 is supposed to be equivalent to open.2 with the
flags O_WRONLY|O_CREAT|O_TRUNC.

However, in MentOS the fd returned by creat.2 has no flags whatsoever
and is thus not writable.

Set the flags of the file descriptor before returning it.
2024-01-28 21:50:30 +01:00
Florian Fischer 4c6cbc3360 vfs: fix permission check when creating files
When creating new files in a directory the creating process
must be allowed to write the directory not to read it.
2024-01-28 21:47:50 +01:00
Enrico Fraccaroli c3c2ba824e Merge pull request #19 from fischerling/fix-grub-entry
Fix grub entry
2024-01-25 16:00:59 +01:00
Florian Fischer 015768793b fix bootloader file name in GRUB config
Fixes: 0b75cd9c
2024-01-24 19:52:16 +01:00
Enrico Fraccaroli (Galfurian) c0254bca6d Merge branch 'release/v0.6.0' 2024-01-17 13:50:06 +01:00
Enrico Fraccaroli (Galfurian) 30e01ba560 Update version 2024-01-17 13:49:48 +01:00
Enrico Fraccaroli (Galfurian) af79958f1a Clean up useless files from the filesystem 2024-01-17 13:38:53 +01:00
Enrico Fraccaroli (Galfurian) eca55dfed8 Clean up cmake files (Part 2)
I've kept just one cmake project, in the root directory. The
subdirectories just set up the targets.

The asm compiler is serached just one time, from the root
directory cmake file.

Global compilation flags are set in the root cmake file, and
each subdirectory cmake file sets specific flags if necessary
(e.g., programs need the -u_start specified)
2024-01-17 13:34:32 +01:00
Enrico Fraccaroli (Galfurian) 0b75cd9c2a Clean up cmake files (Part 1)
I've been cleaning up the way compilation flags are passed to the targets
and there are still some changes that must be made, in the next commit.

I've also done some renaming, all_programs into programs and the same for
tests.

The gdb initialization file now is just one, populated using the find command
and using realpath to get the absolute path to the files. I've tested if the
generated gdb.run file works and it does.
2024-01-17 13:16:50 +01:00
329 changed files with 891 additions and 1084 deletions
+91 -30
View File
@@ -1,14 +1,13 @@
# ============================================================================= # =============================================================================
# PROJECT SETUP
# =============================================================================
# Set the minimum required version of cmake. # Set the minimum required version of cmake.
cmake_minimum_required(VERSION 3.1...3.22) cmake_minimum_required(VERSION 3.1...3.22)
# Initialize the project. # Initialize the project.
project(mentos C ASM) project(mentos C ASM)
# =============================================================================
# BUILD TYPE (Debug/Release)
# =============================================================================
# Set the default build type to Debug. # Set the default build type to Debug.
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Debug' as none was specified.") message(STATUS "Setting build type to 'Debug' as none was specified.")
@@ -16,12 +15,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif() endif()
# ============================================================================= # =============================================================================
# DOCUMENTATION # OS-SPECIFIC COMPILERS SETUP
# =============================================================================
add_subdirectory(doc)
# =============================================================================
# OS-SPECIFIC COMPILERS
# ============================================================================= # =============================================================================
# Add operating system specific option. # Add operating system specific option.
@@ -62,7 +56,73 @@ else()
endif() endif()
# ============================================================================= # =============================================================================
# COMPILATION # ASSEMBLY COMPILER
# =============================================================================
# Find the NASM compiler.
find_program(ASM_COMPILER NAMES nasm HINTS /usr/bin/ /usr/local/bin/)
# Mark the variable ASM_COMPILER as advanced.
mark_as_advanced(ASM_COMPILER)
# Check that we have found the compiler.
if(NOT ASM_COMPILER)
message(FATAL_ERROR "ASM compiler not found!")
endif(NOT ASM_COMPILER)
# Set the asm compiler.
set(CMAKE_ASM_COMPILER ${ASM_COMPILER})
# Set the assembly compiler flags.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O0 -F dwarf -o <OBJECT> <SOURCE>")
else()
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O3 -o <OBJECT> <SOURCE>")
endif()
# =============================================================================
# GLOBAL COMPILATION FLAGS
# =============================================================================
# Warning flags.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpedantic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
# Disable some specific warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-command-line-argument")
# Set the compiler options.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdlib")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-protector")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Set the assembly compiler flags.
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32")
# =============================================================================
# SUB-DIRECTORIES SETUP
# ============================================================================= # =============================================================================
# Add the sub-directories. # Add the sub-directories.
@@ -70,6 +130,7 @@ add_subdirectory(programs)
add_subdirectory(programs/tests) add_subdirectory(programs/tests)
add_subdirectory(mentos) add_subdirectory(mentos)
add_subdirectory(libc) add_subdirectory(libc)
add_subdirectory(doc)
# ============================================================================= # =============================================================================
# FILESYSTEM # FILESYSTEM
@@ -88,7 +149,7 @@ add_custom_target(filesystem
COMMAND echo '=============================================================================' COMMAND echo '============================================================================='
COMMAND echo 'Done!' COMMAND echo 'Done!'
COMMAND echo '=============================================================================' COMMAND echo '============================================================================='
DEPENDS all_programs all_tests DEPENDS programs tests
) )
# ============================================================================= # =============================================================================
@@ -131,12 +192,12 @@ set(EMULATOR_FLAGS ${EMULATOR_FLAGS} -drive file=${CMAKE_BINARY_DIR}/rootfs.img,
# Booting with QEMU for fun # Booting with QEMU for fun
# ============================================================================= # =============================================================================
# This first target runs the emualtor passing the kernel binary file. # This first target runs the emulator passing the kernel binary file.
add_custom_target( add_custom_target(
qemu qemu
COMMAND test -e ${CMAKE_BINARY_DIR}/rootfs.img || ${CMAKE_COMMAND} -E cmake_echo_color --red "No filesystem file detected, you need to run: make filesystem" COMMAND test -e ${CMAKE_BINARY_DIR}/rootfs.img || ${CMAKE_COMMAND} -E cmake_echo_color --red "No filesystem file detected, you need to run: make filesystem"
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -kernel ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -kernel ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS kernel-bootloader.bin DEPENDS bootloader.bin
) )
# ============================================================================= # =============================================================================
@@ -147,19 +208,19 @@ add_custom_target(
# executables. # executables.
add_custom_target( add_custom_target(
gdbinit gdbinit
BYPRODUCTS ${CMAKE_BINARY_DIR}/.gdbinit ${CMAKE_BINARY_DIR}/gdb.run BYPRODUCTS ${CMAKE_BINARY_DIR}/gdb.run
# Create the generic gdb configuration. # Create the generic gdb configuration.
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel.bin" > ${CMAKE_BINARY_DIR}/.gdbinit COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel.bin" > ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin" >> ${CMAKE_BINARY_DIR}/.gdbinit COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/bootloader.bin" >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND ls -1 ${CMAKE_BINARY_DIR}/programs/tests/test_* | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/.gdbinit COMMAND find ${CMAKE_SOURCE_DIR}/files/bin -type f | xargs realpath | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND ls -1 ${CMAKE_BINARY_DIR}/programs/prog_* | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/.gdbinit COMMAND echo "break boot.c: boot_main" >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "break boot.c: boot_main" >> ${CMAKE_BINARY_DIR}/.gdbinit COMMAND echo "break kernel.c: kmain" >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "break kernel.c: kmain" >> ${CMAKE_BINARY_DIR}/.gdbinit
# Create the GDB connection file. # Create the GDB connection file.
COMMAND echo "target remote localhost:1234" > ${CMAKE_BINARY_DIR}/gdb.run COMMAND echo "target remote localhost:1234" >> ${CMAKE_BINARY_DIR}/gdb.run
DEPENDS kernel-bootloader.bin DEPENDS ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS all_programs DEPENDS ${CMAKE_BINARY_DIR}/mentos/kernel.bin
DEPENDS all_tests DEPENDS programs
DEPENDS tests
DEPENDS libc DEPENDS libc
) )
@@ -177,8 +238,8 @@ add_custom_target(
COMMAND echo "or if you want to use cgdb, type:" COMMAND echo "or if you want to use cgdb, type:"
COMMAND echo " cgdb --quiet --command=gdb.run" COMMAND echo " cgdb --quiet --command=gdb.run"
COMMAND echo "" COMMAND echo ""
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -s -S -kernel ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -s -S -kernel ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS kernel-bootloader.bin DEPENDS bootloader.bin
DEPENDS gdbinit DEPENDS gdbinit
) )
@@ -190,9 +251,9 @@ add_custom_target(
add_custom_target( add_custom_target(
cdrom.iso cdrom.iso
COMMAND cp -rf ${CMAKE_SOURCE_DIR}/iso . COMMAND cp -rf ${CMAKE_SOURCE_DIR}/iso .
COMMAND cp ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin ${CMAKE_BINARY_DIR}/iso/boot COMMAND cp ${CMAKE_BINARY_DIR}/mentos/bootloader.bin ${CMAKE_BINARY_DIR}/iso/boot
COMMAND grub-mkrescue -o ${CMAKE_BINARY_DIR}/cdrom.iso ${CMAKE_BINARY_DIR}/iso COMMAND grub-mkrescue -o ${CMAKE_BINARY_DIR}/cdrom.iso ${CMAKE_BINARY_DIR}/iso
DEPENDS kernel-bootloader.bin DEPENDS bootloader.bin
) )
# This third target runs the emualtor, but this time, the kernel binary file is # This third target runs the emualtor, but this time, the kernel binary file is
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2014-2022 MentOs-Team. Copyright (c) 2014-2024 MentOs-Team.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
+263 -263
View File
@@ -3,7 +3,7 @@ find_package(Doxygen)
if (DOXYGEN_FOUND) if (DOXYGEN_FOUND)
# Read the file with the version. # Read the file with the version.
file(READ ${PROJECT_SOURCE_DIR}/mentos/inc/version.h version_file) file(READ ${CMAKE_SOURCE_DIR}/mentos/inc/version.h version_file)
# Extract the OS version. # Extract the OS version.
string(REGEX MATCH "OS_MAJOR_VERSION ([0-9]*)" _ ${version_file}) string(REGEX MATCH "OS_MAJOR_VERSION ([0-9]*)" _ ${version_file})
set(OS_MAJOR_VERSION ${CMAKE_MATCH_1}) set(OS_MAJOR_VERSION ${CMAKE_MATCH_1})
@@ -15,8 +15,8 @@ if (DOXYGEN_FOUND)
set(DOXYGEN_PROJECT_NAME "MentOS") set(DOXYGEN_PROJECT_NAME "MentOS")
set(DOXYGEN_PROJECT_NUMBER "${OS_MAJOR_VERSION}.${OS_MINOR_VERSION}.${OS_MICRO_VERSION}") set(DOXYGEN_PROJECT_NUMBER "${OS_MAJOR_VERSION}.${OS_MINOR_VERSION}.${OS_MICRO_VERSION}")
set(DOXYGEN_PROJECT_BRIEF "The Mentoring Operating System") set(DOXYGEN_PROJECT_BRIEF "The Mentoring Operating System")
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${PROJECT_SOURCE_DIR}/README.md) set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/README.md)
set(DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}/doc/resources) set(DOXYGEN_IMAGE_PATH ${CMAKE_SOURCE_DIR}/doc/resources)
set(DOXYGEN_SHOW_INCLUDE_FILES NO) set(DOXYGEN_SHOW_INCLUDE_FILES NO)
set(DOXYGEN_GENERATE_TREEVIEW NO) set(DOXYGEN_GENERATE_TREEVIEW NO)
set(DOXYGEN_WARN_NO_PARAMDOC YES) set(DOXYGEN_WARN_NO_PARAMDOC YES)
@@ -28,272 +28,272 @@ if (DOXYGEN_FOUND)
set(DOXYGEN_PREDEFINED "__attribute__((x))= _syscall0= _syscall0(x)= _syscall1(x)= _syscall2(x)= _syscall3(x)=") set(DOXYGEN_PREDEFINED "__attribute__((x))= _syscall0= _syscall0(x)= _syscall1(x)= _syscall2(x)= _syscall3(x)=")
set(DOXYGEN_WARN_FORMAT "$file($line): $text") set(DOXYGEN_WARN_FORMAT "$file($line): $text")
set(DOXYGEN_HTML_STYLESHEET ${PROJECT_SOURCE_DIR}/doc/doxygen.css) set(DOXYGEN_HTML_STYLESHEET ${CMAKE_SOURCE_DIR}/doc/doxygen.css)
doxygen_add_docs( doxygen_add_docs(
${PROJECT_NAME}_documentation mentos_documentation
${PROJECT_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/README.md
${PROJECT_SOURCE_DIR}/LICENSE.md ${CMAKE_SOURCE_DIR}/LICENSE.md
${PROJECT_SOURCE_DIR}/doc/signal.md ${CMAKE_SOURCE_DIR}/doc/signal.md
${PROJECT_SOURCE_DIR}/doc/syscall.md ${CMAKE_SOURCE_DIR}/doc/syscall.md
${PROJECT_SOURCE_DIR}/mentos/inc/boot.h ${CMAKE_SOURCE_DIR}/mentos/inc/boot.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/gdt.h ${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/gdt.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/idt.h ${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/idt.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/isr.h ${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/isr.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/tss.h ${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/tss.h
${PROJECT_SOURCE_DIR}/mentos/inc/devices/fpu.h ${CMAKE_SOURCE_DIR}/mentos/inc/devices/fpu.h
${PROJECT_SOURCE_DIR}/mentos/inc/devices/pci.h ${CMAKE_SOURCE_DIR}/mentos/inc/devices/pci.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ata/ata.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ata/ata.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ata/ata_types.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ata/ata_types.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/fdc.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/fdc.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/keyboard/keyboard.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/keyboard/keyboard.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/keyboard/keymap.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/keyboard/keymap.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/mouse.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/mouse.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ps2.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ps2.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/rtc.h ${CMAKE_SOURCE_DIR}/mentos/inc/drivers/rtc.h
${PROJECT_SOURCE_DIR}/mentos/inc/elf/elf.h ${CMAKE_SOURCE_DIR}/mentos/inc/elf/elf.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/ext2.h ${CMAKE_SOURCE_DIR}/mentos/inc/fs/ext2.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/ioctl.h ${CMAKE_SOURCE_DIR}/mentos/inc/fs/ioctl.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/procfs.h ${CMAKE_SOURCE_DIR}/mentos/inc/fs/procfs.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/vfs.h ${CMAKE_SOURCE_DIR}/mentos/inc/fs/vfs.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/vfs_types.h ${CMAKE_SOURCE_DIR}/mentos/inc/fs/vfs_types.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/cpuid.h ${CMAKE_SOURCE_DIR}/mentos/inc/hardware/cpuid.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/pic8259.h ${CMAKE_SOURCE_DIR}/mentos/inc/hardware/pic8259.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/timer.h ${CMAKE_SOURCE_DIR}/mentos/inc/hardware/timer.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/proc_modules.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/proc_modules.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_font.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_font.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_mode.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_mode.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_palette.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_palette.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/video.h ${CMAKE_SOURCE_DIR}/mentos/inc/io/video.h
${PROJECT_SOURCE_DIR}/mentos/inc/kernel.h ${CMAKE_SOURCE_DIR}/mentos/inc/kernel.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/compiler.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/compiler.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/hashmap.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/hashmap.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/irqflags.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/irqflags.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/list.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/list.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/list_head.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/list_head.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/mutex.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/mutex.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/ndtree.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/ndtree.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/rbtree.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/rbtree.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/spinlock.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/spinlock.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/stack_helper.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/stack_helper.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/stdatomic.h ${CMAKE_SOURCE_DIR}/mentos/inc/klib/stdatomic.h
${PROJECT_SOURCE_DIR}/mentos/inc/link_access.h ${CMAKE_SOURCE_DIR}/mentos/inc/link_access.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/buddysystem.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/buddysystem.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/gfp.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/gfp.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/kheap.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/kheap.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/paging.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/paging.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/slab.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/slab.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/vmem_map.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/vmem_map.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/zone_allocator.h ${CMAKE_SOURCE_DIR}/mentos/inc/mem/zone_allocator.h
${PROJECT_SOURCE_DIR}/mentos/inc/multiboot.h ${CMAKE_SOURCE_DIR}/mentos/inc/multiboot.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/prio.h ${CMAKE_SOURCE_DIR}/mentos/inc/process/prio.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/process.h ${CMAKE_SOURCE_DIR}/mentos/inc/process/process.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/scheduler.h ${CMAKE_SOURCE_DIR}/mentos/inc/process/scheduler.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/wait.h ${CMAKE_SOURCE_DIR}/mentos/inc/process/wait.h
${PROJECT_SOURCE_DIR}/mentos/inc/proc_access.h ${CMAKE_SOURCE_DIR}/mentos/inc/proc_access.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/errno.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/errno.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/ipc.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/ipc.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/module.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/module.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/reboot.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/reboot.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/types.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/types.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/utsname.h ${CMAKE_SOURCE_DIR}/mentos/inc/sys/utsname.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/panic.h ${CMAKE_SOURCE_DIR}/mentos/inc/system/panic.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/printk.h ${CMAKE_SOURCE_DIR}/mentos/inc/system/printk.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/signal.h ${CMAKE_SOURCE_DIR}/mentos/inc/system/signal.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/syscall.h ${CMAKE_SOURCE_DIR}/mentos/inc/system/syscall.h
${PROJECT_SOURCE_DIR}/mentos/inc/version.h ${CMAKE_SOURCE_DIR}/mentos/inc/version.h
${PROJECT_SOURCE_DIR}/mentos/src/boot.c ${CMAKE_SOURCE_DIR}/mentos/src/boot.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/exception.c ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/exception.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.c ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/idt.c ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/idt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.c ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/tss.c ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/tss.c
${PROJECT_SOURCE_DIR}/mentos/src/devices/fpu.c ${CMAKE_SOURCE_DIR}/mentos/src/devices/fpu.c
${PROJECT_SOURCE_DIR}/mentos/src/devices/pci.c ${CMAKE_SOURCE_DIR}/mentos/src/devices/pci.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/ata.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/ata.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/fdc.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/fdc.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/keyboard/keyboard.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/keyboard/keyboard.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/keyboard/keymap.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/keyboard/keymap.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/mouse.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/mouse.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/ps2.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/ps2.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/rtc.c ${CMAKE_SOURCE_DIR}/mentos/src/drivers/rtc.c
${PROJECT_SOURCE_DIR}/mentos/src/elf/elf.c ${CMAKE_SOURCE_DIR}/mentos/src/elf/elf.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/ext2.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/ext2.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/ioctl.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/ioctl.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/namei.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/namei.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/open.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/open.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/procfs.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/procfs.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/readdir.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/readdir.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/read_write.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/read_write.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/stat.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/stat.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/vfs.c ${CMAKE_SOURCE_DIR}/mentos/src/fs/vfs.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/cpuid.c ${CMAKE_SOURCE_DIR}/mentos/src/hardware/cpuid.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/pic8259.c ${CMAKE_SOURCE_DIR}/mentos/src/hardware/pic8259.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/timer.c ${CMAKE_SOURCE_DIR}/mentos/src/hardware/timer.c
${PROJECT_SOURCE_DIR}/mentos/src/io/debug.c ${CMAKE_SOURCE_DIR}/mentos/src/io/debug.c
${PROJECT_SOURCE_DIR}/mentos/src/io/mm_io.c ${CMAKE_SOURCE_DIR}/mentos/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_running.c ${CMAKE_SOURCE_DIR}/mentos/src/io/proc_running.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_system.c ${CMAKE_SOURCE_DIR}/mentos/src/io/proc_system.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_video.c ${CMAKE_SOURCE_DIR}/mentos/src/io/proc_video.c
${PROJECT_SOURCE_DIR}/mentos/src/io/stdio.c ${CMAKE_SOURCE_DIR}/mentos/src/io/stdio.c
${PROJECT_SOURCE_DIR}/mentos/src/io/vga/vga.c ${CMAKE_SOURCE_DIR}/mentos/src/io/vga/vga.c
${PROJECT_SOURCE_DIR}/mentos/src/io/video.c ${CMAKE_SOURCE_DIR}/mentos/src/io/video.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/msg.c ${CMAKE_SOURCE_DIR}/mentos/src/ipc/msg.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/sem.c ${CMAKE_SOURCE_DIR}/mentos/src/ipc/sem.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/shm.c ${CMAKE_SOURCE_DIR}/mentos/src/ipc/shm.c
${PROJECT_SOURCE_DIR}/mentos/src/kernel/sys.c ${CMAKE_SOURCE_DIR}/mentos/src/kernel/sys.c
${PROJECT_SOURCE_DIR}/mentos/src/kernel.c ${CMAKE_SOURCE_DIR}/mentos/src/kernel.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/assert.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/assert.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/ctype.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/ctype.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/fcvt.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/fcvt.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/hashmap.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/hashmap.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/libgen.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/libgen.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/list.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/list.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/math.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/math.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/mutex.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/mutex.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/ndtree.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/ndtree.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/rbtree.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/rbtree.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/spinlock.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/spinlock.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/strerror.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/strerror.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/string.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/string.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/time.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/time.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/vscanf.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/vscanf.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/vsprintf.c ${CMAKE_SOURCE_DIR}/mentos/src/klib/vsprintf.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/buddysystem.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/buddysystem.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/kheap.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/kheap.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/paging.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/paging.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/slab.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/slab.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/vmem_map.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/vmem_map.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/zone_allocator.c ${CMAKE_SOURCE_DIR}/mentos/src/mem/zone_allocator.c
${PROJECT_SOURCE_DIR}/mentos/src/multiboot.c ${CMAKE_SOURCE_DIR}/mentos/src/multiboot.c
${PROJECT_SOURCE_DIR}/mentos/src/process/process.c ${CMAKE_SOURCE_DIR}/mentos/src/process/process.c
${PROJECT_SOURCE_DIR}/mentos/src/process/scheduler.c ${CMAKE_SOURCE_DIR}/mentos/src/process/scheduler.c
${PROJECT_SOURCE_DIR}/mentos/src/process/scheduler_algorithm.c ${CMAKE_SOURCE_DIR}/mentos/src/process/scheduler_algorithm.c
${PROJECT_SOURCE_DIR}/mentos/src/process/wait.c ${CMAKE_SOURCE_DIR}/mentos/src/process/wait.c
${PROJECT_SOURCE_DIR}/mentos/src/sys/module.c ${CMAKE_SOURCE_DIR}/mentos/src/sys/module.c
${PROJECT_SOURCE_DIR}/mentos/src/sys/utsname.c ${CMAKE_SOURCE_DIR}/mentos/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/mentos/src/system/errno.c ${CMAKE_SOURCE_DIR}/mentos/src/system/errno.c
${PROJECT_SOURCE_DIR}/mentos/src/system/panic.c ${CMAKE_SOURCE_DIR}/mentos/src/system/panic.c
${PROJECT_SOURCE_DIR}/mentos/src/system/printk.c ${CMAKE_SOURCE_DIR}/mentos/src/system/printk.c
${PROJECT_SOURCE_DIR}/mentos/src/system/signal.c ${CMAKE_SOURCE_DIR}/mentos/src/system/signal.c
${PROJECT_SOURCE_DIR}/mentos/src/system/syscall.c ${CMAKE_SOURCE_DIR}/mentos/src/system/syscall.c
${PROJECT_SOURCE_DIR}/mentos/src/boot.S ${CMAKE_SOURCE_DIR}/mentos/src/boot.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/exception.S ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/exception.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.S ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/idt.S ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/idt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.S ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/tss.S ${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/tss.S
${PROJECT_SOURCE_DIR}/mentos/src/process/user.S ${CMAKE_SOURCE_DIR}/mentos/src/process/user.S
${PROJECT_SOURCE_DIR}/libc/inc/array.h ${CMAKE_SOURCE_DIR}/libc/inc/array.h
${PROJECT_SOURCE_DIR}/libc/inc/assert.h ${CMAKE_SOURCE_DIR}/libc/inc/assert.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/ioctls.h ${CMAKE_SOURCE_DIR}/libc/inc/bits/ioctls.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/stat.h ${CMAKE_SOURCE_DIR}/libc/inc/bits/stat.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/termios-struct.h ${CMAKE_SOURCE_DIR}/libc/inc/bits/termios-struct.h
${PROJECT_SOURCE_DIR}/libc/inc/ctype.h ${CMAKE_SOURCE_DIR}/libc/inc/ctype.h
${PROJECT_SOURCE_DIR}/libc/inc/fcntl.h ${CMAKE_SOURCE_DIR}/libc/inc/fcntl.h
${PROJECT_SOURCE_DIR}/libc/inc/fcvt.h ${CMAKE_SOURCE_DIR}/libc/inc/fcvt.h
${PROJECT_SOURCE_DIR}/libc/inc/grp.h ${CMAKE_SOURCE_DIR}/libc/inc/grp.h
${PROJECT_SOURCE_DIR}/libc/inc/io/ansi_colors.h ${CMAKE_SOURCE_DIR}/libc/inc/io/ansi_colors.h
${PROJECT_SOURCE_DIR}/libc/inc/io/debug.h ${CMAKE_SOURCE_DIR}/libc/inc/io/debug.h
${PROJECT_SOURCE_DIR}/libc/inc/io/mm_io.h ${CMAKE_SOURCE_DIR}/libc/inc/io/mm_io.h
${PROJECT_SOURCE_DIR}/libc/inc/io/port_io.h ${CMAKE_SOURCE_DIR}/libc/inc/io/port_io.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/ipc.h ${CMAKE_SOURCE_DIR}/libc/inc/ipc/ipc.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/msg.h ${CMAKE_SOURCE_DIR}/libc/inc/ipc/msg.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/sem.h ${CMAKE_SOURCE_DIR}/libc/inc/ipc/sem.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/shm.h ${CMAKE_SOURCE_DIR}/libc/inc/ipc/shm.h
${PROJECT_SOURCE_DIR}/libc/inc/libgen.h ${CMAKE_SOURCE_DIR}/libc/inc/libgen.h
${PROJECT_SOURCE_DIR}/libc/inc/limits.h ${CMAKE_SOURCE_DIR}/libc/inc/limits.h
${PROJECT_SOURCE_DIR}/libc/inc/math.h ${CMAKE_SOURCE_DIR}/libc/inc/math.h
${PROJECT_SOURCE_DIR}/libc/inc/pwd.h ${CMAKE_SOURCE_DIR}/libc/inc/pwd.h
${PROJECT_SOURCE_DIR}/libc/inc/ring_buffer.h ${CMAKE_SOURCE_DIR}/libc/inc/ring_buffer.h
${PROJECT_SOURCE_DIR}/libc/inc/sched.h ${CMAKE_SOURCE_DIR}/libc/inc/sched.h
${PROJECT_SOURCE_DIR}/libc/inc/signal.h ${CMAKE_SOURCE_DIR}/libc/inc/signal.h
${PROJECT_SOURCE_DIR}/libc/inc/stdarg.h ${CMAKE_SOURCE_DIR}/libc/inc/stdarg.h
${PROJECT_SOURCE_DIR}/libc/inc/stdbool.h ${CMAKE_SOURCE_DIR}/libc/inc/stdbool.h
${PROJECT_SOURCE_DIR}/libc/inc/stddef.h ${CMAKE_SOURCE_DIR}/libc/inc/stddef.h
${PROJECT_SOURCE_DIR}/libc/inc/stdint.h ${CMAKE_SOURCE_DIR}/libc/inc/stdint.h
${PROJECT_SOURCE_DIR}/libc/inc/stdio.h ${CMAKE_SOURCE_DIR}/libc/inc/stdio.h
${PROJECT_SOURCE_DIR}/libc/inc/stdlib.h ${CMAKE_SOURCE_DIR}/libc/inc/stdlib.h
${PROJECT_SOURCE_DIR}/libc/inc/strerror.h ${CMAKE_SOURCE_DIR}/libc/inc/strerror.h
${PROJECT_SOURCE_DIR}/libc/inc/string.h ${CMAKE_SOURCE_DIR}/libc/inc/string.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/bitops.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/bitops.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/dirent.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/dirent.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/errno.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/errno.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/ioctl.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/ioctl.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/kernel_levels.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/kernel_levels.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/reboot.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/reboot.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/stat.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/stat.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/types.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/types.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/unistd.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/unistd.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/utsname.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/utsname.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/wait.h ${CMAKE_SOURCE_DIR}/libc/inc/sys/wait.h
${PROJECT_SOURCE_DIR}/libc/inc/system/syscall_types.h ${CMAKE_SOURCE_DIR}/libc/inc/system/syscall_types.h
${PROJECT_SOURCE_DIR}/libc/inc/termios.h ${CMAKE_SOURCE_DIR}/libc/inc/termios.h
${PROJECT_SOURCE_DIR}/libc/inc/time.h ${CMAKE_SOURCE_DIR}/libc/inc/time.h
${PROJECT_SOURCE_DIR}/libc/src/abort.c ${CMAKE_SOURCE_DIR}/libc/src/abort.c
${PROJECT_SOURCE_DIR}/libc/src/assert.c ${CMAKE_SOURCE_DIR}/libc/src/assert.c
${PROJECT_SOURCE_DIR}/libc/src/ctype.c ${CMAKE_SOURCE_DIR}/libc/src/ctype.c
${PROJECT_SOURCE_DIR}/libc/src/fcvt.c ${CMAKE_SOURCE_DIR}/libc/src/fcvt.c
${PROJECT_SOURCE_DIR}/libc/src/grp.c ${CMAKE_SOURCE_DIR}/libc/src/grp.c
${PROJECT_SOURCE_DIR}/libc/src/io/debug.c ${CMAKE_SOURCE_DIR}/libc/src/io/debug.c
${PROJECT_SOURCE_DIR}/libc/src/io/mm_io.c ${CMAKE_SOURCE_DIR}/libc/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/libc/src/ipc/ipc.c ${CMAKE_SOURCE_DIR}/libc/src/ipc/ipc.c
${PROJECT_SOURCE_DIR}/libc/src/libc_start.c ${CMAKE_SOURCE_DIR}/libc/src/libc_start.c
${PROJECT_SOURCE_DIR}/libc/src/libgen.c ${CMAKE_SOURCE_DIR}/libc/src/libgen.c
${PROJECT_SOURCE_DIR}/libc/src/math.c ${CMAKE_SOURCE_DIR}/libc/src/math.c
${PROJECT_SOURCE_DIR}/libc/src/pwd.c ${CMAKE_SOURCE_DIR}/libc/src/pwd.c
${PROJECT_SOURCE_DIR}/libc/src/sched.c ${CMAKE_SOURCE_DIR}/libc/src/sched.c
${PROJECT_SOURCE_DIR}/libc/src/setenv.c ${CMAKE_SOURCE_DIR}/libc/src/setenv.c
${PROJECT_SOURCE_DIR}/libc/src/stdio.c ${CMAKE_SOURCE_DIR}/libc/src/stdio.c
${PROJECT_SOURCE_DIR}/libc/src/stdlib.c ${CMAKE_SOURCE_DIR}/libc/src/stdlib.c
${PROJECT_SOURCE_DIR}/libc/src/strerror.c ${CMAKE_SOURCE_DIR}/libc/src/strerror.c
${PROJECT_SOURCE_DIR}/libc/src/string.c ${CMAKE_SOURCE_DIR}/libc/src/string.c
${PROJECT_SOURCE_DIR}/libc/src/sys/errno.c ${CMAKE_SOURCE_DIR}/libc/src/sys/errno.c
${PROJECT_SOURCE_DIR}/libc/src/sys/ioctl.c ${CMAKE_SOURCE_DIR}/libc/src/sys/ioctl.c
${PROJECT_SOURCE_DIR}/libc/src/sys/unistd.c ${CMAKE_SOURCE_DIR}/libc/src/sys/unistd.c
${PROJECT_SOURCE_DIR}/libc/src/sys/utsname.c ${CMAKE_SOURCE_DIR}/libc/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/libc/src/termios.c ${CMAKE_SOURCE_DIR}/libc/src/termios.c
${PROJECT_SOURCE_DIR}/libc/src/time.c ${CMAKE_SOURCE_DIR}/libc/src/time.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/chdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/chdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/close.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/close.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/creat.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/creat.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/exec.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/exec.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/exit.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/exit.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/fork.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/fork.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getcwd.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getcwd.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getdents.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getdents.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getpgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getpgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getpid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getpid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getppid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getppid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getsid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getsid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getuid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getuid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/interval.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/interval.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/kill.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/kill.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/lseek.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/lseek.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/mkdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/mkdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/nice.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/nice.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/open.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/open.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/read.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/read.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/reboot.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/reboot.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/rmdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/rmdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setpgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setpgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setsid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setsid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setuid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setuid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/signal.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/signal.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/stat.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/stat.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/unlink.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/unlink.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/waitpid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/waitpid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/write.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/write.c
${PROJECT_SOURCE_DIR}/libc/src/vscanf.c ${CMAKE_SOURCE_DIR}/libc/src/vscanf.c
${PROJECT_SOURCE_DIR}/libc/src/vsprintf.c ${CMAKE_SOURCE_DIR}/libc/src/vsprintf.c
${PROJECT_SOURCE_DIR}/libc/src/crt0.S ${CMAKE_SOURCE_DIR}/libc/src/crt0.S
) )
endif (DOXYGEN_FOUND) endif (DOXYGEN_FOUND)
+2 -3
View File
@@ -1,9 +1,8 @@
MentOS 0.1 MentOS 0.6.0
Welcome to the MentOS, the Mentoring Operating System. Welcome to the MentOS, the Mentoring Operating System.
If you want some help enter the "help" command into the cli. If you want some help enter the "man" command into the cli.
Bye, Bye,
The Ment(OS) Team The Ment(OS) Team
-1
View File
@@ -1 +0,0 @@
io ti vi bi!
-1
View File
@@ -1 +0,0 @@
tanto questa e' solo una prova :\
-1
View File
@@ -1 +0,0 @@
ciao mondo
-3
View File
@@ -1,3 +0,0 @@
come va ?
AAA
-1
View File
@@ -1 +0,0 @@
bho, io credo bene eh eh eh
-1
View File
@@ -1 +0,0 @@
tanto questa e' solo una prova :\
-1
View File
@@ -1 +0,0 @@
io ti vi bi!
+8
View File
@@ -0,0 +1,8 @@
SYNOPSIS
mkdir DIRECTORY
DESCRIPTION
Create the DIRECTORY, if it does not exist.
OPTIONS
--help : shows command help.
+8
View File
@@ -0,0 +1,8 @@
SYNOPSIS
rmdir DIRECTORY
DESCRIPTION
Remove the DIRECTORY, if it is empty.
OPTIONS
--help : shows command help.
+5
View File
@@ -0,0 +1,5 @@
SYNOPSIS
showpid
DESCRIPTION
showpid uses getppid() to print the ID of the parent process.
+1 -1
View File
@@ -2,6 +2,6 @@ set timeout=5
set default=0 set default=0
menuentry "MentOS" { menuentry "MentOS" {
multiboot /boot/kernel-bootloader.bin multiboot /boot/bootloader.bin
boot boot
} }
+67 -138
View File
@@ -1,148 +1,77 @@
# ============================================================================= # =============================================================================
# Author: Enrico Fraccaroli # LIBRARY
# ============================================================================= # =============================================================================
# Set the minimum required version of cmake.
cmake_minimum_required(VERSION 3.1...3.22)
# Initialize the project.
project(libc C ASM)
# =============================================================================
# ASSEMBLY
# =============================================================================
# Enable the assembly language.
enable_language(ASM)
# Find the NASM compiler.
find_program(ASM_COMPILER NAMES nasm HINTS /usr/bin/ /usr/local/bin/)
# Mark the variable ASM_COMPILER as advanced.
mark_as_advanced(ASM_COMPILER)
# Check that we have found the compiler.
if(NOT ASM_COMPILER)
message(FATAL_ERROR "ASM compiler not found!")
endif(NOT ASM_COMPILER)
# Set the asm compiler.
set(CMAKE_ASM_COMPILER ${ASM_COMPILER})
# Set the assembly compiler flags.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O0 -F dwarf -o <OBJECT> <SOURCE>")
else()
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O3 -o <OBJECT> <SOURCE>")
endif()
# =============================================================================
# C WARNINGs
# =============================================================================
# Warning flags.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpedantic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
# Disable some specific warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
# Set the compiler options.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdlib")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-protector")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# =============================================================================
# Add the library. # Add the library.
add_library( add_library(
${PROJECT_NAME} libc
${CMAKE_SOURCE_DIR}/libc/src/stdio.c
${PROJECT_SOURCE_DIR}/src/stdio.c ${CMAKE_SOURCE_DIR}/libc/src/ctype.c
${PROJECT_SOURCE_DIR}/src/ctype.c ${CMAKE_SOURCE_DIR}/libc/src/string.c
${PROJECT_SOURCE_DIR}/src/string.c ${CMAKE_SOURCE_DIR}/libc/src/stdlib.c
${PROJECT_SOURCE_DIR}/src/stdlib.c ${CMAKE_SOURCE_DIR}/libc/src/math.c
${PROJECT_SOURCE_DIR}/src/math.c ${CMAKE_SOURCE_DIR}/libc/src/fcvt.c
${PROJECT_SOURCE_DIR}/src/fcvt.c ${CMAKE_SOURCE_DIR}/libc/src/time.c
${PROJECT_SOURCE_DIR}/src/time.c ${CMAKE_SOURCE_DIR}/libc/src/strerror.c
${PROJECT_SOURCE_DIR}/src/strerror.c ${CMAKE_SOURCE_DIR}/libc/src/termios.c
${PROJECT_SOURCE_DIR}/src/termios.c ${CMAKE_SOURCE_DIR}/libc/src/libgen.c
${PROJECT_SOURCE_DIR}/src/libgen.c ${CMAKE_SOURCE_DIR}/libc/src/vsprintf.c
${PROJECT_SOURCE_DIR}/src/vsprintf.c ${CMAKE_SOURCE_DIR}/libc/src/vscanf.c
${PROJECT_SOURCE_DIR}/src/vscanf.c ${CMAKE_SOURCE_DIR}/libc/src/pwd.c
${PROJECT_SOURCE_DIR}/src/pwd.c ${CMAKE_SOURCE_DIR}/libc/src/grp.c
${PROJECT_SOURCE_DIR}/src/grp.c ${CMAKE_SOURCE_DIR}/libc/src/sched.c
${PROJECT_SOURCE_DIR}/src/sched.c ${CMAKE_SOURCE_DIR}/libc/src/readline.c
${PROJECT_SOURCE_DIR}/src/readline.c ${CMAKE_SOURCE_DIR}/libc/src/setenv.c
${PROJECT_SOURCE_DIR}/src/setenv.c ${CMAKE_SOURCE_DIR}/libc/src/assert.c
${PROJECT_SOURCE_DIR}/src/assert.c ${CMAKE_SOURCE_DIR}/libc/src/abort.c
${PROJECT_SOURCE_DIR}/src/abort.c ${CMAKE_SOURCE_DIR}/libc/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/src/io/mm_io.c ${CMAKE_SOURCE_DIR}/libc/src/io/debug.c
${PROJECT_SOURCE_DIR}/src/io/debug.c ${CMAKE_SOURCE_DIR}/libc/src/sys/ipc.c
${PROJECT_SOURCE_DIR}/src/sys/ipc.c ${CMAKE_SOURCE_DIR}/libc/src/sys/unistd.c
${PROJECT_SOURCE_DIR}/src/sys/unistd.c ${CMAKE_SOURCE_DIR}/libc/src/sys/errno.c
${PROJECT_SOURCE_DIR}/src/sys/errno.c ${CMAKE_SOURCE_DIR}/libc/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/src/sys/utsname.c ${CMAKE_SOURCE_DIR}/libc/src/sys/mman.c
${PROJECT_SOURCE_DIR}/src/sys/mman.c ${CMAKE_SOURCE_DIR}/libc/src/sys/ioctl.c
${PROJECT_SOURCE_DIR}/src/sys/ioctl.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/creat.c
${PROJECT_SOURCE_DIR}/src/unistd/creat.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getppid.c
${PROJECT_SOURCE_DIR}/src/unistd/getppid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getpid.c
${PROJECT_SOURCE_DIR}/src/unistd/getpid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/exit.c
${PROJECT_SOURCE_DIR}/src/unistd/exit.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setsid.c
${PROJECT_SOURCE_DIR}/src/unistd/setsid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getsid.c
${PROJECT_SOURCE_DIR}/src/unistd/getsid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setpgid.c
${PROJECT_SOURCE_DIR}/src/unistd/setpgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getpgid.c
${PROJECT_SOURCE_DIR}/src/unistd/getpgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setgid.c
${PROJECT_SOURCE_DIR}/src/unistd/setgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getgid.c
${PROJECT_SOURCE_DIR}/src/unistd/getgid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/setuid.c
${PROJECT_SOURCE_DIR}/src/unistd/setuid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getuid.c
${PROJECT_SOURCE_DIR}/src/unistd/getuid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/fork.c
${PROJECT_SOURCE_DIR}/src/unistd/fork.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/read.c
${PROJECT_SOURCE_DIR}/src/unistd/read.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/write.c
${PROJECT_SOURCE_DIR}/src/unistd/write.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/exec.c
${PROJECT_SOURCE_DIR}/src/unistd/exec.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/nice.c
${PROJECT_SOURCE_DIR}/src/unistd/nice.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/open.c
${PROJECT_SOURCE_DIR}/src/unistd/open.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/reboot.c
${PROJECT_SOURCE_DIR}/src/unistd/reboot.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/waitpid.c
${PROJECT_SOURCE_DIR}/src/unistd/waitpid.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/chdir.c
${PROJECT_SOURCE_DIR}/src/unistd/chdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getcwd.c
${PROJECT_SOURCE_DIR}/src/unistd/getcwd.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/close.c
${PROJECT_SOURCE_DIR}/src/unistd/close.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/stat.c
${PROJECT_SOURCE_DIR}/src/unistd/stat.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/rmdir.c
${PROJECT_SOURCE_DIR}/src/unistd/rmdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/mkdir.c
${PROJECT_SOURCE_DIR}/src/unistd/mkdir.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/unlink.c
${PROJECT_SOURCE_DIR}/src/unistd/unlink.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/getdents.c
${PROJECT_SOURCE_DIR}/src/unistd/getdents.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/lseek.c
${PROJECT_SOURCE_DIR}/src/unistd/lseek.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/kill.c
${PROJECT_SOURCE_DIR}/src/unistd/kill.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/signal.c
${PROJECT_SOURCE_DIR}/src/unistd/signal.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/interval.c
${PROJECT_SOURCE_DIR}/src/unistd/interval.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/symlink.c
${PROJECT_SOURCE_DIR}/src/unistd/symlink.c ${CMAKE_SOURCE_DIR}/libc/src/unistd/readlink.c
${PROJECT_SOURCE_DIR}/src/unistd/readlink.c ${CMAKE_SOURCE_DIR}/libc/src/libc_start.c
${PROJECT_SOURCE_DIR}/src/libc_start.c ${CMAKE_SOURCE_DIR}/libc/src/crt0.S
${PROJECT_SOURCE_DIR}/src/crt0.S
) )
# Add the includes. # Add the includes.
target_include_directories(${PROJECT_NAME} PUBLIC inc) target_include_directories(libc PUBLIC inc)
# Remove the 'lib' prefix. # Remove the 'lib' prefix.
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") set_target_properties(libc PROPERTIES PREFIX "")
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file array.h /// @file array.h
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file assert.h /// @file assert.h
/// @brief Defines the function and pre-processor macro for assertions. /// @brief Defines the function and pre-processor macro for assertions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctls.h /// @file ioctls.h
/// @brief Input/Output ConTroL (IOCTL) numbers. /// @brief Input/Output ConTroL (IOCTL) numbers.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stat.h /// @file stat.h
/// @brief Defines the structure used by the functiosn fstat(), lstat(), and stat(). /// @brief Defines the structure used by the functiosn fstat(), lstat(), and stat().
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios-struct.h /// @file termios-struct.h
/// @brief Definition of the `termios` structure. /// @brief Definition of the `termios` structure.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ctype.h /// @file ctype.h
/// @brief Functions related to character handling. /// @brief Functions related to character handling.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcntl.h /// @file fcntl.h
/// @brief Headers of functions fcntl() and open(). /// @brief Headers of functions fcntl() and open().
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcvt.h /// @file fcvt.h
/// @brief Declare the functions required to turn double values into a string. /// @brief Declare the functions required to turn double values into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file grp.h /// @file grp.h
/// @brief Defines the structures and functions for managing groups. /// @brief Defines the structures and functions for managing groups.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ansi_colors.h /// @file ansi_colors.h
/// @brief List of ANSI colors. /// @brief List of ANSI colors.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file debug.h /// @file debug.h
/// @brief Debugging primitives. /// @brief Debugging primitives.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file mm_io.h /// @file mm_io.h
/// @brief Memory Mapped IO functions. /// @brief Memory Mapped IO functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file port_io.h /// @file port_io.h
/// @brief Byte I/O on ports prototypes. /// @brief Byte I/O on ports prototypes.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libgen.h /// @file libgen.h
/// @brief String routines. /// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "stddef.h" #include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file limits.h /// @file limits.h
/// @brief OS numeric limits. /// @brief OS numeric limits.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file math.h /// @file math.h
/// @brief Mathematical constants and functions. /// @brief Mathematical constants and functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file pwd.h /// @file pwd.h
/// @brief Contains the structure and functions for managing passwords. /// @brief Contains the structure and functions for managing passwords.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file readline.h /// @file readline.h
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "stddef.h" #include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ring_buffer.h /// @file ring_buffer.h
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sched.h /// @file sched.h
/// @brief Structures and functions for managing the scheduler. /// @brief Structures and functions for managing the scheduler.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/types.h" #include "sys/types.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file signal.h /// @file signal.h
/// @brief Signals definition. /// @brief Signals definition.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdarg.h /// @file stdarg.h
/// @brief Contains the macros required to manage variable number of arguments. /// @brief Contains the macros required to manage variable number of arguments.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdbool.h /// @file stdbool.h
/// @brief Defines the boolean values. /// @brief Defines the boolean values.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stddef.h /// @file stddef.h
/// @brief Define basic data types. /// @brief Define basic data types.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdint.h /// @file stdint.h
/// @brief Standard integer data-types. /// @brief Standard integer data-types.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdio.h /// @file stdio.h
/// @brief Standard I/0 functions. /// @brief Standard I/0 functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdlib.h /// @file stdlib.h
/// @brief Useful generic functions and macros. /// @brief Useful generic functions and macros.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file strerror.h /// @file strerror.h
/// @brief Contains the function that transfornms an errno into a string. /// @brief Contains the function that transfornms an errno into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file string.h /// @file string.h
/// @brief String routines. /// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file bitops.h /// @file bitops.h
/// @brief Bitmasks functions. /// @brief Bitmasks functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file dirent.h /// @file dirent.h
/// @brief Functions used to manage directories. /// @brief Functions used to manage directories.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file errno.h /// @file errno.h
/// @brief System call errors definition. /// @brief System call errors definition.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctl.h /// @file ioctl.h
/// @brief Input/Output ConTroL (IOCTL) functions. /// @brief Input/Output ConTroL (IOCTL) functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ipc.h /// @file ipc.h
/// @brief Inter-Process Communication (IPC) structures. /// @brief Inter-Process Communication (IPC) structures.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file kernel_levels.h /// @file kernel_levels.h
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file list_head.h /// @file list_head.h
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file list_head_algorithm.h /// @file list_head_algorithm.h
/// @author Enrico Fraccaroli (enry.frak@gmail.com) /// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Some general algorithm that might come in handy while using list_head. /// @brief Some general algorithm that might come in handy while using list_head.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file mman.h /// @file mman.h
/// @author Enrico Fraccaroli (enry.frak@gmail.com) /// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Functions for managing mappings in virtual address space. /// @brief Functions for managing mappings in virtual address space.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file msg.h /// @file msg.h
/// @brief Definition of structure for managing message queues. /// @brief Definition of structure for managing message queues.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file reboot.h /// @file reboot.h
/// @brief Defines the values required to issue a reboot. /// @brief Defines the values required to issue a reboot.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sem.h /// @file sem.h
/// @brief Definition of structure for managing semaphores. /// @brief Definition of structure for managing semaphores.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file shm.h /// @file shm.h
/// @brief Definition of structure for managing shared memories. /// @brief Definition of structure for managing shared memories.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stat.h /// @file stat.h
/// @brief Stat functions. /// @brief Stat functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file types.h /// @file types.h
/// @brief Collection of Kernel datatype /// @brief Collection of Kernel datatype
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file unistd.h /// @file unistd.h
/// @brief Functions used to manage files. /// @brief Functions used to manage files.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file utsname.h /// @file utsname.h
/// @brief Functions used to provide information about the machine & OS. /// @brief Functions used to provide information about the machine & OS.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file wait.h /// @file wait.h
/// @brief Event management functions. /// @brief Event management functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file syscall_types.h /// @file syscall_types.h
/// @brief System Call numbers. /// @brief System Call numbers.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios.h /// @file termios.h
/// @brief Defines the termios functions. /// @brief Defines the termios functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file time.h /// @file time.h
/// @brief Time-related functions. /// @brief Time-related functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#pragma once #pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file abort.c /// @file abort.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file assert.c /// @file assert.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "assert.h" #include "assert.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ctype.c /// @file ctype.c
/// @brief Functions related to character handling. /// @brief Functions related to character handling.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "ctype.h" #include "ctype.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcvt.c /// @file fcvt.c
/// @brief Define the functions required to turn double values into a string. /// @brief Define the functions required to turn double values into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "fcvt.h" #include "fcvt.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file grp.c /// @file grp.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "grp.h" #include "grp.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file debug.c /// @file debug.c
/// @brief Debugging primitives. /// @brief Debugging primitives.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "io/debug.h" #include "io/debug.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file mm_io.c /// @file mm_io.c
/// @brief Memory Mapped IO functions implementation. /// @brief Memory Mapped IO functions implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "io/mm_io.h" #include "io/mm_io.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libc_start.c /// @file libc_start.c
/// @brief Contains the programs initialization procedure. /// @brief Contains the programs initialization procedure.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libgen.c /// @file libgen.c
/// @brief String routines. /// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "libgen.h" #include "libgen.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file math.c /// @file math.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "math.h" #include "math.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file pwd.c /// @file pwd.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "pwd.h" #include "pwd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sched.c /// @file sched.c
/// @brief Function for managing scheduler. /// @brief Function for managing scheduler.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "system/syscall_types.h" #include "system/syscall_types.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file setenv.c /// @file setenv.c
/// @brief Defines the functions used to manipulate the environmental variables. /// @brief Defines the functions used to manipulate the environmental variables.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/errno.h" #include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdio.c /// @file stdio.c
/// @brief Standard I/0 functions. /// @brief Standard I/0 functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/errno.h" #include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdlib.c /// @file stdlib.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "stddef.h" #include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file strerror.c /// @file strerror.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "strerror.h" #include "strerror.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file string.c /// @file string.c
/// @brief String routines. /// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "string.h" #include "string.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file errno.c /// @file errno.c
/// @brief Stores the error number. /// @brief Stores the error number.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/errno.h" #include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctl.c /// @file ioctl.c
/// @brief Input/Output ConTroL (IOCTL) functions implementation. /// @brief Input/Output ConTroL (IOCTL) functions implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/ioctl.h" #include "sys/ioctl.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ipc.c /// @file ipc.c
/// @brief Inter-Process Communication (IPC) system call implementation. /// @brief Inter-Process Communication (IPC) system call implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/ipc.h" #include "sys/ipc.h"
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file mman.c /// @file mman.c
/// @author Enrico Fraccaroli (enry.frak@gmail.com) /// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Functions for managing mappings in virtual address space. /// @brief Functions for managing mappings in virtual address space.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/mman.h" #include "sys/mman.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file unistd.c /// @file unistd.c
/// @brief Functions used to manage files. /// @brief Functions used to manage files.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file utsname.c /// @file utsname.c
/// @brief Functions used to provide information about the machine & OS. /// @brief Functions used to provide information about the machine & OS.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/utsname.h" #include "sys/utsname.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios.c /// @file termios.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "termios.h" #include "termios.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file time.c /// @file time.c
/// @brief Clock functions. /// @brief Clock functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "time.h" #include "time.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file chdir.c /// @file chdir.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file close.c /// @file close.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file creat.c /// @file creat.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+3 -17
View File
@@ -1,6 +1,6 @@
/// @file exec.c /// @file exec.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
@@ -72,21 +72,7 @@ int execv(const char *path, char *const argv[])
int execvp(const char *file, char *const argv[]) int execvp(const char *file, char *const argv[])
{ {
if (!file || !argv || !environ) { return execvpe(file, argv, environ);
errno = ENOENT;
return -1;
}
if (file[0] == '/') {
return execve(file, argv, environ);
}
// Prepare a buffer for the absolute path.
char absolute_path[PATH_MAX] = { 0 };
// Find the file inside the entries of the PATH variable.
if (__find_in_path(file, absolute_path, PATH_MAX) == 0) {
return execve(absolute_path, argv, environ);
}
errno = ENOENT;
return -1;
} }
int execvpe(const char *file, char *const argv[], char *const envp[]) int execvpe(const char *file, char *const argv[], char *const envp[])
@@ -95,7 +81,7 @@ int execvpe(const char *file, char *const argv[], char *const envp[])
errno = ENOENT; errno = ENOENT;
return -1; return -1;
} }
if (file[0] == '/') { if (strchr(file, '/')) {
return execve(file, argv, envp); return execve(file, argv, envp);
} }
// Prepare a buffer for the absolute path. // Prepare a buffer for the absolute path.
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file exit.c /// @file exit.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fork.c /// @file fork.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getcwd.c /// @file getcwd.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getdents.c /// @file getdents.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getgid.c /// @file getgid.c
/// @brief /// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License. /// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details. /// See LICENSE.md for details.
#include "sys/unistd.h" #include "sys/unistd.h"

Some files were not shown because too many files have changed in this diff Show More