From 3c06229414f084a1480a5dae1dbe65b7aaf26117 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 27 Feb 2011 16:26:56 +0100 Subject: uuidd: add "-q" to synopsis, order options alphabetically Signed-off-by: Benno Schulenberg --- misc-utils/uuidd.8 | 21 ++++++++++++--------- misc-utils/uuidd.c | 16 ++++++++-------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/misc-utils/uuidd.8 b/misc-utils/uuidd.8 index 758dd6609..ee283b05f 100644 --- a/misc-utils/uuidd.8 +++ b/misc-utils/uuidd.8 @@ -2,7 +2,7 @@ .\" Copyright 2007 by Theodore Ts'o. All Rights Reserved. .\" This file may be copied under the terms of the GNU Public License. .\" -.TH UUIDD 8 "May 2009" "Linux" +.TH UUIDD 8 "February 2011" "Linux" .SH NAME uuidd \- UUID generation daemon .SH SYNOPSIS @@ -10,6 +10,7 @@ uuidd \- UUID generation daemon .RB [ \-d ] .RB [ \-p .IR pidfile ] +.RB [ \-q ] .RB [ \-s .IR socketpath ] .RB [ \-T @@ -19,10 +20,12 @@ uuidd \- UUID generation daemon .RB [ \-r | \-t ] .RB [ \-n .IR number ] +.RB [ \-q ] .RB [ \-s .IR socketpath ] .br .B uuidd \-k +.RB [ \-q ] .SH DESCRIPTION The .B uuidd @@ -50,16 +53,19 @@ UUIDs. Specify the pathname where the pid file should be written. By default, the pid file is written to /var/run/uuidd/uuidd.pid. .TP +.B \-r +Test uuidd by trying to connect to a running uuidd daemon and +request it to return a random-based UUID. +.TP +.BI \-q +Suppress some failure messages. +.TP .BI \-s " socketpath" Specify the pathname used for the unix-domain socket used by uuidd. By default, the pathname used is /var/run/uuidd/request. This is primarily for debugging purposes, since the pathname is hard-coded in the libuuid library. .TP -.B \-r -Test uuidd by trying to connect to a running uuidd daemon and -request it to return a random-based UUID. -.TP .B \-t Test uuidd by trying to connect to a running uuidd daemon and request it to return a time-based UUID. @@ -68,13 +74,10 @@ request it to return a time-based UUID. Specify a timeout for uuidd. If specified, then uuidd will exit after .I timeout seconds of inactivity. -.TP -.BI \-q -Turn on quiet flag. .SH AUTHOR The .B uuidd -daemon was written by Theodore Ts'o . +daemon was written by Theodore Ts'o . .SH AVAILABILITY uuidd is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index a01cf568f..ea0539be3 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -50,11 +50,11 @@ extern int optind; static void usage(const char *progname) { - fprintf(stderr, _("Usage: %s [-d] [-p pidfile] [-s socketpath] " + fprintf(stderr, _("Usage: %s [-d] [-p pidfile] [-q] [-s socketpath] " "[-T timeout]\n"), progname); - fprintf(stderr, _(" %s [-r|t] [-n num] [-s socketpath]\n"), + fprintf(stderr, _(" %s [-r|t] [-n num] [-q] [-s socketpath]\n"), progname); - fprintf(stderr, _(" %s -k\n"), progname); + fprintf(stderr, _(" %s -k [-q]\n"), progname); exit(1); } @@ -426,7 +426,7 @@ int main(int argc, char **argv) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - while ((c = getopt (argc, argv, "dkn:qp:s:tT:r")) != EOF) { + while ((c = getopt (argc, argv, "dkn:p:qrs:tT:")) != EOF) { switch (c) { case 'd': debug++; @@ -449,6 +449,10 @@ int main(int argc, char **argv) case 'q': quiet++; break; + case 'r': + do_type = UUIDD_OP_RANDOM_UUID; + drop_privs = 1; + break; case 's': socket_path = optarg; drop_privs = 1; @@ -464,10 +468,6 @@ int main(int argc, char **argv) exit(1); } break; - case 'r': - do_type = UUIDD_OP_RANDOM_UUID; - drop_privs = 1; - break; default: usage(argv[0]); } -- cgit v1.2.3-55-g7522