summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cherry2018-08-01 15:12:20 -0500
committerTom Cherry2018-08-01 15:29:05 -0500
commit457e28f1292bbc1687038dfd15f4779ce3d8fd9e (patch)
treee1c4f3ab62e13ca49f9ee165849f6778146256fb /init/uevent_handler.h
parent081b710b2ee7f726f1bef282333c397006b6b37f (diff)
downloadplatform-system-core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.gz
platform-system-core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.tar.xz
platform-system-core-457e28f1292bbc1687038dfd15f4779ce3d8fd9e.zip
ueventd: require opt-in for modalias handling
Some devices have modules.alias and modules.dep for modprobe and other purposes but do not want to opt into ueventd auto loading their modules. Therefore we add a flag that can be added to ueventd configuration files to opt into this behavior. Bug: 111916071 Bug: 112048758 Test: check that modules are loaded with this opt-in Test: check that modules are not loaded without this opt-in Change-Id: Ifb281b273059b4671eea1ca5bc726c9e79f3adfb
Diffstat (limited to 'init/uevent_handler.h')
-rw-r--r--init/uevent_handler.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/init/uevent_handler.h b/init/uevent_handler.h
new file mode 100644
index 000000000..75d19902e
--- /dev/null
+++ b/init/uevent_handler.h
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "uevent.h"
20
21namespace android {
22namespace init {
23
24class UeventHandler {
25 public:
26 virtual ~UeventHandler() = default;
27
28 virtual void HandleUevent(const Uevent& uevent) = 0;
29
30 virtual void ColdbootDone() {}
31};
32
33} // namespace init
34} // namespace android