From c3fb7d7fbdc2d9cb2e9e818ac8fce52442583921 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 26 Aug 2016 09:33:09 +0200 Subject: [PATCH 17/24] don't use argv[0] in usage output otherwise this generates "funny" manpages like /home/remote/egolov/Devel/lxcfs/.libs/lt-lxcfs [-p pidfile] mountpoint /home/remote/egolov/Devel/lxcfs/.libs/lt-lxcfs -h or /build/lxcfs-8lNGve/lxcfs-2.0/.1/.libs/lt-lxcfs [-p pidfile] mountpoint /build/lxcfs-8lNGve/lxcfs-2.0/.1/.libs/lt-lxcfs -h Signed-off-by: Evgeni Golov --- lxcfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lxcfs.c b/lxcfs.c index 47afe13..e745ce5 100644 --- a/lxcfs.c +++ b/lxcfs.c @@ -708,13 +708,13 @@ const struct fuse_operations lxcfs_ops = { .fgetattr = NULL, }; -static void usage(const char *me) +static void usage() { fprintf(stderr, "Usage:\n"); fprintf(stderr, "\n"); - fprintf(stderr, "%s [-p pidfile] mountpoint\n", me); + fprintf(stderr, "lxcfs [-p pidfile] mountpoint\n"); fprintf(stderr, " Default pidfile is %s/lxcfs.pid\n", RUNTIME_PATH); - fprintf(stderr, "%s -h\n", me); + fprintf(stderr, "lxcfs -h\n"); exit(1); } @@ -838,7 +838,7 @@ int main(int argc, char *argv[]) exit(EXIT_SUCCESS); } if (argc != 2 || is_help(argv[1])) - usage(argv[0]); + usage(); do_reload(); if (signal(SIGUSR1, reload_handler) == SIG_ERR) { -- 2.9.3