• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修订版5665cf21409d9443e8afbb83d77d4bddcbec6d38 (tree)
时间2018-03-05 19:24:24
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

modprobe: fix return value

It seems bionic ignores the return value of the main function.
As a result, kernel won't know modprobe failed. That may cause
kernel panic.

Using exit() function to fix that.

更改概述

差异

--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -558,7 +558,7 @@ int modprobe_main(int argc, char **argv)
558558 DeviceHandler dh;
559559 dh.ReadModulesDescFiles();
560560 dh.OnColdBootDone();
561- return dh.LoadModule(uevent) || dh.LoadModule(uevent.modalias, options.c_str()) ? 0 : -1;
561+ exit(!dh.LoadModule(uevent) && !dh.LoadModule(uevent.modalias, options.c_str()));
562562 }
563563
564564 } // namespace init