mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Implementation of the linux_getcwd syscall.
This commit is contained in:
parent
e000c53684
commit
81d960fa6d
5 changed files with 50 additions and 6 deletions
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.28 1999/08/12 19:53:32 marcel Exp $
|
||||
* $Id: linux_file.c,v 1.29 1999/08/13 09:27:54 marcel Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
|
|
@ -849,3 +849,18 @@ linux_link(struct proc *p, struct linux_link_args *args)
|
|||
|
||||
return link(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_getcwd(struct proc *p, struct linux_getcwd_args *args)
|
||||
{
|
||||
struct __getcwd_args bsd;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): getcwd(%p, %ld)\n",
|
||||
p->p_pid, args->buf, args->bufsize);
|
||||
#endif
|
||||
|
||||
bsd.buf = args->buf;
|
||||
bsd.buflen = args->bufsize;
|
||||
return __getcwd(p, &bsd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_file.c,v 1.28 1999/08/12 19:53:32 marcel Exp $
|
||||
* $Id: linux_file.c,v 1.29 1999/08/13 09:27:54 marcel Exp $
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
|
|
@ -849,3 +849,18 @@ linux_link(struct proc *p, struct linux_link_args *args)
|
|||
|
||||
return link(p, &bsd);
|
||||
}
|
||||
|
||||
int
|
||||
linux_getcwd(struct proc *p, struct linux_getcwd_args *args)
|
||||
{
|
||||
struct __getcwd_args bsd;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Linux-emul(%d): getcwd(%p, %ld)\n",
|
||||
p->p_pid, args->buf, args->bufsize);
|
||||
#endif
|
||||
|
||||
bsd.buf = args->buf;
|
||||
bsd.buflen = args->bufsize;
|
||||
return __getcwd(p, &bsd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* System call prototypes.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from Id: syscalls.master,v 1.19 1999/08/14 17:14:13 marcel Exp
|
||||
* created from Id: syscalls.master,v 1.20 1999/08/14 18:19:00 marcel Exp
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SYSPROTO_H_
|
||||
|
|
@ -411,6 +411,10 @@ struct linux_chown_args {
|
|||
int uid; char uid_[PAD_(int)];
|
||||
int gid; char gid_[PAD_(int)];
|
||||
};
|
||||
struct linux_getcwd_args {
|
||||
char * buf; char buf_[PAD_(char *)];
|
||||
unsigned long bufsize; char bufsize_[PAD_(unsigned long)];
|
||||
};
|
||||
int linux_setup __P((struct proc *, struct linux_setup_args *));
|
||||
int linux_fork __P((struct proc *, struct linux_fork_args *));
|
||||
int linux_open __P((struct proc *, struct linux_open_args *));
|
||||
|
|
@ -514,6 +518,7 @@ int linux_mremap __P((struct proc *, struct linux_mremap_args *));
|
|||
int linux_rt_sigaction __P((struct proc *, struct linux_rt_sigaction_args *));
|
||||
int linux_rt_sigprocmask __P((struct proc *, struct linux_rt_sigprocmask_args *));
|
||||
int linux_chown __P((struct proc *, struct linux_chown_args *));
|
||||
int linux_getcwd __P((struct proc *, struct linux_getcwd_args *));
|
||||
|
||||
#ifdef COMPAT_43
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from Id: syscalls.master,v 1.19 1999/08/14 17:14:13 marcel Exp
|
||||
* created from Id: syscalls.master,v 1.20 1999/08/14 18:19:00 marcel Exp
|
||||
*/
|
||||
|
||||
#define LINUX_SYS_linux_setup 0
|
||||
|
|
@ -166,4 +166,5 @@
|
|||
#define LINUX_SYS_linux_rt_sigaction 174
|
||||
#define LINUX_SYS_linux_rt_sigprocmask 175
|
||||
#define LINUX_SYS_linux_chown 182
|
||||
#define LINUX_SYS_MAXSYSCALL 183
|
||||
#define LINUX_SYS_linux_getcwd 183
|
||||
#define LINUX_SYS_MAXSYSCALL 191
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* System call switch table.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from Id: syscalls.master,v 1.19 1999/08/14 17:14:13 marcel Exp
|
||||
* created from Id: syscalls.master,v 1.20 1999/08/14 18:19:00 marcel Exp
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
|
|
@ -197,4 +197,12 @@ struct sysent linux_sysent[] = {
|
|||
{ 0, (sy_call_t *)nosys }, /* 180 = pread */
|
||||
{ 0, (sy_call_t *)nosys }, /* 181 = pwrite */
|
||||
{ 3, (sy_call_t *)linux_chown }, /* 182 = linux_chown */
|
||||
{ 2, (sy_call_t *)linux_getcwd }, /* 183 = linux_getcwd */
|
||||
{ 0, (sy_call_t *)nosys }, /* 184 = capget */
|
||||
{ 0, (sy_call_t *)nosys }, /* 185 = capset */
|
||||
{ 0, (sy_call_t *)nosys }, /* 186 = sigaltstack */
|
||||
{ 0, (sy_call_t *)nosys }, /* 187 = sendfile */
|
||||
{ 0, (sy_call_t *)nosys }, /* 188 = getpmsg */
|
||||
{ 0, (sy_call_t *)nosys }, /* 189 = putpmsg */
|
||||
{ 0, (sy_call_t *)nosys }, /* 190 = vfork */
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue