sbabic / libubootenv

Generic library and tools to access and modify U-Boot environment from User Space
72 stars 39 forks source link

uboot_env: Use canonicalized pathname when guessing device type #4

Closed liuming50 closed 4 years ago

liuming50 commented 4 years ago

Some platform uses softlinks to the devices that hold environment data. The mechanism used to figure out the type of flash is not robust in this case. Calculating the canonicalized absolute pathname of the device before trying to guess the type of flash decreases the risk of guessing incorrectly.

Signed-off-by: Mathias Thore mathias.thore@atlascopco.com

liuming50 commented 4 years ago

Changes in patch set 2:

1 Change to use canonicalized pathname when reading device name from config file.