Description: remove statfs syscalls define statfs as an alias to statvfs for linux compatibility. Index: uts/usr/src/uts/common/sys/statfs.h =================================================================== --- uts.orig/usr/src/uts/common/sys/statfs.h +++ uts/usr/src/uts/common/sys/statfs.h @@ -32,52 +32,10 @@ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Structure returned by statfs(2) and fstatfs(2). - * This structure and associated system calls have been replaced - * by statvfs(2) and fstatvfs(2) and will be removed from the system - * in a near-future release. - */ - -struct statfs { - short f_fstyp; /* File system type */ - long f_bsize; /* Block size */ - long f_frsize; /* Fragment size (if supported) */ - long f_blocks; /* Total number of blocks on file system */ - long f_bfree; /* Total number of free blocks */ - ino_t f_files; /* Total number of file nodes (inodes) */ - ino_t f_ffree; /* Total number of free file nodes */ - char f_fname[6]; /* Volume name */ - char f_fpack[6]; /* Pack name */ -}; - -#ifdef _SYSCALL32 - -struct statfs32 { - int16_t f_fstyp; - int32_t f_bsize; - int32_t f_frsize; - int32_t f_blocks; - int32_t f_bfree; - ino32_t f_files; - ino32_t f_ffree; - char f_fname[6]; - char f_fpack[6]; -}; - -#endif /* _SYSCALL32 */ - -#if !defined(_KERNEL) -int statfs(const char *, struct statfs *, int, int); -int fstatfs(int, struct statfs *, int, int); -#endif - -#ifdef __cplusplus -} -#endif +#ifndef statfs +# include +# define statfs statvfs +# define fstatfs fstatvfs +#endif /* statfs */ #endif /* _SYS_STATFS_H */ Index: uts/usr/src/uts/common/os/sysent.c =================================================================== --- uts.orig/usr/src/uts/common/os/sysent.c +++ uts/usr/src/uts/common/os/sysent.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -160,8 +159,6 @@ int rmdir(char *); int mkdir(char *, int); int mkdirat(int, char *, int); int getdents32(int, void *, size_t); -int statfs32(char *, struct statfs32 *, int32_t, int32_t); -int fstatfs32(int32_t, struct statfs32 *, int32_t, int32_t); int sysfs(int, long, long); int getmsg(int, struct strbuf *, struct strbuf *, int *); int pollsys(pollfd_t *, nfds_t, timespec_t *, sigset_t *); @@ -475,14 +472,10 @@ struct sysent sysent[NSYSCALL] = /* 32 */ SYSENT_CI("gtty", gtty, 2), /* 33 */ SYSENT_CI("access", access, 2), /* 34 */ SYSENT_CI("nice", nice, 1), - /* 35 */ IF_LP64( - SYSENT_NOSYS(), - SYSENT_CI("statfs", statfs32, 4)), + /* 35 */ SYSENT_NOSYS(), /* 36 */ SYSENT_CI("sync", syssync, 0), /* 37 */ SYSENT_CI("kill", kill, 2), - /* 38 */ IF_LP64( - SYSENT_NOSYS(), - SYSENT_CI("fstatfs", fstatfs32, 4)), + /* 38 */ SYSENT_NOSYS(), /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3), /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3), /* 41 */ SYSENT_LOADABLE(), /* pipe2 */ @@ -854,10 +847,10 @@ struct sysent sysent32[NSYSCALL] = /* 32 */ SYSENT_CI("gtty", gtty, 2), /* 33 */ SYSENT_CI("access", access, 2), /* 34 */ SYSENT_CI("nice", nice, 1), - /* 35 */ SYSENT_CI("statfs", statfs32, 4), + /* 35 */ SYSENT_NOSYS(), /* 36 */ SYSENT_CI("sync", syssync, 0), /* 37 */ SYSENT_CI("kill", kill, 2), - /* 38 */ SYSENT_CI("fstatfs", fstatfs32, 4), + /* 38 */ SYSENT_NOSYS(), /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3), /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3), /* 41 */ SYSENT_LOADABLE32(), /* pipe2 */ Index: uts/usr/src/uts/common/Makefile.files =================================================================== --- uts.orig/usr/src/uts/common/Makefile.files +++ uts/usr/src/uts/common/Makefile.files @@ -322,7 +322,6 @@ GENUNIX_OBJS += \ space.o \ sscanf.o \ stat.o \ - statfs.o \ statvfs.o \ stol.o \ str_conf.o \ Index: uts/usr/src/uts/common/fs/vfs.c =================================================================== --- uts.orig/usr/src/uts/common/fs/vfs.c +++ uts/usr/src/uts/common/fs/vfs.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include Index: uts/usr/src/uts/intel/os/name_to_sysnum =================================================================== --- uts.orig/usr/src/uts/intel/os/name_to_sysnum +++ uts/usr/src/uts/intel/os/name_to_sysnum @@ -30,10 +30,8 @@ stty 31 gtty 32 access 33 nice 34 -statfs 35 syssync 36 kill 37 -fstatfs 38 setpgrp 39 uucopystr 40 pipe2 41 Index: uts/usr/src/uts/common/sys/syscall.h =================================================================== --- uts.orig/usr/src/uts/common/sys/syscall.h +++ uts/usr/src/uts/common/sys/syscall.h @@ -81,10 +81,8 @@ extern "C" { #define SYS_gtty 32 #define SYS_access 33 #define SYS_nice 34 -#define SYS_statfs 35 #define SYS_sync 36 #define SYS_kill 37 -#define SYS_fstatfs 38 #define SYS_pgrpsys 39 /* * subcodes: