mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 03:47:10 +04:00
get_bootdev() identifies the boot disk for a root=PARTUUID=xxxxxxxx-NN
command line by reading the four-byte signature at offset 440 of each
block device, but renders it with %x per byte, so a byte below 0x10 comes
out as a single digit and the string is too short to ever match. A disk
whose signature is cf0a3161 yields "cfa3161", get_bootdev() returns null,
and every backend's init fails: uvol then reports no backend at all and
no volume can be created on a perfectly good volume group.
Pad each byte to two digits, as the GPT branch of the same function
already does.
Fixes: 6350c7bc63 ("uvol: replace with re-write in ucode")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>