summaryrefslogtreecommitdiffstats
path: root/lib/flash/flash.c
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2018-08-02 17:29:34 +0000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-08-07 11:30:36 +1000
commitc78f9ec47ba92b74698dacdae963dbbefd9b676f (patch)
tree58ce2f0f50f8edb451f81d9ecedc9abc842bc3d6 /lib/flash/flash.c
parent679d9dceb5bdf51f118548ca2645dc81088a8974 (diff)
downloadtalos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.tar.gz
talos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.zip
lib/log: Switch to pb_log_fn
The only functional change should be an additional '/n' to a few log messagees that seemed to be missing it. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib/flash/flash.c')
-rw-r--r--lib/flash/flash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/flash/flash.c b/lib/flash/flash.c
index 464b876..b7e5b88 100644
--- a/lib/flash/flash.c
+++ b/lib/flash/flash.c
@@ -94,7 +94,7 @@ static struct flash_info *flash_setup_buffer(void *ctx, const char *partition)
rc = ffs_init(0, info->size, info->bl, &info->ffs, 1);
if (rc) {
- pb_log("%s: Failed to init ffs\n", __func__);
+ pb_log_fn("Failed to init ffs\n");
goto out_flash;
}
@@ -171,7 +171,7 @@ int flash_parse_version(void *ctx, char ***versions, bool current)
len = cur_info->attr_data_len - ecc_size(cur_info->attr_data_len);
buffer = talloc_array(cur_info, char, len);
if (!buffer) {
- pb_log("%s: Failed to init buffer!\n", __func__);
+ pb_log_fn("Failed to init buffer!\n");
goto out;
}
@@ -187,7 +187,7 @@ int flash_parse_version(void *ctx, char ***versions, bool current)
if (tok) {
tmp = talloc_realloc(ctx, tmp, char *, n + 1);
if (!tmp) {
- pb_log("%s: Failed to allocate memory\n", __func__);
+ pb_log_fn("Failed to allocate memory\n");
goto out;
}
tmp[n++] = talloc_strdup(ctx, tok);
@@ -198,7 +198,7 @@ int flash_parse_version(void *ctx, char ***versions, bool current)
/* Ignore leading tab from subsequent lines */
tmp = talloc_realloc(ctx, tmp, char *, n + 1);
if (!tmp) {
- pb_log("%s: Failed to reallocate memory\n", __func__);
+ pb_log_fn("Failed to reallocate memory\n");
n = 0;
goto out;
}
OpenPOWER on IntegriCloud