mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 02:28:43 +04:00
A device without UBI, such as an x86 VM or a device on eMMC, can keep its provisioning data on a block partition named `provisioning`. The data uses the same header as the UBI volume. open() and create() prefer the UBI volume and then look for the partition through the PARTNAME of each block device in sysfs. A commit checks the flush, because close() reports no error. A partition cannot be removed from here, so destroy erases the header and the data. The provision command now exits with an error when a commit or a destroy fails, for both backends. Signed-off-by: Felix Fietkau <nbd@nbd.name>