1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

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.
This commit is contained in:
Scott James Remnant 2009-01-20 21:36:09 +00:00 committed by Scott James Remnant
parent 5f03ed8a56
commit 9032f119f0
3 changed files with 10 additions and 6 deletions

3
NEWS
View File

@ -6,7 +6,8 @@ The udevadm test command has no longer a --force option, nodes and symlinks
are always updated with a test run now. are always updated with a test run now.
The udevd daemon can be started with --resolve-names=never to avoid all user The udevd daemon can be started with --resolve-names=never to avoid all user
and group lookups (e.g. in cut-down systems). and group lookups (e.g. in cut-down systems) or --resolve-names=late to
lookup user and groups every time events are handled.
udev 136 udev 136
======== ========

View File

@ -683,16 +683,18 @@ int main(int argc, char *argv[])
case 'N': case 'N':
if (strcmp (optarg, "early") == 0) { if (strcmp (optarg, "early") == 0) {
resolve_names = 1; resolve_names = 1;
} else if (strcmp (optarg, "late") == 0) {
resolve_names = 0;
} else if (strcmp (optarg, "never") == 0) { } else if (strcmp (optarg, "never") == 0) {
resolve_names = -1; resolve_names = -1;
} else { } else {
fprintf(stderr, "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 or never\n"); err(udev, "resolve-names must be early, late or never\n");
goto exit; goto exit;
} }
break; break;
case 'h': 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; goto exit;
case 'V': case 'V':
printf("%s\n", VERSION); printf("%s\n", VERSION);

View File

@ -29,7 +29,7 @@
<arg><option>--debug-trace</option></arg> <arg><option>--debug-trace</option></arg>
<arg><option>--debug</option></arg> <arg><option>--debug</option></arg>
<arg><option>--version</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> <arg><option>--help</option></arg>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
@ -70,7 +70,8 @@
<listitem> <listitem>
<para>Specify when udevd should resolve names of users and groups. <para>Specify when udevd should resolve names of users and groups.
When set to <option>early</option> (the default) names will be 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 When set to <option>never</option> names will never be resolved
and all devices will be owned by root.</para> and all devices will be owned by root.</para>
</listitem> </listitem>