Skip to content
Extraits de code Groupes Projets

Database fuse

Fermé Kubat a demandé de fusionner database-fuse vers master
Affichage du commit 00e2d95d
Suivant
Afficher la dernière version
1 file
+ 73
0
Comparer les modifications
  • Côte à côte
  • En ligne
#include "sqlite3.h"
#define _GNU_SOURCE
#include <fuse.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <assert.h>
#include <dirent.h>
static volatile const char * database_path = NULL; /**<< @brief The path to the database. */
static volatile sqlite3 * database = NULL; /**<< @brief The database of the kara base. */
static int lektor_init(void)
{
if (sqlite3_open((const char*) database_path, (sqlite3**) &database) != 0)
return 1;
return 0;
}
static int lektor_getattr(const char * path, struct stat * stbuf)
{
}
static int lektor_getdir(const char * path, fuse_dirh_t h, fuse_dirfil_t filler)
{
}
static int lektor_read(const char * path, char * buf, size_t size, off_t offset)
{
}
static int lektor_open(const char *path, int flags)
{
}
static void * lektor_deinit(void)
{
}
static struct fuse_operations lektor_oper =
{
.getattr = lektor_getattr,
.getdir = lektor_getdir,
.open = lektor_open,
.read = lektor_read,
// .mkdir =
// .unlink =
// .rmdir =
// .rename =
// .chmod =
};
int main(int argc, char *argv[])
{
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
lektor_init();
return fuse_main(args.argc, args.argv, &lektor_oper);
}
Chargement en cours