Question: xv6 chmod function. Most of the code is below, just need to add in the code explained in lines 453-456. examples of argstr, argint, and
xv6 chmod function.
Most of the code is below, just need to add in the code explained in lines 453-456.

examples of argstr, argint, and namei:


445 int 46 sys_chmod(void)// chmod implementation 447 448 char path;// file/directory path name 449 int mode; 45 struct inode ip; / ptr to inode 451 452 53 11 Add code here to: 454 111) Retrieve the path and mode arguments and ensure they are valid formats. If not, exit. 455 1 2) Evaluate the path and return corresponding inode (ip). If path is not valid, exit 56 / Hint: You will need to use the argstr, argint, and namei functions 457 458 begin op): ait until there is space for log entry or if another transaction is taking place 459 ilock (ip)/ Lock inode 466 461 ip->mode mode; // update mode 462 463 update(ip) copy modified inode to disk 464 unlockput(ip); unlock inode 65 end op(); 466 467 return e; 468 //permission /decrement outstanding count of sys calls&start commit process when concurrent sys calls are done 469 /chmod
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
