New stat structure.

* VFS and installed MFSes must be in sync before and after this change *

Use struct stat from NetBSD. It requires adding new STAT, FSTAT and LSTAT
syscalls. Libc modification is both backward and forward compatible.

Also new struct stat uses modern field sizes to avoid ABI
incompatibility, when we update uid_t, gid_t and company.
Exceptions are ino_t and off_t in old libc (though paddings added).
This commit is contained in:
Evgeniy Ivanov
2011-07-01 23:35:54 +04:00
committed by Ben Gras
parent 48331843ea
commit ef0a265086
34 changed files with 533 additions and 417 deletions

View File

@@ -5,6 +5,7 @@
#include <time.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
#include <string.h>
/*===========================================================================*
* fs_stat *
@@ -22,6 +23,8 @@ PUBLIC int fs_stat(void)
if ((node = find_inode(fs_m_in.REQ_INODE_NR)) == NULL)
return EINVAL;
memset(&statbuf, 0, sizeof(struct stat));
/* Fill in the basic info. */
statbuf.st_dev = fs_dev;
statbuf.st_ino = get_inode_number(node);