I have the filedescriptor and like to get the real path. Currently i call sys_readlink /proc/self/fd/<fd>
which works sometimes, but often i get an error -14 (-EFAULT).
Here some Code:
fs = get_fs();
set_fs(KERNEL_DS);
err = sys_readlink(path, buf, size-1);
set_fs(fs);
Is there an alternative (probably better) way to get the realpath from kernel?