init: Support for initializing virtio-console devices
This change allows init to ensure that a specified virtio-console device file (`/dev/hvc*`) is available before `ueventd` coldboot. Times out if device path is not encountered within 10 seconds. Bug: 325538592 Test: build bertha_x86_64 and bertha_arm64 Change-Id: Ia1512e69ea607bf4d235595caa53668e2dac500c
This commit is contained in:
parent
60d8d17fbc
commit
0fb39f6e69
2 changed files with 5 additions and 0 deletions
|
|
@ -139,6 +139,10 @@ bool BlockDevInitializer::InitPlatformDevice(const std::string& dev_name) {
|
|||
return InitDevice("/sys/devices/platform", dev_name);
|
||||
}
|
||||
|
||||
bool BlockDevInitializer::InitHvcDevice(const std::string& dev_name) {
|
||||
return InitDevice("/sys/devices/virtual/tty", dev_name);
|
||||
}
|
||||
|
||||
bool BlockDevInitializer::InitDevice(const std::string& syspath, const std::string& device_name) {
|
||||
bool found = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class BlockDevInitializer final {
|
|||
bool InitDevices(std::set<std::string> devices);
|
||||
bool InitDmDevice(const std::string& device);
|
||||
bool InitPlatformDevice(const std::string& device);
|
||||
bool InitHvcDevice(const std::string& device);
|
||||
|
||||
private:
|
||||
ListenerAction HandleUevent(const Uevent& uevent, std::set<std::string>* devices);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue