From 1973bc565f77ca3bb1770687552ca3c20dc64f26 Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Thu, 22 Aug 2024 14:40:07 +0200 Subject: [PATCH] samples: subsys: nvs: Print rc on errors So that the user gets a hint of what the problem can be. Signed-off-by: Lluis Campos --- samples/subsys/nvs/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/subsys/nvs/src/main.c b/samples/subsys/nvs/src/main.c index 5ea1976d319..5df97ab9c1b 100644 --- a/samples/subsys/nvs/src/main.c +++ b/samples/subsys/nvs/src/main.c @@ -86,7 +86,7 @@ int main(void) fs.offset = NVS_PARTITION_OFFSET; rc = flash_get_page_info_by_offs(fs.flash_device, fs.offset, &info); if (rc) { - printk("Unable to get page info\n"); + printk("Unable to get page info, rc=%d\n", rc); return 0; } fs.sector_size = info.size; @@ -94,7 +94,7 @@ int main(void) rc = nvs_mount(&fs); if (rc) { - printk("Flash Init failed\n"); + printk("Flash Init failed, rc=%d\n", rc); return 0; }