Print error on startup when binder/ashmem are missing and fail

This commit is contained in:
Simon Fels 2017-02-07 08:14:34 +01:00
commit c3b2e88960

View file

@ -104,6 +104,11 @@ anbox::cmds::Run::Run(const BusFactory &bus_factory)
trap->stop();
});
if (!fs::exists("/dev/binder") || !fs::exists("/dev/ashmem")) {
ERROR("Failed to start as either binder or ashmem kernel drivers are not loaded");
return EXIT_FAILURE;
}
utils::ensure_paths({
SystemConfiguration::instance().socket_dir(),
SystemConfiguration::instance().input_device_dir(),