Skip to content

Commit

Permalink
* Print usage information and version to stdout, not stderr.
Browse files Browse the repository at this point in the history
Libfuse also needs to be fixed up.  Reported by Kārlis Repsons
  • Loading branch information
szmi committed Feb 12, 2009
1 parent 09e37d5 commit b1fa040
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2009-01-27 Miklos Szeredi <miklos@szeredi.hu>

* 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 <miklos@szeredi.hu>

* Released 2.2
Expand Down
2 changes: 1 addition & 1 deletion sshfs.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions sshfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b1fa040

Please sign in to comment.