refactor(rootfs): reorganize file structure and remove unnecessary .gitkeep files

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-03-24 15:33:07 +00:00
parent 8f88d9028e
commit d251d9d03f
55 changed files with 622 additions and 596 deletions

View File

@@ -344,7 +344,7 @@ void test_file()
{
printf("- Testing file operations\n");
FILE *test = fopen("/etc/passwd", "r");
FILE *test = fopen("/sys/cfg/passwd", "r");
if (test == NULL)
{
perror("fopen");
@@ -353,7 +353,7 @@ void test_file()
return;
}
printf("/etc/passwd contents: ");
printf("/sys/cfg/passwd contents: ");
char ch;
while (1)
{
@@ -373,7 +373,7 @@ void test_stat()
printf("- Testing stat\n");
struct stat st;
if (stat("/etc/passwd", &st) == -1)
if (stat("/sys/cfg/passwd", &st) == -1)
{
perror("stat");
fflush(stdout);
@@ -385,7 +385,7 @@ void test_stat()
printf("File mode: %o\n", st.st_mode);
printf("File inode: %ld\n", st.st_ino);
int fd = open("/etc/passwd", O_RDONLY);
int fd = open("/sys/cfg/passwd", O_RDONLY);
if (fd == -1)
{
perror("open");
@@ -407,7 +407,7 @@ void test_stat()
printf("File inode: %ld\n", st.st_ino);
close(fd);
if (lstat("/etc/passwd", &st) == -1)
if (lstat("/sys/cfg/passwd", &st) == -1)
{
perror("lstat");
fflush(stdout);