]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the handling of legacy-format devices in the u-boot loaderdev variable.
authorian <ian@FreeBSD.org>
Wed, 20 Feb 2019 03:00:55 +0000 (03:00 +0000)
committerian <ian@FreeBSD.org>
Wed, 20 Feb 2019 03:00:55 +0000 (03:00 +0000)
commit9ac51119a850e55642656a77e74a98649424d172
treed4a68e83a5d00b2accfaa9659fccaa9d36588d3e
parent8c28d663d3f0800f4873cbac7d2022b5a0db8f3a
Fix the handling of legacy-format devices in the u-boot loaderdev variable.
When I added support for the standard loader(8) disk0s2a: type formats,
the parsing of legacy format was broken because it also contains a colon,
but it comes before the slice and partition. That would cause disk_parsedev()
to return success with the slice and partition set to wildcard values.

This change examines the string first, and if it contains spaces, dots, or
a colon at any position other than the end, it must be a legacy-format
string and we don't even try to use disk_parsedev() on it.

Reported by: Manuel Stuhn
stand/uboot/common/main.c