Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
szmi committed Mar 27, 2008
1 parent e83b2e6 commit 0338140
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2008-03-03 Miklos Szeredi <miklos@szeredi.hu>

* Fix ssh debug only appearing if "-d" is used. Reported by
Michael Gorbach

2008-01-03 Miklos Szeredi <miklos@szeredi.hu>

* Fix condition for building of sshnodelay.so

2007-12-17 Miklos Szeredi <miklos@szeredi.hu>

* Released 1.9
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
11 changes: 10 additions & 1 deletion sshfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ struct sshfs {
int sync_write;
int sync_read;
int debug;
int foreground;
int reconnect;
char *host;
char *base_path;
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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
};

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0338140

Please sign in to comment.