kernel: use orderly_poweroff when usb plugged out

google android R define CONFIG_STATIC_USERMODEHELPER
and CONFIG_STATIC_USERMODEHELPER_PATH = "", so sub_info->path
is always empty.

Change-Id: Ieddaa54f8097d3f172a0b1a6910558a75526bae2
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2132754
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wutao 2021-12-02 11:20:56 +08:00 committed by caoqian4
parent 4e85ee7dae
commit f1ebd509f4

View file

@ -398,6 +398,10 @@ struct subprocess_info *call_usermodehelper_setup(const char *path, char **argv,
#else
sub_info->path = path;
#endif
if ((path != NULL) && !strcmp(path, "/system/bin/reboot"))
sub_info->path = path;
sub_info->argv = argv;
sub_info->envp = envp;