Skip to content

Commit

Permalink
automakeify
Browse files Browse the repository at this point in the history
  • Loading branch information
szmi committed Dec 4, 2004
1 parent c737619 commit 6f3b9bf
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 18 deletions.
15 changes: 15 additions & 0 deletions .cvsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.deps
COPYING
INSTALL
Makefile
Makefile.in
aclocal.m4
*.cache
config.*
configure
depcomp
install-sh
missing
sshfs
stamp*
.deps
Empty file added AUTHORS
Empty file.
Empty file added ChangeLog
Empty file.
17 changes: 0 additions & 17 deletions Makefile

This file was deleted.

4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Process this file with automake to produce Makefile.in

bin_PROGRAMS = sshfs
sshfs_SOURCES = sshfs.c
Empty file added NEWS
Empty file.
Empty file added README
Empty file.
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion sshfs.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define FUSE_USE_VERSION 22
#include <fuse.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -1092,14 +1093,15 @@ 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);
buf_add_buf(&buf, handle);
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;
}
Expand Down

0 comments on commit 6f3b9bf

Please sign in to comment.