summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-01-20 21:36:09 +0000
committerScott James Remnant <scott@netsplit.com>2009-01-20 21:36:09 +0000
commit9032f119f07ad3b5116b3d4858816d851d4127de (patch)
tree1cd764903bfeb503edce81850be8f7cc961832ad /udev
parent5f03ed8a56d308af72db8a48ab66ed68667af2c6 (diff)
Expose delayed name resolution
udevd had the ability to delay name resolution until the event, but this was never exposed. Add a --resolve-names=late option to do so.
Diffstat (limited to 'udev')
-rw-r--r--udev/udevd.c8
-rw-r--r--udev/udevd.xml5
2 files changed, 8 insertions, 5 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 9a8d791800..4d6f465f96 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -683,16 +683,18 @@ int main(int argc, char *argv[])
case 'N':
if (strcmp (optarg, "early") == 0) {
resolve_names = 1;
+ } else if (strcmp (optarg, "late") == 0) {
+ resolve_names = 0;
} else if (strcmp (optarg, "never") == 0) {
resolve_names = -1;
} else {
- fprintf(stderr, "resolve-names must be early or never\n");
- err(udev, "resolve-names must be early or never\n");
+ fprintf(stderr, "resolve-names must be early, late or never\n");
+ err(udev, "resolve-names must be early, late or never\n");
goto exit;
}
break;
case 'h':
- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--resolve-names=early|never] [--version]\n");
+ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--resolve-names=early|late|never] [--version]\n");
goto exit;
case 'V':
printf("%s\n", VERSION);
diff --git a/udev/udevd.xml b/udev/udevd.xml
index 010411c781..0df6f4ba59 100644
--- a/udev/udevd.xml
+++ b/udev/udevd.xml
@@ -29,7 +29,7 @@
<arg><option>--debug-trace</option></arg>
<arg><option>--debug</option></arg>
<arg><option>--version</option></arg>
- <arg><option>--resolve-names=early|never</option></arg>
+ <arg><option>--resolve-names=early|late|never</option></arg>
<arg><option>--help</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -70,7 +70,8 @@
<listitem>
<para>Specify when udevd should resolve names of users and groups.
When set to <option>early</option> (the default) names will be
- resolved when the rules are parsed.
+ resolved when the rules are parsed. When set to
+ <option>late</option> names will be resolved for every event.
When set to <option>never</option> names will never be resolved
and all devices will be owned by root.</para>
</listitem>