Compare commits
No commits in common. "ff6a8713d3aa4bc797a1f2b9cffb2eb92166c6db" and "e48cbc62f15d7117d9fa71f3b6c82a5f2b6c0af8" have entirely different histories.
ff6a8713d3
...
e48cbc62f1
@ -20,17 +20,8 @@ static void *icfs_init(struct fuse_conn_info *conn, struct fuse_config *cfg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int icfs_getattr(const char *path, struct stat *stbuf,
|
||||
struct fuse_file_info *fi) {
|
||||
|
||||
int statret = source_stat(path, stbuf);
|
||||
|
||||
return statret;
|
||||
}
|
||||
|
||||
static const struct fuse_operations icfs_oper = {
|
||||
.init = icfs_init,
|
||||
.getattr = icfs_getattr,
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
@ -1,9 +1,8 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "sourcefs.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static struct source_files_handle {
|
||||
int root_fd;
|
||||
@ -20,9 +19,3 @@ int source_init(const char *root_path) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Currently this literally is a fstatat wrapper.
|
||||
int source_stat(const char *restrict pathname, struct stat *restrict statbuf) {
|
||||
int statret = fstatat(handle.root_fd, pathname, statbuf, 0);
|
||||
return statret;
|
||||
}
|
||||
|
@ -3,8 +3,6 @@
|
||||
#ifndef SOURCEFS_H
|
||||
#define SOURCEFS_H
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/**
|
||||
* Initializes the source file handling.
|
||||
*
|
||||
@ -13,11 +11,4 @@
|
||||
*/
|
||||
int source_init(const char *root_path);
|
||||
|
||||
/**
|
||||
* `stat()`, but for source files.
|
||||
*
|
||||
* @see `stat()`
|
||||
*/
|
||||
int source_stat(const char *restrict pathname, struct stat *restrict statbuf);
|
||||
|
||||
#endif // !SOURCEFS_H
|
||||
|
Loading…
Reference in New Issue
Block a user