mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-30 23:21:27 +01:00
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
This commit is contained in:
parent
763754549f
commit
6d0f452608
@ -114,7 +114,7 @@ static int ubi_check(char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -EEXIST;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user