예제 #1
0
        private static Errno ProcessFile(string path, OpenFlags flags, FdCb cb)
        {
            int fd = Syscall.open(path, flags);

            if (fd == -1)
            {
                return(Stdlib.GetLastError());
            }
            int   r   = cb(fd);
            Errno res = 0;

            if (r == -1)
            {
                res = Stdlib.GetLastError();
            }
            Syscall.close(fd);
            return(res);
        }
예제 #2
0
        private static Errno ProcessFile(string path, OpenFlags flags, FdCb cb)
        {
            var fd = Syscall.open(path, (Mono.Unix.Native.OpenFlags)flags);

            if (fd == -1)
            {
                return(Stdlib.GetLastError());
            }

            var   r   = cb(fd);
            Errno res = 0;

            if (r == -1)
            {
                res = Stdlib.GetLastError();
            }
            _ = Syscall.close(fd);
            return(res);
        }
예제 #3
0
 private static Errno ProcessFile(string path, FdCb cb)
 {
     return(Errno.Ok);
 }
예제 #4
0
 private Errno ProcessFile(string path, OpenFlags flags, FdCb cb)
 {
     int fd = Syscall.open(path, flags);
     if (fd == -1)
     {
         return Stdlib.GetLastError();
     }
     int r = cb(fd);
     Errno res = 0;
     if (r == -1)
     {
         res = Stdlib.GetLastError();
     }
     Syscall.close(fd);
     return res;
 }
예제 #5
0
파일: test-anon-71.cs 프로젝트: nobled/mono
	private static Errno ProcessFile (string path, FdCb cb)
	{
		return Errno.Ok;
	}