Skip to content
Snippets Groups Projects
Commit 3996b258 authored by Ronny Nilsson's avatar Ronny Nilsson
Browse files

base-files: extra sanity checks.

parent b8a746ab
No related branches found
No related tags found
No related merge requests found
......@@ -384,6 +384,8 @@ erase_mtd() {
#--------------------------------------------------------------
# Erase a UBI volume $1 (by name) and wait for it to disappear.
erase_ubi_volume() {
[ -n "$1" ] || return 0
if grep -q "$1" /sys/class/ubi/*/name; then
ubirmvol "/dev/ubi0" -N "$1" || return
......@@ -414,6 +416,7 @@ erase_jffs_kernel() {
[ $1 -ge 0 -a $1 -le 1 ] || return
grep -q "kernel_${1}" /sys/class/ubi/*/name && return 0
mtd="$(bcm_find_mtd kernel_${1})" || return
[ -n "$mtd" ] || return 0
[ $mtd -gt 0 ] || return 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment