فهرست منبع

回退rst上报逻辑。优化优雅关机的参数。

liu qidong 2 هفته پیش
والد
کامیت
153cd709ed
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      power.c
  2. 1 1
      test_app/system_ctl_app.c

+ 1 - 1
power.c

@@ -285,7 +285,7 @@ static void delay_work_func(struct work_struct *work)
     
     if(rst_flag >= 1)
     {
-        chardev_dev->status = 'P';
+        chardev_dev->status = 'R';
         chardev_dev->data_len = 1;
         wake_up_interruptible(&chardev_dev->read_queue);
     }

+ 1 - 1
test_app/system_ctl_app.c

@@ -37,7 +37,7 @@ void reboot_system() {
 void shutdown_system() {
     printf("shutdown command received, system shutting down...\n");
     sync();
-    execute_command("shutdown -h now");
+    execute_command("shutdown -hP now");
 }
 
 int main() {