This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit df657e85c0a8a5a68d5f1e39b672082be7bcc229
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Thu Jul 10 20:29:19 2025 +0200

    fs_mgmt/mynewt: Fix build with fs
    
    There were incompatible types used
    and typo in variable names preventing this
    to ever build.
    
    Dependency to cmd/fs_mgmt was also incorrect in
    cmd/mynewt_fs_mgmt
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 cmd/fs_mgmt/port/mynewt/pkg.yml              | 2 +-
 cmd/fs_mgmt/port/mynewt/src/mynewt_fs_mgmt.c | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cmd/fs_mgmt/port/mynewt/pkg.yml b/cmd/fs_mgmt/port/mynewt/pkg.yml
index 10e2dbe..7e52e9b 100644
--- a/cmd/fs_mgmt/port/mynewt/pkg.yml
+++ b/cmd/fs_mgmt/port/mynewt/pkg.yml
@@ -24,4 +24,4 @@ pkg.homepage: "http://mynewt.apache.org/";
 pkg.keywords:
 
 pkg.deps:
-    - '@apache-mynewt-mcumgr/cmd/fs'
+    - '@apache-mynewt-mcumgr/cmd/fs_mgmt'
diff --git a/cmd/fs_mgmt/port/mynewt/src/mynewt_fs_mgmt.c 
b/cmd/fs_mgmt/port/mynewt/src/mynewt_fs_mgmt.c
index 632bd1e..f15a57f 100644
--- a/cmd/fs_mgmt/port/mynewt/src/mynewt_fs_mgmt.c
+++ b/cmd/fs_mgmt/port/mynewt/src/mynewt_fs_mgmt.c
@@ -25,6 +25,7 @@ int
 fs_mgmt_impl_filelen(const char *path, size_t *out_len)
 {
     struct fs_file *file;
+    uint32_t file_size;
     int rc;
 
     rc = fs_open(path, FS_ACCESS_READ, &file);
@@ -32,12 +33,14 @@ fs_mgmt_impl_filelen(const char *path, size_t *out_len)
         return MGMT_ERR_EUNKNOWN;
     }
 
-    rc = fs_filelen(file, &out_len);
+    rc = fs_filelen(file, &file_size);
     fs_close(file);
     if (rc != 0) {
         return MGMT_ERR_EUNKNOWN;
     }
 
+    *out_len = file_size;
+
     return 0;
 }
 
@@ -59,7 +62,7 @@ fs_mgmt_impl_read(const char *path, size_t offset, size_t len,
         goto done;
     }
 
-    rc = fs_read(file, len, file_data, &bytes_read);
+    rc = fs_read(file, len, out_data, &bytes_read);
     if (rc != 0) {
         goto done;
     }

Reply via email to