diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-20 11:34:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-20 11:36:59 +0200 |
commit | 825d95150d88a9204ac37d86b238c3a5112cb2e8 (patch) | |
tree | 784041cd540ad48e29c65d8ca5f1e45d95bb0184 /common | |
parent | b98aaaaf7401b76c3427377902e0f99ab551c06c (diff) | |
download | barebox-825d95150d88a9204ac37d86b238c3a5112cb2e8.tar.gz barebox-825d95150d88a9204ac37d86b238c3a5112cb2e8.tar.xz |
bootchooser: rename pr_setenv() to bc_setenv()
We are about to introduce a generic function names pr_setenv(), so
rename the existent bootchooser specific function to bc_setenv().
For consistency, rename pr_getenv() accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/bootchooser.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/bootchooser.c b/common/bootchooser.c index 75dfbc6166..eb3dda52ab 100644 --- a/common/bootchooser.c +++ b/common/bootchooser.c @@ -128,7 +128,7 @@ static void pr_target(struct bootchooser_target *target) printf(" disabled due to %s\n", reason); } -static int pr_setenv(struct bootchooser *bc, const char *fmt, ...) +static int bc_setenv(struct bootchooser *bc, const char *fmt, ...) { va_list ap; int ret = 0; @@ -162,7 +162,7 @@ err: return ret; } -static const char *pr_getenv(const char *fmt, ...) +static const char *bc_getenv(const char *fmt, ...) { va_list ap; char *str; @@ -258,7 +258,7 @@ static struct bootchooser_target *bootchooser_target_new(struct bootchooser *bc, target->remaining_attempts = 0; } - val = pr_getenv("%s.boot", target->prefix); + val = bc_getenv("%s.boot", target->prefix); if (!val) val = target->name; target->boot = xstrdup(val); @@ -497,17 +497,17 @@ int bootchooser_save(struct bootchooser *bc) int ret; if (bc->last_chosen) - pr_setenv(bc, "%s.last_chosen=%d", bc->state_prefix, + bc_setenv(bc, "%s.last_chosen=%d", bc->state_prefix, bc->last_chosen->id); list_for_each_entry(target, &bc->targets, list) { - ret = pr_setenv(bc, "%s.remaining_attempts=%d", + ret = bc_setenv(bc, "%s.remaining_attempts=%d", target->state_prefix, target->remaining_attempts); if (ret) return ret; - ret = pr_setenv(bc, "%s.priority=%d", + ret = bc_setenv(bc, "%s.priority=%d", target->state_prefix, target->priority); if (ret) return ret; |