aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorGalen Getsov <4815620+ggetsov@users.noreply.github.com>2019-06-30 12:10:41 +0300
committerNikolaus Rath <Nikolaus@rath.org>2019-06-30 10:10:41 +0100
commit469c96b6d2fe90f1adbe4b79a71c2918c0ff3622 (patch)
tree5caf9edd4ade4b4aa47d94d2ba2cbe824322e8a5 /sshfs.c
parentc4485188c95839ac868490a22c87be78e3ace80d (diff)
downloadsshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar
sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar.gz
sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar.bz2
sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.zip
Add --verbose option
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sshfs.c b/sshfs.c
index 06a1ef3..9175a2c 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -245,6 +245,7 @@ struct sshfs {
int sync_read;
int sync_readdir;
int debug;
+ int verbose;
int foreground;
int reconnect;
int delay_connect;
@@ -398,6 +399,7 @@ static struct fuse_opt sshfs_opts[] = {
SSHFS_OPT("no_readahead", sync_read, 1),
SSHFS_OPT("sync_readdir", sync_readdir, 1),
SSHFS_OPT("sshfs_debug", debug, 1),
+ SSHFS_OPT("sshfs_verbose", verbose, 1),
SSHFS_OPT("reconnect", reconnect, 1),
SSHFS_OPT("transform_symlinks", transform_symlinks, 1),
SSHFS_OPT("follow_symlinks", follow_symlinks, 1),
@@ -415,6 +417,8 @@ static struct fuse_opt sshfs_opts[] = {
SSHFS_OPT("--version", show_version, 1),
SSHFS_OPT("-d", debug, 1),
SSHFS_OPT("debug", debug, 1),
+ SSHFS_OPT("-v", verbose, 1),
+ SSHFS_OPT("verbose", verbose, 1),
SSHFS_OPT("-f", foreground, 1),
SSHFS_OPT("-s", singlethread, 1),
@@ -1037,7 +1041,7 @@ static int start_ssh(void)
perror("failed to redirect input/output");
_exit(1);
}
- if (!sshfs.foreground && devnull != -1)
+ if (!sshfs.verbose && !sshfs.foreground && devnull != -1)
dup2(devnull, 2);
close(devnull);
@@ -3357,6 +3361,7 @@ static void usage(const char *progname)
" -o no_readahead synchronous reads (no speculative readahead)\n"
" -o sync_readdir synchronous readdir\n"
" -d, --debug print some debugging information (implies -f)\n"
+" -v, --verbose print ssh replies and messages\n"
" -o dir_cache=BOOL enable caching of directory contents (names,\n"
" attributes, symlink targets) {yes,no} (default: yes)\n"
" -o dcache_max_size=N sets the maximum size of the directory cache (default: 10000)\n"