diff options
author | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 13:45:01 -0400 |
---|---|---|
committer | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 13:45:01 -0400 |
commit | a7e9c12e9b76cff64176dad2313de7c9c85ab372 (patch) | |
tree | 26e0747c512eb7ab7ffacf5eee1ea02593c44c8b /kernel/fs | |
parent | Commenting out ramfs things because they aren't working (diff) | |
download | comus-a7e9c12e9b76cff64176dad2313de7c9c85ab372.tar.gz comus-a7e9c12e9b76cff64176dad2313de7c9c85ab372.tar.bz2 comus-a7e9c12e9b76cff64176dad2313de7c9c85ab372.zip |
fixed tar_seek
Diffstat (limited to '')
-rw-r--r-- | kernel/fs/tar.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/fs/tar.c b/kernel/fs/tar.c index 9dccdd6..9de94df 100644 --- a/kernel/fs/tar.c +++ b/kernel/fs/tar.c @@ -142,15 +142,16 @@ int tar_seek(struct file *f, long int offsetAdd, int theSeek) { struct tar_file *tf = (struct tar_file*) f; if(theSeek == SEEK_SET) { tf->offset = offsetAdd; + return tf->offset; } else if(theSeek == SEEK_CUR) { tf->offset = tf->offset + offsetAdd; + return tf->offset; } else if(theSeek ==SEEK_END) { tf->offset = tf->len + offsetAdd; + return tf->offset; } else { - return ERROR_TAR; + return -1; } - return NOERROR_TAR; - } |