From ddacbddb9b12f2396356cfcd970ccec0a5278e51 Mon Sep 17 00:00:00 2001 From: Patryk Kubiak Date: Wed, 30 Sep 2026 10:44:53 +0200 Subject: [PATCH] Match dmfsi's API versions for _readdir and _size dmfsi bumped _readdir to 2.0 when dmfsi_dir_entry_t.size became dmfsi_size_t (u64), but dmdevfs kept exporting _readdir@dmfsi:1.0. dmvfs looks the function up by the 2.0 signature, finds nothing, and fails every directory listing under /dev ("API version mismatch: 1.0/1.0 != 2.0/1.0", "File system does not support readdir") - so `ls /dev` and Tab completion of /dev paths were broken. The implementation was already built against the new dmfsi_dir_entry_t, only the signature was stale. _size went the other way: dmdevfs exported 2.0 while dmfsi (and dmffs, dmramfs) declare it 1.0, so any lookup by dmfsi's signature would miss dmdevfs as well. Co-Authored-By: Claude Opus 5.5 --- src/dmdevfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dmdevfs.c b/src/dmdevfs.c index 9001669..a72c6f5 100644 --- a/src/dmdevfs.c +++ b/src/dmdevfs.c @@ -908,7 +908,7 @@ dmod_dmfsi_dif_api_declaration( 1.0, dmdevfs, int, _eof, (dmfsi_context_t ctx, v * @brief Get file size * @note Device drivers represent devices, not files with fixed sizes. Use stat for size info. */ -dmod_dmfsi_dif_api_declaration( 2.0, dmdevfs, dmfsi_size_t, _size, (dmfsi_context_t ctx, void* fp) ) +dmod_dmfsi_dif_api_declaration( 1.0, dmdevfs, dmfsi_size_t, _size, (dmfsi_context_t ctx, void* fp) ) { if(dmfsi_dmdevfs_context_is_valid(ctx) == 0) { @@ -1117,7 +1117,7 @@ dmod_dmfsi_dif_api_declaration( 1.0, dmdevfs, int, _opendir, (dmfsi_context_t ct /** * @brief Read directory entry */ -dmod_dmfsi_dif_api_declaration( 1.0, dmdevfs, int, _readdir, (dmfsi_context_t ctx, void* dp, dmfsi_dir_entry_t* entry) ) +dmod_dmfsi_dif_api_declaration( 2.0, dmdevfs, int, _readdir, (dmfsi_context_t ctx, void* dp, dmfsi_dir_entry_t* entry) ) { if(dmfsi_dmdevfs_context_is_valid(ctx) == 0) {