Implement pread and pwrite.
PR: 17991 Submitted by: Geoffrey Speicher <geoff@caribbean.sea-incorporated.com>
This commit is contained in:
parent
6037da7d24
commit
d5124417a7
@ -96,8 +96,6 @@ DUMMY(rt_sigreturn);
|
||||
DUMMY(rt_sigpending);
|
||||
DUMMY(rt_sigtimedwait);
|
||||
DUMMY(rt_sigqueueinfo);
|
||||
DUMMY(pread);
|
||||
DUMMY(pwrite);
|
||||
DUMMY(capget);
|
||||
DUMMY(capset);
|
||||
DUMMY(sendfile);
|
||||
|
@ -849,3 +849,31 @@ linux_fdatasync(p, uap)
|
||||
bsd.fd = uap->fd;
|
||||
return fsync(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_pread(p, uap)
|
||||
struct proc *p;
|
||||
struct linux_pread_args *uap;
|
||||
{
|
||||
struct pread_args bsd;
|
||||
|
||||
bsd.fd = uap->fd;
|
||||
bsd.buf = uap->buf;
|
||||
bsd.nbyte = uap->nbyte;
|
||||
bsd.offset = uap->offset;
|
||||
return pread(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_pwrite(p, uap)
|
||||
struct proc *p;
|
||||
struct linux_pwrite_args *uap;
|
||||
{
|
||||
struct pwrite_args bsd;
|
||||
|
||||
bsd.fd = uap->fd;
|
||||
bsd.buf = uap->buf;
|
||||
bsd.nbyte = uap->nbyte;
|
||||
bsd.offset = uap->offset;
|
||||
return pwrite(p, &bsd);
|
||||
}
|
||||
|
@ -96,8 +96,6 @@ DUMMY(rt_sigreturn);
|
||||
DUMMY(rt_sigpending);
|
||||
DUMMY(rt_sigtimedwait);
|
||||
DUMMY(rt_sigqueueinfo);
|
||||
DUMMY(pread);
|
||||
DUMMY(pwrite);
|
||||
DUMMY(capget);
|
||||
DUMMY(capset);
|
||||
DUMMY(sendfile);
|
||||
|
@ -849,3 +849,31 @@ linux_fdatasync(p, uap)
|
||||
bsd.fd = uap->fd;
|
||||
return fsync(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_pread(p, uap)
|
||||
struct proc *p;
|
||||
struct linux_pread_args *uap;
|
||||
{
|
||||
struct pread_args bsd;
|
||||
|
||||
bsd.fd = uap->fd;
|
||||
bsd.buf = uap->buf;
|
||||
bsd.nbyte = uap->nbyte;
|
||||
bsd.offset = uap->offset;
|
||||
return pread(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_pwrite(p, uap)
|
||||
struct proc *p;
|
||||
struct linux_pwrite_args *uap;
|
||||
{
|
||||
struct pwrite_args bsd;
|
||||
|
||||
bsd.fd = uap->fd;
|
||||
bsd.buf = uap->buf;
|
||||
bsd.nbyte = uap->nbyte;
|
||||
bsd.offset = uap->offset;
|
||||
return pwrite(p, &bsd);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SYSPROTO_H_
|
||||
@ -480,10 +480,16 @@ struct linux_rt_sigsuspend_args {
|
||||
size_t sigsetsize; char sigsetsize_[PAD_(size_t)];
|
||||
};
|
||||
struct linux_pread_args {
|
||||
register_t dummy;
|
||||
int fd; char fd_[PAD_(int)];
|
||||
char * buf; char buf_[PAD_(char *)];
|
||||
size_t nbyte; char nbyte_[PAD_(size_t)];
|
||||
off_t offset; char offset_[PAD_(off_t)];
|
||||
};
|
||||
struct linux_pwrite_args {
|
||||
register_t dummy;
|
||||
int fd; char fd_[PAD_(int)];
|
||||
const char * buf; char buf_[PAD_(const char *)];
|
||||
size_t nbyte; char nbyte_[PAD_(size_t)];
|
||||
off_t offset; char offset_[PAD_(off_t)];
|
||||
};
|
||||
struct linux_chown_args {
|
||||
char * path; char path_[PAD_(char *)];
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp
|
||||
*/
|
||||
|
||||
#define LINUX_SYS_linux_setup 0
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* $FreeBSD$
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp
|
||||
* created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
@ -197,8 +197,8 @@ struct sysent linux_sysent[] = {
|
||||
{ 0, (sy_call_t *)linux_rt_sigtimedwait }, /* 177 = linux_rt_sigtimedwait */
|
||||
{ 0, (sy_call_t *)linux_rt_sigqueueinfo }, /* 178 = linux_rt_sigqueueinfo */
|
||||
{ AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend }, /* 179 = linux_rt_sigsuspend */
|
||||
{ 0, (sy_call_t *)linux_pread }, /* 180 = linux_pread */
|
||||
{ 0, (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */
|
||||
{ AS(linux_pread_args), (sy_call_t *)linux_pread }, /* 180 = linux_pread */
|
||||
{ AS(linux_pwrite_args), (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */
|
||||
{ AS(linux_chown_args), (sy_call_t *)linux_chown }, /* 182 = linux_chown */
|
||||
{ AS(linux_getcwd_args), (sy_call_t *)linux_getcwd }, /* 183 = linux_getcwd */
|
||||
{ 0, (sy_call_t *)linux_capget }, /* 184 = linux_capget */
|
||||
|
Loading…
Reference in New Issue
Block a user