libubootenv icon indicating copy to clipboard operation
libubootenv copied to clipboard

Non-existing devices results in parsing error

Open tq-steina opened this issue 1 year ago • 0 comments

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

tq-steina avatar Oct 25 '24 13:10 tq-steina