There is no way to ignore an event these days. Libudev events can
not be suppressed. It only prevents RUN keys from being executed,
which results in an inconsistent behavior in current setups.
+udev 148
+========
+Bugfixes.
+
+The option "ignore_device" does no longer exist. There is no way to
+ignore an event, as libudev events can not be suppressed by rules.
+It only prevented RUN keys from being executed, which results in an
+inconsistent behavior in current setups.
+
udev 147
========
Bugfixes.
udev 147
========
Bugfixes.
-AC_INIT([udev], [147], [linux-hotplug@vger.kernel.org])
+AC_INIT([udev], [148], [linux-hotplug@vger.kernel.org])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 dist-bzip2 subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
event->tmp_node = NULL;
}
event->tmp_node = NULL;
}
- if (event->ignore_device) {
- info(event->udev, "device event will be ignored\n");
- delete_kdevnode = 1;
- goto exit_add;
- }
-
if (event->name != NULL && event->name[0] == '\0') {
info(event->udev, "device node creation suppressed\n");
delete_kdevnode = 1;
if (event->name != NULL && event->name[0] == '\0') {
info(event->udev, "device node creation suppressed\n");
delete_kdevnode = 1;
udev_device_delete_db(dev);
udev_rules_apply_to_event(rules, event);
udev_device_delete_db(dev);
udev_rules_apply_to_event(rules, event);
- if (event->ignore_device) {
- info(event->udev, "device event will be ignored\n");
- goto exit;
- }
if (event->name == NULL)
goto exit;
if (event->name == NULL)
goto exit;
}
udev_rules_apply_to_event(rules, event);
}
udev_rules_apply_to_event(rules, event);
- if (event->ignore_device) {
- info(event->udev, "device event will be ignored\n");
- goto exit;
- }
if (udev_device_get_ignore_remove(dev)) {
info(event->udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev));
if (udev_device_get_ignore_remove(dev)) {
info(event->udev, "ignore_remove for '%s'\n", udev_device_get_devnode(dev));
/* default devices */
udev_rules_apply_to_event(rules, event);
/* default devices */
udev_rules_apply_to_event(rules, event);
- if (event->ignore_device)
- info(event->udev, "device event will be ignored\n");
if (strcmp(udev_device_get_action(dev), "remove") != 0)
udev_device_update_db(dev);
if (strcmp(udev_device_get_action(dev), "remove") != 0)
udev_device_update_db(dev);
TK_M_RESULT, /* val */
TK_M_MAX,
TK_M_RESULT, /* val */
TK_M_MAX,
TK_A_STRING_ESCAPE_NONE,
TK_A_STRING_ESCAPE_REPLACE,
TK_A_INOTIFY_WATCH, /* int */
TK_A_STRING_ESCAPE_NONE,
TK_A_STRING_ESCAPE_REPLACE,
TK_A_INOTIFY_WATCH, /* int */
[TK_M_RESULT] = "M RESULT",
[TK_M_MAX] = "M MAX",
[TK_M_RESULT] = "M RESULT",
[TK_M_MAX] = "M MAX",
- [TK_A_IGNORE_DEVICE] = "A IGNORE_DEVICE",
[TK_A_STRING_ESCAPE_NONE] = "A STRING_ESCAPE_NONE",
[TK_A_STRING_ESCAPE_REPLACE] = "A STRING_ESCAPE_REPLACE",
[TK_A_INOTIFY_WATCH] = "A INOTIFY_WATCH",
[TK_A_STRING_ESCAPE_NONE] = "A STRING_ESCAPE_NONE",
[TK_A_STRING_ESCAPE_REPLACE] = "A STRING_ESCAPE_REPLACE",
[TK_A_INOTIFY_WATCH] = "A INOTIFY_WATCH",
dbg(rules->udev, "%s %s '%s' '%s'(%s)\n",
token_str(type), operation_str(op), attr, value, string_glob_str(glob));
break;
dbg(rules->udev, "%s %s '%s' '%s'(%s)\n",
token_str(type), operation_str(op), attr, value, string_glob_str(glob));
break;
- case TK_A_IGNORE_DEVICE:
case TK_A_STRING_ESCAPE_NONE:
case TK_A_STRING_ESCAPE_REPLACE:
case TK_A_IGNORE_REMOVE:
case TK_A_STRING_ESCAPE_NONE:
case TK_A_STRING_ESCAPE_REPLACE:
case TK_A_IGNORE_REMOVE:
if (data != NULL)
token->key.mode = *(mode_t *)data;
break;
if (data != NULL)
token->key.mode = *(mode_t *)data;
break;
- case TK_A_IGNORE_DEVICE:
case TK_A_STRING_ESCAPE_NONE:
case TK_A_STRING_ESCAPE_REPLACE:
case TK_A_IGNORE_REMOVE:
case TK_A_STRING_ESCAPE_NONE:
case TK_A_STRING_ESCAPE_REPLACE:
case TK_A_IGNORE_REMOVE:
if (strcmp(key, "OPTIONS") == 0) {
const char *pos;
if (strcmp(key, "OPTIONS") == 0) {
const char *pos;
- if (strstr(value, "ignore_device") != NULL) {
- dbg(rules->udev, "device should be ignored\n");
- rule_add_key(&rule_tmp, TK_A_IGNORE_DEVICE, 0, NULL, NULL);
- }
if (strstr(value, "ignore_remove") != NULL) {
dbg(rules->udev, "remove event should be ignored\n");
rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL);
if (strstr(value, "ignore_remove") != NULL) {
dbg(rules->udev, "remove event should be ignored\n");
rule_add_key(&rule_tmp, TK_A_IGNORE_REMOVE, 0, NULL, NULL);
if (match_key(rules, cur, event->program_result) != 0)
goto nomatch;
break;
if (match_key(rules, cur, event->program_result) != 0)
goto nomatch;
break;
-
- case TK_A_IGNORE_DEVICE:
- event->ignore_device = 1;
- return 0;
- break;
case TK_A_STRING_ESCAPE_NONE:
esc = ESCAPE_NONE;
break;
case TK_A_STRING_ESCAPE_NONE:
esc = ESCAPE_NONE;
break;
unsigned int name_final:1;
unsigned int devlink_final:1;
unsigned int run_final:1;
unsigned int name_final:1;
unsigned int devlink_final:1;
unsigned int run_final:1;
- unsigned int ignore_device:1;
unsigned int inotify_watch:1;
};
unsigned int inotify_watch:1;
};
<listitem>
<para>Rule and device options:</para>
<variablelist>
<listitem>
<para>Rule and device options:</para>
<variablelist>
- <varlistentry>
- <term><option>ignore_device</option></term>
- <listitem>
- <para>Ignore this event completely.</para>
- </listitem>
- </varlistentry>
<varlistentry>
<term><option>ignore_remove</option></term>
<listitem>
<varlistentry>
<term><option>ignore_remove</option></term>
<listitem>
udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
info(udev, "%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
info(udev, "%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
- if (err == 0 && !event->ignore_device && udev_get_run(udev)) {
+ if (err == 0 && udev_get_run(udev)) {
udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) {
char program[UTIL_PATH_SIZE];
udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) {
char program[UTIL_PATH_SIZE];
alarm(udev_device_get_event_timeout(dev));
/* execute RUN= */
alarm(udev_device_get_event_timeout(dev));
/* execute RUN= */
- if (err == 0 && !udev_event->ignore_device && udev_get_run(udev_event->udev))
+ if (err == 0 && udev_get_run(udev_event->udev))
failed = udev_event_execute_run(udev_event,
&orig_sigmask);
failed = udev_event_execute_run(udev_event,
&orig_sigmask);