From 6f3b9bfdd1c52b0e244e5041e27d208aabac83f3 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sat, 4 Dec 2004 12:29:44 +0000 Subject: automakeify --- .cvsignore | 15 +++++++++++++++ AUTHORS | 0 ChangeLog | 0 Makefile | 17 ----------------- Makefile.am | 4 ++++ NEWS | 0 README | 0 configure.ac | 12 ++++++++++++ sshfs.c | 4 +++- 9 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 .cvsignore create mode 100644 AUTHORS create mode 100644 ChangeLog delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 configure.ac diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..c96a74b --- /dev/null +++ b/.cvsignore @@ -0,0 +1,15 @@ +.deps +COPYING +INSTALL +Makefile +Makefile.in +aclocal.m4 +*.cache +config.* +configure +depcomp +install-sh +missing +sshfs +stamp* +.deps diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile deleted file mode 100644 index 4741e6a..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -CC = gcc - -CFLAGS := -Wall -W -g -LDLIBS := -lpthread -ldl -rdynamic - -PKGCONFIG := env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config -CFLAGS += $(shell $(PKGCONFIG) --cflags fuse) -LDLIBS += $(shell $(PKGCONFIG) --libs fuse) -CFLAGS += $(shell $(PKGCONFIG) --cflags glib-2.0) -LDLIBS += $(shell $(PKGCONFIG) --libs glib-2.0) - -CPPFLAGS := -D_FILE_OFFSET_BITS=64 -D_REENTRANT - -sshfs: sshfs.o - -clean: - rm -f *.o sshfs diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e8c3665 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,4 @@ +## Process this file with automake to produce Makefile.in + +bin_PROGRAMS = sshfs +sshfs_SOURCES = sshfs.c diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..bc70802 --- /dev/null +++ b/configure.ac @@ -0,0 +1,12 @@ +AC_INIT(sshfs-fuse, 0.9) +AM_INIT_AUTOMAKE +AM_CONFIG_HEADER(config.h) + +AC_PROG_CC +export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0]) +CFLAGS="-Wall -W -g -D_REENTRANT $SSHFS_CFLAGS" +LIBS="$SSHFS_LIBS" + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/sshfs.c b/sshfs.c index 4338e91..fce536c 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1,3 +1,4 @@ +#define FUSE_USE_VERSION 22 #include #include #include @@ -1092,7 +1093,6 @@ static int sshfs_write(const char *path, const char *wbuf, size_t size, struct buffer buf; struct buffer data; struct buffer *handle = (struct buffer *) fi->fh; - (void) path; data.p = (uint8_t *) wbuf; data.len = size; buf_init(&buf, 0); @@ -1100,6 +1100,8 @@ static int sshfs_write(const char *path, const char *wbuf, size_t size, buf_add_uint64(&buf, offset); buf_add_data(&buf, &data); err = sftp_request(SSH_FXP_WRITE, &buf, SSH_FXP_STATUS, NULL); + if (!err) + cache_invalidate(path); buf_free(&buf); return err ? err : (int) size; } -- cgit v1.2.3