diff options
author | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 15:05:22 -0400 |
---|---|---|
committer | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 15:05:22 -0400 |
commit | e4324f180c31ebf06206be6dff5f3863d6ec2675 (patch) | |
tree | 73f197fe28c8cc9efdb113b9702790d0085caaff /kernel/fs | |
parent | tar.c documentation (diff) | |
parent | start docs (diff) | |
download | comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.gz comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.bz2 comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.zip |
Merge branch 'main' of https://github.com/kenshineto/kern
Should have fixed
Diffstat (limited to 'kernel/fs')
-rw-r--r-- | kernel/fs/ramfs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/fs/ramfs.c b/kernel/fs/ramfs.c index e9d5bc2..0c92c96 100644 --- a/kernel/fs/ramfs.c +++ b/kernel/fs/ramfs.c @@ -1,5 +1,5 @@ -/*#include <comus/fs.h> -#include <lib.h> +#include <comus/fs.h> +/*#include <lib.h> //#include <comus/tar.h> //#include <string.h> #include <comus/ramfs.h> @@ -36,7 +36,7 @@ int ramfs_delete(const char *name) { kfree(allTheFiles[i].data); for(int j = i; j < numberOfFiles; j++) { allTheFiles[j] = allTheFiles[j+1]; - numberOfFiles -= 1; + numberOfFiles -= 1; } return NOERROR; @@ -62,7 +62,7 @@ int ramfs_write(const char *name, char *buffer) { } // here we return the index of the file as well. -/*int ramfs_find_file(root *r, const char *fullpath, const char *name, file *out, directory *outDirectory) { +*int ramfs_find_file(root *r, const char *fullpath, const char *name, file *out, directory *outDirectory) { directory *location = r->root; if(ramfs_find_directory(r, fullpath, name, location) == NOERROR) { for(int i = 0; i < location->file_count; i++) { @@ -89,14 +89,14 @@ int ramfs_find_directory(root *r, const char *fullpath, const char *name, direct location = location->directories[i]; wasItFound = true; break; - + } } if(!wasItFound) { return ERROR; } tempPath = strtok(NULL, "/"); - + } out = location; return NOERROR; @@ -142,7 +142,7 @@ int ramfs_delete_file(root *r, const char *fullpath, const char *name) { return NOERROR; } return ERROR; - + } return ERROR; } @@ -155,7 +155,7 @@ int ramfs_delete_directory() { } int ramfs_write() { - + } |