mcoverlay-create.sh, mcoverlay-destroy.sh: Return -EINVAL on failure

Change-Id: I0561df33e8068327bf2d921c8facac7b18ac8866
This commit is contained in:
Masamichi Takagi
2018-07-02 13:02:49 +09:00
parent 854bc85602
commit f185be06eb
4 changed files with 28 additions and 6 deletions

View File

@ -8,6 +8,9 @@ if grep mcoverlay /proc/modules &>/dev/null; then
if [ -e /tmp/mcos ]; then rm -rf /tmp/mcos; fi
if ! rmmod mcoverlay 2>/dev/null; then
echo "error: removing mcoverlay" >&2
exit 1
# Return -EINVAL
exit -22
fi
fi
exit 0