From d3b89e328d0cf0434fd6567a2ef11d820f7d94e7 Mon Sep 17 00:00:00 2001 From: ksherlock Date: Sun, 13 Dec 2009 23:08:58 +0000 Subject: [PATCH] git-svn-id: https://profuse.googlecode.com/svn/branches/v2@165 aa027e90-d47c-11dd-86d7-074df07e0730 --- pascal/Makefile | 29 +++++++++++++++++++++++++++-- pascal/profuse_pascal.cpp | 22 ++-------------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/pascal/Makefile b/pascal/Makefile index 69952bd..219eb3d 100644 --- a/pascal/Makefile +++ b/pascal/Makefile @@ -1,5 +1,6 @@ CC = g++ CPPFLAGS += -Wall -O2 -g +LDFLAGS += -L/usr/local/lib -lfuse newfs_pascal: \ newfs_pascal.o \ @@ -11,7 +12,31 @@ newfs_pascal: \ ../DiskCopy42Image.o \ ../RawDevice.o \ ../MappedFile.o \ - ../Buffer.o \ - + ../Buffer.o + +fileman : \ + FileMan.o \ + Date.o \ + File.o \ + ../Exception.o \ + ../BlockDevice.o \ + ../BlockCache.o \ + ../DiskCopy42Image.o \ + ../RawDevice.o \ + ../MappedFile.o \ + ../Buffer.o + +profuse_pascal : \ + profuse_pascal.o \ + profuse_pascal_ops.o \ + Date.o \ + File.o \ + ../Exception.o \ + ../BlockDevice.o \ + ../BlockCache.o \ + ../DiskCopy42Image.o \ + ../RawDevice.o \ + ../MappedFile.o \ + ../Buffer.o \ No newline at end of file diff --git a/pascal/profuse_pascal.cpp b/pascal/profuse_pascal.cpp index ceb58db..44e3cea 100644 --- a/pascal/profuse_pascal.cpp +++ b/pascal/profuse_pascal.cpp @@ -153,6 +153,7 @@ bool make_mount_dir(std::string name, std::string &path) int main(int argc, char **argv) { + extern void init_ops(fuse_lowlevel_ops *ops); struct fuse_args args = FUSE_ARGS_INIT(argc, argv); @@ -164,26 +165,7 @@ int main(int argc, char **argv) int foreground = false; int multithread = false; - std::memset(&pascal_ops, 0, sizeof(pascal_ops)); - - - - // returns pascal.filekind, text encoding. - pascal_ops.listxattr = pascal_listxattr; - pascal_ops.getxattr = pascal_getxattr; - - // volume is a dir. - pascal_ops.opendir = pascal_opendir; - pascal_ops.releasedir = pascal_releasedir; - pascal_ops.readdir = pascal_readdir; - - - pascal_ops.lookup = pascal_lookup; - pascal_ops.getattr = pascal_getattr; - - pascal_ops.open = pascal_open; - pascal_ops.release = pascal_release; - pascal_ops.read = pascal_read; + init_ops(&pascal_ops); // scan the argument list, looking for the name of the disk image.