Closed ultimaweapon closed 10 months ago
Could you add a bit more context to this (that is, if you're not working on it yourself already). Does it just open them, or try to do ioctl on them or...?
Updated.
Nice. Do we just add an 'open' function to VFileOps, which will be a no-op where there's a null pointer on the PS4, or do we align more closely with how the PS4 works internally and create a struct with optional function pointers instead of VFileOps?
Sorry I don't understand what you mean.
Well in FreeBSD, the devices are represented with structs, that have function pointers, we have structs, that implement the VFileOps trait. In FreeBSD, some of those function pointers can be null (and for a lot of devices, some are). How do we represent that with out VFileOps trait? It can't have an optional function.
You can see that deci_tty6 has null for d_read. How do cover that option with a trait? I don't think we can.
Actually those ones are not VFileOps
. It is much lower level. I'm trying to make our FS implementation work in the similar way as the PS4. For now just mimic how the PS4 return when those fields are null in each implementation of VFileOps
.
@SuchAFuriousDeath You obviously did something wrong, because firstly d_version should be equal to 17122009, secondly deci_tty6 is the name of the device, but the structure itself is, if I’m not mistaken, deci_tty
oh, oops. Thank you both.
Actually those ones are not
VFileOps
. It is much lower level. I'm trying to make our FS implementation work in the similar way as the PS4. For now just mimic how the PS4 return when those fields are null in each implementation ofVFileOps
.
This may take some time because the filesystem in the FreeBSD is quite complicated. They have a lot of layers and they also use some scripts to generate some of the functions and structs.
Sounds fun :D
He talks about this https://github.com/freebsd/freebsd-src/blob/releng/9.0/sys/tools/vnode_if.awk
Implement only open. Or implement more if you want to go further. But better to implement only open so it is easier to get merged.