update to intra

This commit is contained in:
FactorialN 2023-11-26 23:52:09 -08:00
parent c2922f4d15
commit ee3891e58c
2 changed files with 23 additions and 8 deletions

View File

@ -1,7 +1,3 @@
class fischl{
// declare
public:
int init(int argc, char *argv[]);
}; int fischl(int argc, char *argv[]);

View File

@ -8,6 +8,20 @@
#include <stddef.h> #include <stddef.h>
#include <assert.h> #include <assert.h>
void* fischl_init(struct fuse_conn_info *conn) {
}
static int fischl_getattr(const char* path, struct stat* stbuf) {
return 0;
}
static int fischl_readdir(const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* fi) {
return 0;
}
static int fischl_mkdir(const char *, mode_t) { static int fischl_mkdir(const char *, mode_t) {
return 0; return 0;
@ -18,6 +32,11 @@ static int fischl_open(const char *path, struct fuse_file_info *fi) {
return 0; return 0;
} }
static int fischl_read(const char* path, char *buf, size_t size, off_t offset, struct fuse_file_info* fi) {
return 0;
}
static const struct fuse_operations fischl_oper = { static const struct fuse_operations fischl_oper = {
.init = fischl_init, .init = fischl_init,
.getattr = fischl_getattr, .getattr = fischl_getattr,
@ -27,7 +46,7 @@ static const struct fuse_operations fischl_oper = {
.read = fischl_read, .read = fischl_read,
}; };
static void show_help(const char *progname) static void fischl::show_help(const char *progname)
{ {
printf("usage: %s [options] <mountpoint>\n\n", progname); printf("usage: %s [options] <mountpoint>\n\n", progname);
printf("File-system specific options:\n" printf("File-system specific options:\n"
@ -38,7 +57,7 @@ static void show_help(const char *progname)
"\n"); "\n");
} }
int fischl::init(int argc, char *argv[]) int fischl(int argc, char *argv[])
{ {
int ret; int ret;
struct fuse_args args = FUSE_ARGS_INIT(argc, argv); struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
@ -60,7 +79,7 @@ int fischl::init(int argc, char *argv[])
args.argv[0][0] = '\0'; args.argv[0][0] = '\0';
} }
ret = fuse_main(args.argc, args.argv, &hello_oper, NULL); ret = fuse_main(args.argc, args.argv, &fischl_oper, NULL);
fuse_opt_free_args(&args); fuse_opt_free_args(&args);
return ret; return ret;
} }