elliott-beach / project3

http://www-users.cselabs.umn.edu/classes/Fall-2017/csci5103/PROJECT/PROJECT3/project3.pdf
0 stars 0 forks source link

[WIP] implement kernel.link #6

Closed elliott-beach closed 6 years ago

elliott-beach commented 6 years ago

Fixes #1.

elliott-beach commented 6 years ago

Actually https://github.com/elliott-beach/project3/blob/6c7e23a2061096ff245885463943947b27e24641/Kernel.cc#L521-L546 is half of what we need.

elliott-beach commented 6 years ago

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!

ghost commented 6 years ago

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.