summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd/clvmd.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2010-12-20 13:48:28 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2010-12-20 13:48:28 +0000
commita91a9dfaf8b554b7606c60bcd5355e5d3f30e970 (patch)
tree236d4d277de90129949d08349f8fbc46aa31d720 /daemons/clvmd/clvmd.c
parent9376ec18cd7bccdac29069893153648f67b8d1cd (diff)
downloadlvm2-a91a9dfaf8b554b7606c60bcd5355e5d3f30e970.tar.gz
lvm2-a91a9dfaf8b554b7606c60bcd5355e5d3f30e970.tar.xz
lvm2-a91a9dfaf8b554b7606c60bcd5355e5d3f30e970.zip
Replace multiple fprintf calls with one large string parameter
Diffstat (limited to 'daemons/clvmd/clvmd.c')
-rw-r--r--daemons/clvmd/clvmd.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 45e24866..1a35c495 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -143,38 +143,37 @@ static void add_reply_to_list(struct local_client *client, int status,
static if_type_t parse_cluster_interface(char *ifname);
static if_type_t get_cluster_type(void);
-static void usage(char *prog, FILE *file)
+static void usage(const char *prog, FILE *file)
{
- fprintf(file, "Usage:\n");
- fprintf(file, "%s [Vhd]\n", prog);
- fprintf(file, "\n");
- fprintf(file, " -V Show version of clvmd\n");
- fprintf(file, " -h Show this help information\n");
- fprintf(file, " -d Set debug level\n");
- fprintf(file, " If starting clvmd then don't fork, run in the foreground\n");
- fprintf(file, " -R Tell all running clvmds in the cluster to reload their device cache\n");
- fprintf(file, " -S Restart clvmd, preserving exclusive locks\n");
- fprintf(file, " -C Sets debug level (from -d) on all clvmd instances clusterwide\n");
- fprintf(file, " -t<secs> Command timeout (default 60 seconds)\n");
- fprintf(file, " -T<secs> Startup timeout (default none)\n");
- fprintf(file, " -I<cmgr> Cluster manager (default: auto)\n");
- fprintf(file, " Available cluster managers: ");
+ fprintf(file, "Usage:\n"
+ "%s [Vhd]\n\n"
+ " -V Show version of clvmd\n"
+ " -h Show this help information\n"
+ " -d Set debug level\n"
+ " If starting clvmd then don't fork, run in the foreground\n"
+ " -R Tell all running clvmds in the cluster to reload their device cache\n"
+ " -S Restart clvmd, preserving exclusive locks\n"
+ " -C Sets debug level (from -d) on all clvmd instances clusterwide\n"
+ " -t<secs> Command timeout (default 60 seconds)\n"
+ " -T<secs> Startup timeout (default none)\n"
+ " -I<cmgr> Cluster manager (default: auto)\n"
+ " Available cluster managers: "
#ifdef USE_COROSYNC
- fprintf(file, "corosync ");
+ "corosync "
#endif
#ifdef USE_CMAN
- fprintf(file, "cman ");
+ "cman "
#endif
#ifdef USE_OPENAIS
- fprintf(file, "openais ");
+ "openais "
#endif
#ifdef USE_GULM
- fprintf(file, "gulm ");
+ "gulm "
#endif
#ifdef USE_SINGLENODE
- fprintf(file, "singlenode");
+ "singlenode "
#endif
- fprintf(file, "\n");
+ "\n", prog);
}
/* Called to signal the parent how well we got on during initialisation */