Hello,

I need some help with extending the VFS for my project. I need hardlink 
support, so I added the following to repos/os/include/vfs/directory_service.h's 
Directory_service struct:

    virtual int hardlink(char const *path, char const *hardlink_path)
    {
        (void) path;
        (void)hardlink_path;
        Genode::error("not implemented!");
        return 0;
    }

I have the Lwext4 plugin 
(https://codeberg.org/jws/genode-wundertuete/src/branch/import-lwext4_from_world-2024-04-19)
 setup for my project so I then extended 
repos/wundertuete/src/lib/vfs/lwext4/vfs.cc's Lwext4_vfs_file_system struct:

    int hardlink(char const *path, char const *hardlink_path) override
    {
        return ext4_flink(path, hardlink_path);
    }

The problem is that hardlink uses the default implementation in my main code:
squidutils->_vfs_env.root_dir().hardlink(p2.string(), p1.string());  // Prints 
'not implemented'

>From what I have read online the issue is that squidutils->_vfs_env.root_dir() 
>is of type Directory_service, whereas I need it to be Lwext4_vfs_file_system. 
>However, Lwext4_vfs_file_system is declared in the vfs.cc file above as 
>opposed to being declared in a header.

Is there a way to use Lwext4_vfs_file_system without copying the entire source 
of Lwext4 into my project's source code? Or am I perhaps going in the wrong 
direction with all of this?

Best,
Rumen
_______________________________________________
users mailing list -- users@lists.genode.org
To unsubscribe send an email to users-le...@lists.genode.org
Archived at 
https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/TKLOW3SZLHVOGW453TM5G2AQTXQWEMLF/

Reply via email to