Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit of toiletfs

mostly a skeleton at this point
  • Loading branch information...
commit 4509bb72c91a6160b170a54bf87d5c6fb9664577 0 parents
@scottjg authored
Showing with 68 additions and 0 deletions.
  1. +18 −0 Makefile
  2. +50 −0 toiletfs.c
18 Makefile
@@ -0,0 +1,18 @@
+PROGRAM=toiletfsd
+SOURCES := $(wildcard *.c)
+CFLAGS=-Wall `pkg-config fuse --cflags`
+LDFLAGS=`pkg-config fuse --libs`
+
+.SUFFIXES:
+.PHONY: all clean
+all: $(PROGRAM)
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+$(PROGRAM): $(SOURCES:.c=.o)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+clean:
+ $(RM) $(SOURCES:.c=.o) $(PROGRAM)
+
50 toiletfs.c
@@ -0,0 +1,50 @@
+/*
+ toiletfs: the one-at-a-time filesystem.
+ Copyright (C) 2012 Scott J. Goldman <scottjg@github.com>
+
+ This program can be distributed under the terms of the MIT License.
+ See the file COPYING.
+*/
+
+#define FUSE_USE_VERSION 26
+
+#include <fuse.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+
+
+static int toilet_getattr(const char *path, struct stat *stbuf)
+{
+ return 0;
+}
+
+static int toilet_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
+ off_t offset, struct fuse_file_info *fi)
+{
+ return 0;
+}
+
+static int toilet_open(const char *path, struct fuse_file_info *fi)
+{
+ return 0;
+}
+
+static int toilet_read(const char *path, char *buf, size_t size, off_t offset,
+ struct fuse_file_info *fi)
+{
+ return 0;
+}
+
+static struct fuse_operations toilet_oper = {
+ .getattr = toilet_getattr,
+ .readdir = toilet_readdir,
+ .open = toilet_open,
+ .read = toilet_read,
+};
+
+int main(int argc, char *argv[])
+{
+ return fuse_main(argc, argv, &toilet_oper, NULL);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.