]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
common, ubi: use positive return values for ubi check
authorStefan Agner <stefan@agner.ch>
Fri, 10 Apr 2015 09:25:43 +0000 (11:25 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:39:37 +0000 (14:39 +0200)
commitdc4093cb522ad242172929bc61f167201a371677
tree653f3d6e87ffa07d4b01816f97ca4fdd40459860
parentff7ca5cb54ee9d0a2afeb1a3e99e091973d25d47
common, ubi: use positive return values for ubi check

The ubi check command is expected to not fail and just check whether
a volume exist or not. Currently, when a volume does not exist, the
command fails which leads to an error:
"exit not allowed from main input shell."

Use 1 to indicate that a volume does not exist. This allows to use
ubi check in an if statement, e.g.
if ubi check rootfs; then; echo "exists"; else; echo "not there"; fi
common/cmd_ubi.c