[PATCH] environment: allow saving of symbolic link changes

Sascha Hauer s.hauer at pengutronix.de
Thu Dec 17 01:52:04 PST 2015


Hi Zahari,

On Wed, Dec 16, 2015 at 01:24:43PM +0100, Zahari Doychev wrote:
> Currently it is not possible to change symbolic links in the default
> environment. For example if the default environment contains the
> link "current_boot -> mmc" then the following does not work:
> 
> $ rm current_boot
> $ ln net current_boot
> $ saveenv
> 
> After reset the link is still pointing to "mmc" and this error appears:
> 
> "symlink: /env/boot/current_boot -> net : error -17"
> 
> The patch fixes the above problem and moves the "ENV_FLAG_NO_OVERWRITE"
> to enable handling of symbolic links in this case too.
> 
> Signed-off-by: Zahari Doychev <zahari.doychev at linux.com>

Applied, thanks.

BTW for this particular case I would rather recommend using nv
variables, i.e. nv boot.default=net or nv boot.default=mmc; saveenv.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list