Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sys_conv_stat.c « riscv « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73c6a8672cb2e81d0e3b34fabc712bb7c8dba302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <machine/syscall.h>
#include "kernel_stat.h"

/* Convert linux's stat64 sturct to newlib's stat.  */
void
_conv_stat (struct stat *st, struct kernel_stat *kst)
{
  st->st_dev = kst->st_dev;
  st->st_ino = kst->st_ino;
  st->st_mode = kst->st_mode;
  st->st_nlink = kst->st_nlink;
  st->st_uid = kst->st_uid;
  st->st_gid = kst->st_gid;
  st->st_rdev = kst->st_rdev;
  st->st_size = kst->st_size;
  st->st_blocks = kst->st_blocks;
  st->st_blksize = kst->st_blksize;
  st->st_atime = kst->st_atim.tv_sec;
  st->st_mtime = kst->st_mtim.tv_sec;
  st->st_ctime = kst->st_ctim.tv_sec;
}