[Buildroot] [PATCH 1/1] package/linux-tools/S10hyperv: fix invalid return value

Benjamin DeCamp via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <c-LIqtVGERPuiF6keYuaBafYyc7kAd3_m1-5cU1R2x-Akg3D5jWjzo1SgFGQOE_Hfwms6HQBgSjm3pQqgd584wZWumaMDikhOKE3IMN2ct0=@protonmail.com>
In both start() and stop(), ret is only assigned on failure. When
hypervkvpd starts or stops successfully, return "$ret" expands to an
empty string and causes:

  /etc/init.d/S10hyperv: return: line 31: Illegal number:

Remove the double quotes so an unset ret expands to a bare return while
preserving the existing return status behavior.

Signed-off-by: Benjamin DeCamp <[email protected]>
---
 package/linux-tools/S10hyperv | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/linux-tools/S10hyperv b/package/linux-tools/S10hyperv
index be9ed2c5df..11692ab313 100644
--- a/package/linux-tools/S10hyperv
+++ b/package/linux-tools/S10hyperv
@@ -28,7 +28,7 @@ start() {
 	for prog in ${PROGS}; do
 		start_one "${prog}" || ret=$?
 	done
-	return "$ret"
+	return $ret
 }
 
 stop_one() {
@@ -49,7 +49,7 @@ stop() {
 	for prog in ${PROGS}; do
 		stop_one "${prog}" || ret=$?
 	done
-	return "$ret"
+	return $ret
 }
 
 restart() {
-- 
2.47.3


_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.