Skip to content
Snippets Groups Projects
Commit f06adb64 authored by Tomasz Maciej Nowak's avatar Tomasz Maciej Nowak Committed by Adrian Schmutzler
Browse files

mvebu: sysupgrade: remove redundant MBR check


This is already done by get_partitions.

Signed-off-by: default avatarTomasz Maciej Nowak <tmn505@gmail.com>
[add "redundant" to title, remove declaration of magic variable]
Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
parent b9246bbd
No related branches found
No related tags found
No related merge requests found
get_magic_at() {
local file="$1"
local pos="$2"
get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
}
platform_check_image_sdcard() {
local file="$1"
local magic diskdev partdev diff
magic=$(get_magic_at "$file" 510)
[ "$magic" != "55aa" ] && {
echo "Failed to verify MBR boot signature."
return 1
}
local diskdev partdev diff
export_bootdevice && export_partdevice diskdev 0 || {
echo "Unable to determine upgrade device"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment