diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-01-21 14:42:30 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-01-21 14:42:30 +0100 |
commit | 2c7b88c4a55426087955a12aad33c1935e639876 (patch) | |
tree | e9d5843ee200d1e092e1a33929da2171dc63d4f7 /udev/udevd.c | |
parent | c807ad918c7c61a8af3fcc930cc2a5ad4c978ea1 (diff) | |
parent | 5f03ed8a56d308af72db8a48ab66ed68667af2c6 (diff) |
Merge commit '5f03ed8a56d308af72db8a48ab66ed68667af2c6'
Conflicts:
udev/udevd.c
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index 9a278ce1f3..13a10240d7 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -645,12 +645,14 @@ int main(int argc, char *argv[]) struct sigaction act; const char *value; int daemonize = 0; + int resolve_names = 1; static const struct option options[] = { { "daemon", no_argument, NULL, 'd' }, { "debug-trace", no_argument, NULL, 't' }, { "debug", no_argument, NULL, 'D' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, + { "resolve-names", required_argument, NULL, 'N' }, {} }; int rc = 1; @@ -683,8 +685,19 @@ int main(int argc, char *argv[]) if (udev_get_log_priority(udev) < LOG_INFO) udev_set_log_priority(udev, LOG_INFO); break; + case 'N': + if (strcmp (optarg, "early") == 0) { + resolve_names = 1; + } 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"); + goto exit; + } + break; case 'h': - printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--version]\n"); + printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--debug] [--resolve-names=early|never] [--version]\n"); goto exit; case 'V': printf("%s\n", VERSION); @@ -736,7 +749,7 @@ int main(int argc, char *argv[]) } udev_monitor_set_receive_buffer_size(kernel_monitor, 128*1024*1024); - rules = udev_rules_new(udev, 1); + rules = udev_rules_new(udev, resolve_names); if (rules == NULL) { err(udev, "error reading rules\n"); goto exit; @@ -946,7 +959,7 @@ handle_signals: struct udev_rules *rules_new; reload_config = 0; - rules_new = udev_rules_new(udev, 1); + rules_new = udev_rules_new(udev, resolve_names); if (rules_new != NULL) { udev_rules_unref(rules); rules = rules_new; |