コード例 #1
0
        unsafe private void CallFstat()
        {
            LibC.stat fstats = new LibC.stat();

            int current_status = LibC._fstat(0, (int)fd.Value, &fstats);

            status.Value = (uint)current_status;
            if (current_status == -1)
            {
                SetErrorNumber();
            }

            st_dev.Value     = (uint)fstats.st_dev;
            st_ino.Value     = (uint)fstats.st_ino;
            st_mode.Value    = (uint)fstats.st_mode;
            st_nlink.Value   = (uint)fstats.st_nlink;
            st_uid.Value     = (uint)fstats.st_uid;
            st_gid.Value     = (uint)fstats.st_gid;
            st_size.Value    = (uint)fstats.st_size;
            st_rdev.Value    = (uint)fstats.st_rdev;
            st_blksize.Value = (uint)fstats.st_blksize;
            st_blocks.Value  = (uint)fstats.st_blocks;
            st_atim.Value    = (uint)fstats.st_atim.tv_sec;
            st_mtim.Value    = (uint)fstats.st_mtim.tv_sec;
            st_ctim.Value    = (uint)fstats.st_ctim.tv_sec;
            st_atim_ns.Value = (uint)fstats.st_atim.tv_nsec;
            st_mtim_ns.Value = (uint)fstats.st_mtim.tv_nsec;
            st_ctim_ns.Value = (uint)fstats.st_ctim.tv_nsec;

            call = Call.Done;
        }