Commit 6d0f45260846b8cafcae6a815178ff8ece7dea7a

Authored by Stefan Agner
Committed by Tom Rini
1 parent 763754549f

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

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -114,7 +114,7 @@
114 114 return 0;
115 115 }
116 116  
117   - return -EEXIST;
  117 + return 1;
118 118 }
119 119  
120 120