libubootenv
libubootenv copied to clipboard
Non-existing devices results in parsing error
I just noticed that non-existing files result in a YAML parsing error. This seems a bit unintuitively. In order to provide a general configuration with different, but optional, storage path is provided. If parsing alone, not accessing the env, fails already because some storage devices do not exist, even if are not supposed to be used, this does not work.
Here is an example
uboot:
size: 0x10000
devices:
- path: /dev/mmcblk0
offset: 0x100000
- path: /dev/mmcblk0
offset: 0x110000
uboot-sd:
size: 0x10000
devices:
- path: /dev/mmcblk1
offset: 0x100000
- path: /dev/mmcblk1
offset: 0x110000
uboot-spi:
size: 0x10000
devices:
- path: /dev/mtd0
offset: 0x100000
sectorsize: 0x10000
- path: /dev/mtd0
offset: 0x110000
sectorsize: 0x10000