+2013-07-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Print help on stdout instead of stderr
+
2013-07-25 Miklos Szeredi <miklos@szeredi.hu>
* libfuse: fuse -> fuse3. Allow 2.X and 3.X to coexist. Includes
static void fuse_lib_help(void)
{
- fprintf(stderr,
+ printf(
" -o hard_remove immediate removal (don't hide files)\n"
" -o use_ino let filesystem set inode numbers\n"
" -o readdir_ino try to fill in d_ino in readdir\n"
static void fuse_lib_help_modules(void)
{
struct fuse_module *m;
- fprintf(stderr, "\nModule options:\n");
+ printf("\nModule options:\n");
pthread_mutex_lock(&fuse_context_lock);
for (m = fuse_modules; m; m = m->next) {
struct fuse_fs *fs = NULL;
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
if (fuse_opt_add_arg(&args, "") != -1 &&
fuse_opt_add_arg(&args, "-h") != -1) {
- fprintf(stderr, "\n[%s]\n", m->name);
+ printf("\n[%s]\n", m->name);
newfs = m->factory(&args, &fs);
assert(newfs == NULL);
}
static void fuse_ll_version(void)
{
- fprintf(stderr, "using FUSE kernel interface version %i.%i\n",
- FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
+ printf("using FUSE kernel interface version %i.%i\n",
+ FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
}
static void fuse_ll_help(void)
{
- fprintf(stderr,
+ printf(
" -o max_write=N set maximum size of write requests\n"
" -o max_readahead=N set maximum readahead\n"
" -o max_background=N set number of maximum background requests\n"
static void usage(const char *progname)
{
- fprintf(stderr,
- "usage: %s mountpoint [options]\n\n", progname);
- fprintf(stderr,
- "general options:\n"
- " -o opt,[opt...] mount options\n"
- " -h --help print help\n"
- " -V --version print version\n"
- "\n");
+ printf("usage: %s mountpoint [options]\n\n", progname);
+ printf("general options:\n"
+ " -o opt,[opt...] mount options\n"
+ " -h --help print help\n"
+ " -V --version print version\n"
+ "\n");
}
static void helper_help(void)
{
- fprintf(stderr,
- "FUSE options:\n"
- " -d -o debug enable debug output (implies -f)\n"
- " -f foreground operation\n"
- " -s disable multi-threaded operation\n"
- "\n"
- );
+ printf("FUSE options:\n"
+ " -d -o debug enable debug output (implies -f)\n"
+ " -f foreground operation\n"
+ " -s disable multi-threaded operation\n"
+ "\n");
}
static void helper_version(void)
{
- fprintf(stderr, "FUSE library version: %s\n", PACKAGE_VERSION);
+ printf("FUSE library version: %s\n", PACKAGE_VERSION);
}
static int fuse_helper_opt_proc(void *data, const char *arg, int key,
char *charmap = strdup(nl_langinfo(CODESET));
setlocale(LC_CTYPE, old);
free(old);
- fprintf(stderr,
+ printf(
" -o from_code=CHARSET original encoding of file names (default: UTF-8)\n"
" -o to_code=CHARSET new encoding of the file names (default: %s)\n",
charmap);
static void subdir_help(void)
{
- fprintf(stderr,
+ printf(
" -o subdir=DIR prepend this directory to all paths (mandatory)\n"
" -o [no]rellinks transform absolute symlinks to relative\n");
}
static void mount_help(void)
{
- fprintf(stderr,
+ printf(
" -o allow_other allow access to other users\n"
" -o allow_root allow access to root\n"
" -o auto_unmount auto unmount on process termination\n"
static void mount_help(void)
{
- fprintf(stderr,
- " -o allow_root allow access to root\n"
- );
+ printf(" -o allow_root allow access to root\n");
system(FUSERMOUNT_PROG " --help");
fputc('\n', stderr);
}
static void usage(void)
{
- fprintf(stderr,
- "%s: [options] mountpoint\n"
- "Options:\n"
- " -h print help\n"
- " -V print version\n"
- " -o opt[,opt...] mount options\n"
- " -u unmount\n"
- " -q quiet\n"
- " -z lazy unmount\n",
- progname);
+ printf("%s: [options] mountpoint\n"
+ "Options:\n"
+ " -h print help\n"
+ " -V print version\n"
+ " -o opt[,opt...] mount options\n"
+ " -u unmount\n"
+ " -q quiet\n"
+ " -z lazy unmount\n",
+ progname);
exit(1);
}