From 8d5a85658f50891e813c9482d216b31318f984bc Mon Sep 17 00:00:00 2001 From: Jaromil Date: Tue, 29 Dec 2020 11:52:23 +0100 Subject: [PATCH] explicit return codes for all operations --- tomb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomb b/tomb index c68fa65..0d098cb 100755 --- a/tomb +++ b/tomb @@ -2052,7 +2052,7 @@ lock_tomb_with_key() { _message "Done locking ::1 tomb name:: using Luks dm-crypt ::2 cipher::" $TOMBNAME $cipher _success "Your tomb is ready in ::1 tomb path:: and secured with key ::2 tomb key::" \ $TOMBPATH $TOMBKEYFILE - + return 0 } # This function changes the key that locks a tomb @@ -2484,6 +2484,7 @@ awk "/mapper/"' { print $2 ";" $3 ";" $4 ";" $5 }'` $tombname ${h[(ws:;:)2]} done done + return 0 } @@ -2681,6 +2682,7 @@ EOF } _message "Search index updated." done + return 0 } search_tombs() { @@ -2722,6 +2724,7 @@ search_tombs() { _warning "Run 'tomb index' to create indexes." } done _message "Search completed." + return 0 } # }}} - Index and search @@ -2946,6 +2949,7 @@ list_processes() { fi _message "::1 foundproc:: running processes found inside ::2 numtombs:: open tombs" \ $found ${#mounted_tombs} + return 0 } # Kill all processes using the tomb