From 03381402b2bb74731388271aa892d94afd0b01e2 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 27 Mar 2008 16:18:09 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 9 +++++++++ configure.ac | 4 ++-- sshfs.c | 11 ++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb172db3..d0d2b7bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-03 Miklos Szeredi + + * Fix ssh debug only appearing if "-d" is used. Reported by + Michael Gorbach + +2008-01-03 Miklos Szeredi + + * Fix condition for building of sshnodelay.so + 2007-12-17 Miklos Szeredi * Released 1.9 diff --git a/configure.ac b/configure.ac index 1e5f27d8..a9a9fd5d 100644 --- a/configure.ac +++ b/configure.ac @@ -30,11 +30,11 @@ if test -z "$enable_sshnodelay"; then fi fi -if test "$enable_sshnodelay" != "no"; then +if test "$enable_sshnodelay" = "yes"; then AC_DEFINE(SSH_NODELAY_WORKAROUND, 1, [Compile ssh NODELAY workaround]) fi -AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" != "no") +AM_CONDITIONAL(SSH_NODELAY_SO, test "$enable_sshnodelay" = "yes") export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH PKG_CHECK_MODULES(SSHFS, [fuse >= 2.2 glib-2.0 gthread-2.0]) diff --git a/sshfs.c b/sshfs.c index d2c7605a..b70e34f2 100644 --- a/sshfs.c +++ b/sshfs.c @@ -171,6 +171,7 @@ struct sshfs { int sync_write; int sync_read; int debug; + int foreground; int reconnect; char *host; char *base_path; @@ -243,6 +244,7 @@ enum { KEY_COMPRESS, KEY_HELP, KEY_VERSION, + KEY_FOREGROUND, }; #define SSHFS_OPT(t, p, v) { t, offsetof(struct sshfs, p), v } @@ -271,6 +273,9 @@ static struct fuse_opt sshfs_opts[] = { FUSE_OPT_KEY("--version", KEY_VERSION), FUSE_OPT_KEY("-h", KEY_HELP), FUSE_OPT_KEY("--help", KEY_HELP), + FUSE_OPT_KEY("debug", KEY_FOREGROUND), + FUSE_OPT_KEY("-d", KEY_FOREGROUND), + FUSE_OPT_KEY("-f", KEY_FOREGROUND), FUSE_OPT_END }; @@ -735,7 +740,7 @@ static int start_ssh(void) perror("failed to redirect input/output"); _exit(1); } - if (!sshfs.debug && devnull != -1) + if (!sshfs.foreground && devnull != -1) dup2(devnull, 2); close(devnull); @@ -2590,6 +2595,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, #endif exit(0); + case KEY_FOREGROUND: + sshfs.foreground = 1; + return 1; + default: fprintf(stderr, "internal error\n"); abort();