* [PATCH] Add option --version to udevd
@ 2007-02-22 16:18 Matthias Schwarzott
2007-02-24 23:00 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Schwarzott @ 2007-02-22 16:18 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
Hi!
This small patch adds the option --version to udevd to just print out
UDEV_VERSION.
Sometimes the udev-startskript needs to know the udev-version (or needed in
the past) and udevd at least is garanteed to exit even if /usr is not yet
mounted.
Some versions ago the executable udev had that option, but as that was removed
possibilities are either to add --version to some other executable, or to
hardcode udev-version into udev-startskript at every upgrade.
Greetings
Matthias
--
Matthias Schwarzott (zzam)
[-- Attachment #2: udevd-print-version.patch --]
[-- Type: text/x-diff, Size: 981 bytes --]
diff --git a/udevd.c b/udevd.c
index 8c550d3..23f5fd6 100644
--- a/udevd.c
+++ b/udevd.c
@@ -943,6 +943,7 @@ int main(int argc, char *argv[], char *envp[])
{ "debug-trace", 0, NULL, 't' },
{ "verbose", 0, NULL, 'v' },
{ "help", 0, NULL, 'h' },
+ { "version", 0, NULL, 'V' },
{}
};
int rc = 1;
@@ -955,7 +956,7 @@ int main(int argc, char *argv[], char *envp[])
/* 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;
@@ -972,7 +973,10 @@ int main(int argc, char *argv[], char *envp[])
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;
[-- Attachment #3: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 226 bytes --]
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add option --version to udevd
2007-02-22 16:18 [PATCH] Add option --version to udevd Matthias Schwarzott
@ 2007-02-24 23:00 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2007-02-24 23:00 UTC (permalink / raw)
To: linux-hotplug
On 2/22/07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> This small patch adds the option --version to udevd to just print out
> UDEV_VERSION.
> Sometimes the udev-startskript needs to know the udev-version (or needed in
> the past) and udevd at least is garanteed to exit even if /usr is not yet
> mounted.
>
> Some versions ago the executable udev had that option, but as that was removed
> possibilities are either to add --version to some other executable, or to
> hardcode udev-version into udev-startskript at every upgrade.
Applied.
Thanks,
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-24 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 16:18 [PATCH] Add option --version to udevd Matthias Schwarzott
2007-02-24 23:00 ` Kay Sievers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.