Hello,
On Thu, 8 Oct 2026 01:49:05 Samuel Thibault wrote:
> > > Also, ls -l /dev/zero returns
> > >
> > > ls: reading directory '/dev/zero': Not a directory
> > >
> > > I guess it should be fixed into not showing the directory type when
> > > there is not partition table.
> >
> > We can override netfs_S_io_stat and return the desired mode when
> > netfs_root_node is accessed. We need to override this function because
> > modifying netfs_root_node->nn_stat.st_mode directly is not allowed,
as it
> > leads to errors.
>
> Which errors?
I can't say for sure, because the system wouldn't boot at all. I assume
that
for translators based on the libnetfs library, it is critical that
netfs_root_node->nn_stat.st_mode always be S_IFDIR rather than any other
mode. Therefore, we can simply return a different root_node_mode until the
disk partitions are created (assuming it is indeed a partitioned disk); once
they are created, we can switch the root_node_mode from S_IFCHR or
S_IFBLK to
S_IFDIR.
Thanks,
--
Mikhail Karpov