Do sys open

Retired DISLab
김건우 (토론 | 기여) 사용자의 2014년 4월 30일 (수) 01:58 버전
(비교) ← 이전 판 | 현재 판 (비교) | 다음 판 → (비교)
이동: 둘러보기, 찾기
975 long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
976 {
977         struct open_flags op;
978         int fd = build_open_flags(flags, mode, &op);
979         struct filename *tmp;
980 
981         if (fd)
982                 return fd;
983 
984         tmp = getname(filename);
985         if (IS_ERR(tmp))
986                 return PTR_ERR(tmp);
987 
988         fd = get_unused_fd_flags(flags);
989         if (fd >= 0) {
990                 struct file *f = do_filp_open(dfd, tmp, &op);
991                 if (IS_ERR(f)) {
992                         put_unused_fd(fd);
993                         fd = PTR_ERR(f);
994                 } else {
995                         fsnotify_open(f);
996                         fd_install(fd, f);
997                 }
998         }
999         putname(tmp);
1000         return fd;
1001 }
개인 도구
이름공간
변수
행위
둘러보기
구성원
연구
연구실
기타
도구모음
인쇄/내보내기