Conversation
This reverts (most of) commit 24c26d0.
93b0625
to
e404638
Compare
We're almost there. Need to implement one more syscall, wrap up the documentation, and this is ready for the first round of review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of little changes in here. Overall, it looks good to and about ready to merge
include/libtransistor/err.h
Outdated
#define FSPSRV_RESULT(code) MAKE_RESULT(MODULE_FS, code) | ||
#define FSPSRV_ERR_NOT_FOUND FSPSRV_RESULT(1) | ||
#define FSPSRV_ERR_EXISTS FSPSRV_RESULT(2) | ||
#define FSPSRV_ERR_DIRECTORY_NOT_EMPTY FSPSRV_RESULT(8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably move to fs/err.h or ipc/fs/err.h or something
include/libtransistor/err.h
Outdated
MODULE_WEBAPPLET_WIFIAUTH = 809, | ||
MODULE_APPLET_WHITELISTED = 810, | ||
MODULE_SHOPN = 811, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takes up a lot of space, err_modules.h
maybe?
* trn_fs_mount("/gamecard", &gamecard_inode); | ||
* @endcode | ||
*/ | ||
result_t trn_fs_mount(const char *name, trn_inode_t *root); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this will break if you trn_fs_set_root
, should we maybe remove this and add a function to grab the default rootfs and use trn_rootfs_mount_fs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was that if we end up changing how mounts work (say, we end up wanting to do mounting in arbitrary location and getting rid of rootfs), we can do that without breaking userspace applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, alright.
* needs. For instance, when porting software, you might need to place some | ||
* files in certain locations, or just need more leeway in how the root fs | ||
* works. In these cases, you can use `trn_fs_set_root` to change what the root | ||
* filesystem implementation is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a little confusing that the concept of a "root filesystem" is not necessarily the same thing as "rootfs". I'd suggest either making that very clear in the documentation or renaming rootfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I want to rename rootfs to mountfs. Will do.
include/libtransistor/fs/fs.h
Outdated
|
||
// The rest of those functions should probably not be directly used. Instead, | ||
// use the standard posix calls of the same name... | ||
// Maybe we should still men |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
men
<- is this a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. That said document them
at one point. Probably did something weird in vim :P
@@ -0,0 +1,567 @@ | |||
#include<libtransistor/types.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment that this file is autogenerated and should probably not be modified
@@ -0,0 +1,53 @@ | |||
#include<libtransistor/types.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autogen comment
@@ -0,0 +1,120 @@ | |||
#include<libtransistor/types.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autogen comment
@@ -0,0 +1,400 @@ | |||
#include<libtransistor/types.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autogen comment
test/test_fs_stress.c
Outdated
|
||
#include"../lib/squashfs/squashfuse.h" | ||
|
||
/********************************************************************* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to a separate file and #include
it
* add error codes for read only and access denied * fix typo in fs/fs.h * add param docs for fspfs and mountfs * make mountfs copy name * make mountfs return access denied instead of internal error
…_mountfs_mount and crt0_common's setup_fs
This reverts commit 355654b.
…de has blank path to avoid slash-stripping hack
misson20000: You might want to make your typedefs for ifilesystem_t and such be anonymous structsSee sdcardfs #109 (comment)