Guest User

lgetfh(2)

a guest
May 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include<sys/mount.h>
  2. #include<sys/param.h>
  3. #include<stdio.h>
  4. #include<fcntl.h>
  5. #include<unistd.h>
  6.  
  7. void main(){
  8. fhandle_t fhp;
  9. open("file", O_CREAT, 0777);
  10. symlink("file", "symlink");
  11. int ret = lgetfh("symlink", &fhp);
  12. printf("%d\n", ret);
  13.  
  14. unlink("file"); unlink("symlink");
  15. }
Add Comment
Please, Sign In to add comment