Skip to contentSkip to conversation

busybox: support millisecond watchdog periods

PATCH New spdawson at gmail.com 2 participants 2 messages Feb 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox: support millisecond watchdog periods

From: Simon Dawson <[email protected]>

The BusyBox watchdog application supports reset periods specified in milliseconds. The Buildroot package will only allow an integer reset period, which prevents the use of the required "ms" suffix. Change the watchdog period configuration item to a string, to allow the use of the "ms" suffix.

---
 package/busybox/Config.in  |    4 +++-
 package/busybox/busybox.mk |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
package/busybox/Config.in +3 -1
index 2890c49..4d9899d 100644
@@ -64,12 +64,14 @@ config BR2_PACKAGE_BUSYBOX_WATCHDOG
 if BR2_PACKAGE_BUSYBOX_WATCHDOG
 
 config BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD
-	int "Delay between reset"
+	string "Delay between reset"
 	default "5"
 	help
 	  Select the number of seconds between each
 	  reset of the watchdog (default 5)
 
+	  Use ms suffix to specify milliseconds (e.g. 500ms)
+
 endif
 
 endif
package/busybox/busybox.mk +1 -1
index 599e145..900896f 100644
@@ -168,7 +168,7 @@ define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
 	[ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \
 		install -D -m 0755 package/busybox/S15watchdog \
 			$(TARGET_DIR)/etc/init.d/S15watchdog && \
-		sed -i s/PERIOD/$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD)/ \
+		sed -i s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \
 			$(TARGET_DIR)/etc/init.d/S15watchdog
 endef
 endif
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 busybox: support millisecond watchdog periods

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"spdawson" == spdawson <[email protected]> writes:

spdawson> From: Simon Dawson <[email protected]>

spdawson> The BusyBox watchdog application supports reset periods spdawson> specified in milliseconds. The Buildroot package will only spdawson> allow an integer reset period, which prevents the use of the spdawson> required "ms" suffix. Change the watchdog period spdawson> configuration item to a string, to allow the use of the "ms" spdawson> suffix.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard