mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.6k stars 2.38k forks source link

why move T_DEV check from readi/writei to FD_DEVICE check in fileread/write #127

Closed brandb97 closed 1 year ago

brandb97 commented 2 years ago

I prefer the former implementation due to its uniform using of inode. Why change now? Is there any special reason?

kaashoek commented 1 year ago

We changed it because it is slightly strange to have the dispatch occur in fs.c, since the device isn't a file system, and it isn't necessary to chop writes in smaller pieces. But, the old code was simpler.