BUSYBOX: adapt to new version of KIRKSTONE

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
This commit is contained in:
Christophe Priouzeau 2022-05-02 11:57:09 +02:00
parent 5a6099a634
commit a3425ad76b
1 changed files with 13 additions and 14 deletions

View File

@ -1,20 +1,20 @@
From 08d9bcdef21f117511e109d28507c9f76045914f Mon Sep 17 00:00:00 2001
From: Yannick Fertre <yannick.fertre@st.com>
Date: Fri, 16 Sep 2016 16:59:37 +0200
From 6369613da1d212c67c2c6001a77f4949938addc7 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Mon, 3 Jan 2022 16:03:20 +0100
Subject: [PATCH] miscutils: watchdog: Add gettimeleft
For purpose debug only, call of ioctl GETTIMELEFT
Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
---
/miscutils/watchdog.c | 5 +++++
1 file changed, 5 insertions(+)
miscutils/watchdog.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a//miscutils/watchdog.c b//miscutils/watchdog.c
index d3a76ed..d8e1c0e 100644
--- a//miscutils/watchdog.c
+++ b//miscutils/watchdog.c
@@ -50,6 +50,7 @@ int watchdog_main(int argc, char **argv)
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index d8e9c78..4227188 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -110,6 +110,7 @@ int watchdog_main(int argc UNUSED_PARAM, char **argv)
unsigned opts;
unsigned stimer_duration; /* how often to restart */
unsigned htimer_duration = 60000; /* reboots after N ms if not restarted */
@ -22,11 +22,10 @@ index d3a76ed..d8e1c0e 100644
char *st_arg;
char *ht_arg;
@@ -105,6 +106,10 @@ int watchdog_main(int argc, char **argv)
@@ -160,6 +161,9 @@ int watchdog_main(int argc UNUSED_PARAM, char **argv)
*/
write(3, "", 1); /* write zero byte */
usleep(stimer_duration * 1000L);
+
msleep(stimer_duration);
+#ifdef WDIOC_GETTIMELEFT
+ ioctl_or_warn(3, WDIOC_GETTIMELEFT, &time_left);
+#endif
@ -34,5 +33,5 @@ index d3a76ed..d8e1c0e 100644
return EXIT_SUCCESS; /* - not reached, but gcc 4.2.1 is too dumb! */
}
--
1.9.1
2.25.1