Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

sdcardfs #109

Merged
merged 66 commits into from Mar 5, 2018
Merged

sdcardfs #109

merged 66 commits into from Mar 5, 2018

Conversation

roblabla
Copy link
Member

@roblabla roblabla commented Feb 21, 2018

  • IPC Bindings
  • Rework of the mountpoint
  • Make VFS layer pass a pointer to data instead of the data itself. See this comment
  • cleanup commits.
  • misson20000: You might want to make your typedefs for ifilesystem_t and such be anonymous structs See sdcardfs #109 (comment)
  • Error handling
  • IFileSystem implementation
    • mount
    • stat
    • open
      • O_TRUNC
      • O_APPEND
    • read
    • create
      • O_EXCL
    • write
    • rename
    • unlink (deleting files)
    • opendir
    • readdir
    • mkdir
    • rmdir
  • DOCUMENTATION !!!!

@misson20000 misson20000 added this to Todo in Work Feb 23, 2018
@misson20000 misson20000 moved this from Todo to In Progress (roblabla) in Work Feb 23, 2018
@roblabla
Copy link
Member Author

roblabla commented Mar 2, 2018

We're almost there. Need to implement one more syscall, wrap up the documentation, and this is ready for the first round of review.

Copy link
Member

@misson20000 misson20000 left a 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

#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)
Copy link
Member

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

MODULE_WEBAPPLET_WIFIAUTH = 809,
MODULE_APPLET_WHITELISTED = 810,
MODULE_SHOPN = 811,
};
Copy link
Member

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);
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.
Copy link
Member

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.

Copy link
Member Author

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.


// 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
Copy link
Member

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?

Copy link
Member Author

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autogen comment


#include"../lib/squashfs/squashfuse.h"

/*********************************************************************
Copy link
Member

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

@roblabla roblabla changed the title [WIP] sdcardfs sdcardfs Mar 5, 2018
@misson20000 misson20000 merged commit 0fb9b11 into reswitched:development Mar 5, 2018
Work automation moved this from In Progress (roblabla) to Done Mar 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Work
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants