Closed elliott-beach closed 6 years ago
Actually https://github.com/elliott-beach/project3/blob/6c7e23a2061096ff245885463943947b27e24641/Kernel.cc#L521-L546 is half of what we need.
I think the main difference between this syscall and creat
is that we will plug in the old inode number instead of using the new one. Other than that, it might basically be copy-paste.
We just replace this: https://github.com/elliott-beach/project3/blob/6c7e23a2061096ff245885463943947b27e24641/Kernel.cc#L255-L261
with the inode number from open
. Viola!
Yeah that sounds right. We can just get the inode by calling findIndexNode
and then use the code from creat
. I'll work more on this tomorrow.
Fixes #1.