[PATCH] pesto: Drop exit_status, use status to select the exit code
Commit 885c39e8b999 ("conf, pesto: Notify client of the result of rule
updates") added an exit_status variable to exit with a non-zero status
if the server reports a failure. However, the status read from the
server already tells us whether the update failed.
Drop exit_status, broaden the scope of status, and select the exit code
from it when we call exit(). Initialize status to PESTO_STATUS_OK, since
it is not read from the server when pesto only shows the current rules
or the server uses a protocol version older than 3.
Link: https://archives.passt.top/passt-dev/20261120235844.75da1afa@elisabeth/
Suggested-by: Stefano Brivio
On Wed, 25 Nov 2026 22:38:07 +0900
Hayato Kiwata
Commit 885c39e8b999 ("conf, pesto: Notify client of the result of rule updates") added an exit_status variable to exit with a non-zero status if the server reports a failure. However, the status read from the server already tells us whether the update failed.
Drop exit_status, broaden the scope of status, and select the exit code from it when we call exit(). Initialize status to PESTO_STATUS_OK, since it is not read from the server when pesto only shows the current rules or the server uses a protocol version older than 3.
Link: https://archives.passt.top/passt-dev/20261120235844.75da1afa@elisabeth/ Suggested-by: Stefano Brivio
Signed-off-by: Hayato Kiwata
Applied, thanks for polishing this up. -- Stefano
participants (2)
-
Hayato Kiwata
-
Stefano Brivio