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

@@ -17,7 +17,7 @@
#define CHMOD 15
#define CHOWN 16
#define BRK 17
#define STAT 18
#define PREV_STAT 18
#define LSEEK 19
#define MINIX_GETPID 20
#define MOUNT 21
@@ -27,7 +27,7 @@
#define STIME 25
#define PTRACE 26
#define ALARM 27
#define FSTAT 28
#define PREV_FSTAT 28
#define PAUSE 29
#define UTIME 30
#define ACCESS 33
@@ -44,7 +44,7 @@
#define GETGID 47
#define SIGNAL 48
#define RDLNK 49
#define LSTAT 50
#define PREV_LSTAT 50
#define IOCTL 54
#define FCNTL 55
#define FS_READY 57
@@ -115,6 +115,11 @@
#define GCOV_FLUSH 112 /* flush gcov data from server to gcov files */
/* Numbers reused intentionally */
#define STAT 65
#define FSTAT 66
#define LSTAT 67
#define TASK_REPLY 121 /* to VFS: reply code from drivers, not
* really a standalone call.
*/

View File

@@ -167,7 +167,7 @@ struct exec_newmem
int is_elf; /* Is ELF exe? */
dev_t st_dev; /* Device holding executable file */
ino_t st_ino; /* Inode of executable file */
time_t st_ctime; /* Last changed time of executable file */
time_t enst_ctime; /* Last changed time of executable file */
uid_t new_uid; /* Process UID after exec */
gid_t new_gid; /* Process GID after exec */
char progname[16]; /* Should be at least PROC_NAME_LEN */