mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-12 21:51:56 +00:00
Do not use udev tags
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
This commit is contained in:
parent
16d90afcd2
commit
4d9cd01606
1 changed files with 10 additions and 0 deletions
|
@ -39,6 +39,8 @@
|
|||
#include "util.h"
|
||||
#include "wifid.h"
|
||||
|
||||
#define DO_NOT_RELY_UDEV 1
|
||||
|
||||
const char *arg_wpa_bindir = "/usr/bin";
|
||||
unsigned int arg_wpa_loglevel = LOG_NOTICE;
|
||||
|
||||
|
@ -97,8 +99,12 @@ static void manager_add_udev_link(struct manager *m,
|
|||
|
||||
link_set_friendly_name(l, m->friendly_name);
|
||||
|
||||
#if DO_NOT_RELY_UDEV
|
||||
link_set_managed(l, true);
|
||||
#else
|
||||
if (udev_device_has_tag(d, "miracle"))
|
||||
link_set_managed(l, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int manager_udev_fn(sd_event_source *source,
|
||||
|
@ -133,10 +139,14 @@ static int manager_udev_fn(sd_event_source *source,
|
|||
link_renamed(l, ifname);
|
||||
}
|
||||
|
||||
#if DO_NOT_RELY_UDEV
|
||||
link_set_managed(l, true);
|
||||
#else
|
||||
if (udev_device_has_tag(d, "miracle"))
|
||||
link_set_managed(l, true);
|
||||
else
|
||||
link_set_managed(l, false);
|
||||
#endif
|
||||
} else {
|
||||
manager_add_udev_link(m, d);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue