Added truncate(2), ftruncate(2), truncate64() and ftruncate64(), the two latter

being untested yet.
This commit is contained in:
manu 2002-03-26 10:52:52 +00:00
parent e42f3e3081
commit 2ccdf1d7ec
5 changed files with 45 additions and 27 deletions

View File

@ -1,10 +1,10 @@
/* $NetBSD: irix_syscall.h,v 1.29 2002/03/16 13:29:42 manu Exp $ */
/* $NetBSD: irix_syscall.h,v 1.30 2002/03/26 10:52:52 manu Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.27 2002/03/10 21:56:24 manu Exp
* created from NetBSD: syscalls.master,v 1.28 2002/03/16 13:29:42 manu Exp
*/
/* syscall: "syscall" ret: "int" args: */
@ -253,6 +253,12 @@
/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
#define IRIX_SYS_setdomainname 111
/* syscall: "truncate" ret: "int" args: "const char *" "long" */
#define IRIX_SYS_truncate 112
/* syscall: "ftruncate" ret: "int" args: "int" "long" */
#define IRIX_SYS_ftruncate 113
/* syscall: "rename" ret: "int" args: "const char *" "const char *" */
#define IRIX_SYS_rename 114
@ -340,6 +346,12 @@
/* syscall: "writev" ret: "ssize_t" args: "int" "const struct iovec *" "int" */
#define IRIX_SYS_writev 182
/* syscall: "truncate64" ret: "int" args: "const char *" "int" "off_t" */
#define IRIX_SYS_truncate64 183
/* syscall: "ftruncate64" ret: "int" args: "int" "int" "off_t" */
#define IRIX_SYS_ftruncate64 184
/* syscall: "getmountid" ret: "int" args: "const char *" "irix_mountid_t *" */
#define IRIX_SYS_getmountid 203

View File

@ -1,10 +1,10 @@
/* $NetBSD: irix_syscallargs.h,v 1.29 2002/03/16 13:29:42 manu Exp $ */
/* $NetBSD: irix_syscallargs.h,v 1.30 2002/03/26 10:52:52 manu Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.27 2002/03/10 21:56:24 manu Exp
* created from NetBSD: syscalls.master,v 1.28 2002/03/16 13:29:42 manu Exp
*/
#ifndef _IRIX_SYS__SYSCALLARGS_H_
@ -240,6 +240,8 @@ int compat_43_sys_gethostname(struct proc *, void *, register_t *);
int compat_43_sys_sethostname(struct proc *, void *, register_t *);
int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
int sys_truncate(struct proc *, void *, register_t *);
int sys_ftruncate(struct proc *, void *, register_t *);
int sys_rename(struct proc *, void *, register_t *);
int sys_symlink(struct proc *, void *, register_t *);
int sys_readlink(struct proc *, void *, register_t *);
@ -269,6 +271,8 @@ int svr4_sys_statvfs(struct proc *, void *, register_t *);
int svr4_sys_fstatvfs(struct proc *, void *, register_t *);
int sys_readv(struct proc *, void *, register_t *);
int sys_writev(struct proc *, void *, register_t *);
int sys_truncate(struct proc *, void *, register_t *);
int sys_ftruncate(struct proc *, void *, register_t *);
int irix_sys_getmountid(struct proc *, void *, register_t *);
int irix_sys_getdents64(struct proc *, void *, register_t *);
int irix_sys_ngetdents(struct proc *, void *, register_t *);

View File

@ -1,14 +1,14 @@
/* $NetBSD: irix_syscalls.c,v 1.29 2002/03/16 13:29:42 manu Exp $ */
/* $NetBSD: irix_syscalls.c,v 1.30 2002/03/26 10:52:52 manu Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.27 2002/03/10 21:56:24 manu Exp
* created from NetBSD: syscalls.master,v 1.28 2002/03/16 13:29:42 manu Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.29 2002/03/16 13:29:42 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.30 2002/03/26 10:52:52 manu Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@ -159,8 +159,8 @@ const char *const irix_syscallnames[] = {
"sethostname", /* 109 = sethostname */
"getdomainname", /* 110 = getdomainname */
"setdomainname", /* 111 = setdomainname */
"#112 (unimplemented truncate)", /* 112 = unimplemented truncate */
"#113 (unimplemented ftruncate)", /* 113 = unimplemented ftruncate */
"truncate", /* 112 = truncate */
"ftruncate", /* 113 = ftruncate */
"rename", /* 114 = rename */
"symlink", /* 115 = symlink */
"readlink", /* 116 = readlink */
@ -230,8 +230,8 @@ const char *const irix_syscallnames[] = {
"#180 (unimplemented sigqueue)", /* 180 = unimplemented sigqueue */
"readv", /* 181 = readv */
"writev", /* 182 = writev */
"#183 (unimplemented truncate64)", /* 183 = unimplemented truncate64 */
"#184 (unimplemented ftruncate64)", /* 184 = unimplemented ftruncate64 */
"truncate64", /* 183 = truncate64 */
"ftruncate64", /* 184 = ftruncate64 */
"#185 (unimplemented mmap64)", /* 185 = unimplemented mmap64 */
"#186 (unimplemented dmi)", /* 186 = unimplemented dmi */
"#187 (unimplemented pread)", /* 187 = unimplemented pread */

View File

@ -1,14 +1,14 @@
/* $NetBSD: irix_sysent.c,v 1.29 2002/03/16 13:29:42 manu Exp $ */
/* $NetBSD: irix_sysent.c,v 1.30 2002/03/26 10:52:52 manu Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.27 2002/03/10 21:56:24 manu Exp
* created from NetBSD: syscalls.master,v 1.28 2002/03/16 13:29:42 manu Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.29 2002/03/16 13:29:42 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.30 2002/03/26 10:52:52 manu Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@ -274,10 +274,10 @@ struct sysent irix_sysent[] = {
compat_09_sys_getdomainname }, /* 110 = getdomainname */
{ 2, s(struct compat_09_sys_setdomainname_args), 0,
compat_09_sys_setdomainname }, /* 111 = setdomainname */
{ 0, 0, 0,
sys_nosys }, /* 112 = unimplemented truncate */
{ 0, 0, 0,
sys_nosys }, /* 113 = unimplemented ftruncate */
{ 2, s(struct sys_truncate_args), 0,
sys_truncate }, /* 112 = truncate */
{ 2, s(struct sys_ftruncate_args), 0,
sys_ftruncate }, /* 113 = ftruncate */
{ 2, s(struct sys_rename_args), 0,
sys_rename }, /* 114 = rename */
{ 2, s(struct sys_symlink_args), 0,
@ -416,10 +416,10 @@ struct sysent irix_sysent[] = {
sys_readv }, /* 181 = readv */
{ 3, s(struct sys_writev_args), 0,
sys_writev }, /* 182 = writev */
{ 0, 0, 0,
sys_nosys }, /* 183 = unimplemented truncate64 */
{ 0, 0, 0,
sys_nosys }, /* 184 = unimplemented ftruncate64 */
{ 3, s(struct sys_truncate_args), 0,
sys_truncate }, /* 183 = truncate64 */
{ 3, s(struct sys_ftruncate_args), 0,
sys_ftruncate }, /* 184 = ftruncate64 */
{ 0, 0, 0,
sys_nosys }, /* 185 = unimplemented mmap64 */
{ 0, 0, 0,

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.28 2002/03/16 13:29:42 manu Exp $
$NetBSD: syscalls.master,v 1.29 2002/03/26 10:52:52 manu Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@ -221,8 +221,8 @@
int len); }
111 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
int len); }
112 UNIMPL truncate
113 UNIMPL ftruncate
112 NOARGS { int sys_truncate(const char *path, long length); }
113 NOARGS { int sys_ftruncate(int fd, long length); }
114 NOARGS { int sys_rename(const char *from, const char *to); }
115 NOARGS { int sys_symlink(const char *path, \
const char *link); }
@ -315,8 +315,10 @@
const struct iovec *iovp, int iovcnt); }
182 NOARGS { ssize_t sys_writev(int fd, \
const struct iovec *iovp, int iovcnt); }
183 UNIMPL truncate64
184 UNIMPL ftruncate64
183 NOARGS { int sys_truncate(const char *path, int pad, \
off_t length); } truncate64
184 NOARGS { int sys_ftruncate(int fd, int pad, off_t length); } \
ftruncate64
185 UNIMPL mmap64
186 UNIMPL dmi
187 UNIMPL pread