I found that I wasn't able to use stat on /dev I would get error 6.
The issue is that the rname is being set the the address of a char however this needs to be a char* otherwise the logic used in dev_stat will read past the end of the name since the pointer is incremented and in this case name is only a single byte.
With this change I can now properly stat/dev and see it is a directory.
I found that I wasn't able to use
stat
on/dev
I would get error 6.The issue is that the
rname
is being set the the address of a char however this needs to be achar*
otherwise the logic used indev_stat
will read past the end of thename
since the pointer is incremented and in this casename
is only a single byte.With this change I can now properly
stat
/dev
and see it is a directory.