提交 e35ee4b6 编写于 作者: L limingkang

告警处理

Signed-off-by: Nlimingkang <limingkang1@huawei.com>
Change-Id: I14f2b6edc141eea520051856211b873463271167
上级 712c0bc9
......@@ -62,8 +62,11 @@ static int DoRebootPanic(int id, const char *name, int argc, const char **argv)
if (panic == NULL) {
return reboot(RB_AUTOBOOT);
}
fwrite((void *)"c", 1, 1, panic);
fclose(panic);
if (fwrite((void *)"c", 1, 1, panic) != 1) {
(void)fclose(panic);
PLUGIN_LOGI("fwrite to panic failed");
}
(void)fclose(panic);
#endif
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册