This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fs-lzma' into development
- Loading branch information
Showing
532 changed files
with
317,331 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
OUTPUT_FORMAT(elf64-littleaarch64) | ||
|
||
SECTIONS | ||
{ | ||
.data : { | ||
_libtransistor_squashfs_image = .; | ||
*(.data .data*) | ||
_libtransistor_squashfs_image_end = .; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include<stdio.h> | ||
|
||
typedef struct { | ||
void *data; | ||
size_t size; | ||
off_t head; | ||
} blob_file; | ||
|
||
int blobfd_create(blob_file *data, void *blob, size_t size); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include<libtransistor/types.h> | ||
#include<libtransistor/fs/inode.h> | ||
|
||
#include<sys/stat.h> | ||
|
||
result_t trn_fs_set_root(trn_inode_t *root); | ||
result_t trn_fs_realpath(const char *path, char **resolved_path); | ||
result_t trn_fs_open(int *fd, const char *path, int flags); | ||
result_t trn_fs_opendir(trn_dir_t *dir, const char *path); | ||
result_t trn_fs_chdir(const char *path); | ||
result_t trn_fs_stat(const char *path, struct stat *st); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma once | ||
|
||
#include<libtransistor/types.h> | ||
#include<stdlib.h> | ||
|
||
struct trn_inode_ops_t; | ||
|
||
typedef struct { | ||
void *data; | ||
struct trn_inode_ops_t *ops; | ||
} trn_inode_t; // libTRaNsistor INODE | ||
|
||
typedef struct { | ||
trn_inode_t inode; | ||
char name[256]; | ||
size_t name_size; | ||
} trn_dirent_t; | ||
|
||
typedef struct { | ||
result_t (*rewind)(void *dir); | ||
result_t (*next)(void *dir, trn_dirent_t *dirent); | ||
void (*close)(void *dir); | ||
} trn_dir_ops_t; | ||
|
||
typedef struct { | ||
void *data; | ||
trn_dir_ops_t *ops; | ||
} trn_dir_t; | ||
|
||
typedef struct trn_inode_ops_t { | ||
result_t (*is_dir)(void *inode, bool *out); | ||
result_t (*lookup)(void *inode, trn_inode_t *out, const char *name, size_t name_length); | ||
result_t (*release)(void *inode); | ||
|
||
/* | ||
Objects returned from these functions must not be invalidated if the inode is closed | ||
before they are. | ||
*/ | ||
result_t (*open_as_file)(void *inode, int mode, int *fd); | ||
result_t (*open_as_dir)(void *inode, trn_dir_t *out); | ||
} trn_inode_ops_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include<libtransistor/types.h> | ||
#include<libtransistor/fs/inode.h> | ||
#include "../../../lib/squashfs/squashfuse.h" // TODO: not this | ||
|
||
result_t trn_sqfs_open_root(trn_inode_t *out, sqfs *fs); |
Oops, something went wrong.