diff options
author | Galen Getsov <4815620+ggetsov@users.noreply.github.com> | 2019-06-30 12:10:41 +0300 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2019-06-30 10:10:41 +0100 |
commit | 469c96b6d2fe90f1adbe4b79a71c2918c0ff3622 (patch) | |
tree | 5caf9edd4ade4b4aa47d94d2ba2cbe824322e8a5 | |
parent | c4485188c95839ac868490a22c87be78e3ace80d (diff) | |
download | sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar.gz sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.tar.bz2 sshfs-469c96b6d2fe90f1adbe4b79a71c2918c0ff3622.zip |
Add --verbose option
-rw-r--r-- | sshfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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" |