]>
git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/bootcount/bootcount_env.c
2d6e8db126eabec07438111c65d0d0cac5531d68
3 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
10 void bootcount_store(ulong a
)
12 int upgrade_available
= getenv_ulong("upgrade_available", 10, 0);
14 if (upgrade_available
) {
15 setenv_ulong("bootcount", a
);
20 ulong
bootcount_load(void)
22 int upgrade_available
= getenv_ulong("upgrade_available", 10, 0);
25 if (upgrade_available
)
26 val
= getenv_ulong("bootcount", 10, 0);