Commit Graph

5 Commits

Author SHA1 Message Date
Aleksander Morgado
e956bac47b log: common logging method definition for all testers and helpers 2020-04-08 17:53:42 +02:00
Aleksander Morgado
9bcadea172 log: new object logging support
So that we can provide the specific object id in every log associated
to a given object.
2020-04-08 16:35:08 +02:00
Aleksander Morgado
dce5dbeb9a test,mmrules: fix warnings with -Wswitch-default
mmrules.c: In function ‘print_rule’:
  mmrules.c:97:13: error: switch missing default case [-Werror=switch-default]
     97 |             switch (rule_match->type) {
        |             ^~~~~~
  mmrules.c:113:5: error: switch missing default case [-Werror=switch-default]
    113 |     switch (rule->result.type) {
        |     ^~~~~~
2020-01-31 15:18:35 +01:00
Ben Chan
31655bb5a5 glib: remove invocations of g_type_init()
g_type_init() has been deprecated (and also marked with the attribute
'deprecated') since glib 2.36 as the type system is automatically
initialized. Since the minimum version of glib required by ModemManager
is 2.36, calling g_type_init() isn't necessarily in the ModemManager
code.
2017-02-03 10:05:14 +01:00
Aleksander Morgado
58c955f5f2 core: allow building and running without udev
Instead of relying on the udev daemon and GUDev to manage the devices reported
by the kernel, we can now run ModemManager relying solely on the kernel events
reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan'
option is implicit for the ModemManager daemon when udev is disabled in the
build.

Additionally, a new custom implementation of the kernel device object is
provided, which uses sysfs to load the properties and attributes required in
each kernel device, instead of using a GUdevDevice.

The udev rule files are kept in place, and a simple custom parser is provided
which preloads all rules in memory once and then applies them to the different
kernel objects reported via ReportKernelEvent(), e.g. to set port type hints.
A simple unit test setup is prepared to validate the udev rules during the
`check' Makefile target.
2016-09-29 15:43:05 +02:00