udevd \- event managing daemon
.SH "SYNOPSIS"
.HP 6
-\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-help\fR]
+\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
.HP 20
\fBudevcontrol \fR\fB\fIcommand\fR\fR
.SH "DESCRIPTION"
Print log messages to stdout.
.RE
.PP
+\fB\-\-version\fR
+.RS 4
+Print version number.
+.RE
+.PP
\fB\-\-help\fR
.RS 4
Print usage.
{ "debug-trace", 0, NULL, 't' },
{ "verbose", 0, NULL, 'v' },
{ "help", 0, NULL, 'h' },
+ { "version", 0, NULL, 'V' },
{}
};
int rc = 1;
/* parse commandline options */
while (1) {
- option = getopt_long(argc, argv, "dtvh", options, NULL);
+ option = getopt_long(argc, argv, "dtvhV", options, NULL);
if (option == -1)
break;
udev_log_priority = LOG_INFO;
break;
case 'h':
- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose]\n");
+ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n");
+ goto exit;
+ case 'V':
+ printf("%s\n", UDEV_VERSION);
goto exit;
default:
goto exit;
<arg><option>--daemon</option></arg>
<arg><option>--debug-trace</option></arg>
<arg><option>--verbose</option></arg>
+ <arg><option>--version</option></arg>
<arg><option>--help</option></arg>
</cmdsynopsis>
<cmdsynopsis>
<para>Print log messages to stdout.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Print version number.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><option>--help</option></term>
<listitem>