dfu: Update file open fail log with its path 28/313228/2 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20240620.153545
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 20 Jun 2024 05:35:23 +0000 (14:35 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 20 Jun 2024 07:16:55 +0000 (07:16 +0000)
The open fail log shows only image name, but it is not enough.
Update file open fail log with failure file path.

Change-Id: I27c2ea95b7f5813004975fb83a9825e8b1b82ebe
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/dfu.c

index 25dd0de7944d8e51b4bad63be2b81a41a76219d3..6fcebe94f11d89a4dc87c6a47830183d9ee38638 100644 (file)
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -496,7 +496,7 @@ static int find_slot_b(struct dfu_context *ctx, char *name) {
        fd = open(file, O_WRONLY);
        if (fd < 0) {
                fprintf(stderr,
-                       "cannot open target: %s\n", name);
+                       "cannot open %s for target: %s\n", file, name);
                fd = -EIO;
        }
 
@@ -548,8 +548,8 @@ static int dfu_start_entry(struct dfu_entry *e, char **entry, uint64_t size)
        fd = open(file, O_WRONLY);
        if (fd < 0) {
                fprintf(stderr,
-                       "cannot open target: %s\n",
-                       entry[DFU_INFO_NAME]);
+                       "cannot open %s for target: %s\n",
+                       file, entry[DFU_INFO_NAME]);
                ret = -EIO;
                goto err;
        }