On Fri, Aug 06, 2021 at 02:42:36PM +0300, Nikolay Borisov wrote: > > +if [ $ret -ne 1 ]; then > > + echo "Unexpected return value from btrfs command, has $ret expected 1" > > +fi > > <rant> > This just shows how broken progs are w.r.t return values. The generally > accepted return value is 0 on success, yet it returns 1 on success since > the functions implementing this functionality in progs treat the return > value as a boolean. > </rant> Heh, not following the common convention of 0 for success, !0 for errors would be crazy and hardly left unnoticed by users.