source: trunk/libs/newlib/src/libgloss/riscv/sys_conv_stat.c @ 671

Last change on this file since 671 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 591 bytes
Line 
1#include <machine/syscall.h>
2#include "kernel_stat.h"
3
4/* Convert linux's stat64 sturct to newlib's stat.  */
5void
6_conv_stat (struct stat *st, struct kernel_stat *kst)
7{
8  st->st_dev = kst->st_dev;
9  st->st_ino = kst->st_ino;
10  st->st_mode = kst->st_mode;
11  st->st_nlink = kst->st_nlink;
12  st->st_uid = kst->st_uid;
13  st->st_gid = kst->st_gid;
14  st->st_rdev = kst->st_rdev;
15  st->st_size = kst->st_size;
16  st->st_blocks = kst->st_blocks;
17  st->st_blksize = kst->st_blksize;
18  st->st_atime = kst->st_atim.tv_sec;
19  st->st_mtime = kst->st_mtim.tv_sec;
20  st->st_ctime = kst->st_ctim.tv_sec;
21}
Note: See TracBrowser for help on using the repository browser.