From b1fa0408fb5810e5024f3e657706111a2054f8b5 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 12 Feb 2009 07:11:33 +0000 Subject: =?UTF-8?q?*=20Print=20usage=20information=20and=20version=20to=20?= =?UTF-8?q?stdout,=20not=20stderr.=20Libfuse=20also=20needs=20to=20be=20fi?= =?UTF-8?q?xed=20up.=20=20Reported=20by=20K=C4=81rlis=20Repsons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 5 +++++ sshfs.1 | 2 +- sshfs.c | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b586e3b..5e040d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-27 Miklos Szeredi + + * Print usage information and version to stdout, not stderr. + Libfuse also needs to be fixed up. Reported by Kārlis Repsons + 2008-10-20 Miklos Szeredi * Released 2.2 diff --git a/sshfs.1 b/sshfs.1 index 5a0ea54..1035bba 100644 --- a/sshfs.1 +++ b/sshfs.1 @@ -55,7 +55,7 @@ synchronous reads (no speculative readahead) \fB\-o\fR sshfs_debug print some debugging information .TP -\fB\-o\fR cache=YESNO +\fB\-o\fR cache=BOOL enable caching {yes,no} (default: yes) .TP \fB\-o\fR cache_timeout=N diff --git a/sshfs.c b/sshfs.c index 07c3cf9..85d3967 100644 --- a/sshfs.c +++ b/sshfs.c @@ -2827,7 +2827,7 @@ static struct fuse_cache_operations sshfs_oper = { static void usage(const char *progname) { - fprintf(stderr, + printf( "usage: %s [user@]host:[dir] mountpoint [options]\n" "\n" "general options:\n" @@ -2844,7 +2844,7 @@ static void usage(const char *progname) " -o sshfs_sync synchronous writes\n" " -o no_readahead synchronous reads (no speculative readahead)\n" " -o sshfs_debug print some debugging information\n" -" -o cache=YESNO enable caching {yes,no} (default: yes)\n" +" -o cache=BOOL enable caching {yes,no} (default: yes)\n" " -o cache_timeout=N sets timeout for caches in seconds (default: 20)\n" " -o cache_X_timeout=N sets timeout for {stat,dir,link} cache\n" " -o workaround=LIST colon separated list of workarounds\n" @@ -2942,7 +2942,7 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, exit(1); case KEY_VERSION: - fprintf(stderr, "SSHFS version %s\n", PACKAGE_VERSION); + printf("SSHFS version %s\n", PACKAGE_VERSION); #if FUSE_VERSION >= 25 fuse_opt_add_arg(outargs, "--version"); sshfs_fuse_main(outargs); -- cgit v1.2.3