PowerManagement_ForceSystemReboot 函数

标头: #include <applibs/powermanagement.h>

强制系统重新启动。 重新启动相当于硬重置,导致系统停止并重新启动。

int PowerManagement_ForceSystemReboot();

参数

此函数没有参数。

返回值

如果成功,则返回 0,如果失败,则返回 -1,在这种情况下 errno ,将设置为错误值。

应用程序清单要求

若要使用 PowerManagement_ForceSystemReboot () ,应用程序必须在应用程序清单PowerControls 字段中声明 ForceReboot 值。