Skip to contentSkip to conversation

btrfs-progs: docs: document btrfs-balance exit status in detail

PATCH In review Vladimir Panteleev 2 participants 3 messages Aug 25, 2019 – Aug 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover btrfs-progs: docs: document btrfs-balance exit status in detail

The balance status exit code is a bit of a mess, and the opposite of pause/cancel/resume. I assume it's too late to fix it, so documenting it is the best we can do.

Vladimir Panteleev (1):
btrfs-progs: docs: document btrfs-balance exit status in detail

 Documentation/btrfs-balance.asciidoc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 btrfs-progs: docs: document btrfs-balance exit status in detail

---
 Documentation/btrfs-balance.asciidoc | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
Documentation/btrfs-balance.asciidoc +10 -2
index bfb76742..8afd76da 100644
@@ -354,8 +354,16 @@ This should lead to decrease in the 'total' numbers in the *btrfs filesystem df*
 
 EXIT STATUS
 -----------
-*btrfs balance* returns a zero exit status if it succeeds. Non zero is
-returned in case of failure.
+Unless indicated otherwise below, all *btrfs balance* subcommands
+return a zero exit status if they succeed, and non zero in case of
+failure.
+
+The *pause*, *cancel*, and *resume* subcommands exit with a status of
+*2* if they fail because a balance operation was not running.
+
+The *status* subcommand exits with a status of *0* if a balance
+operation is not running, *1* if the command-line usage is incorrect
+or a balance operation is still running, and *2* on other errors.
 
 AVAILABILITY
 ------------
Signature · 1 line
2.23.0
#2 lore raw
In reply to Vladimir Panteleev
Quoted 3 lines · Vladimir Panteleev

The balance status exit code is a bit of a mess, and the opposite of pause/cancel/resume. I assume it's too late to fix it, so documenting it is the best we can do.

Unfortunatelly, it is. Applied, thanks.