summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-08-14 18:20:44 +0000
committermarcel <marcel@FreeBSD.org>1999-08-14 18:20:44 +0000
commit538e4c7fd4174d7f9d142e593596d6d5a7dc62e0 (patch)
tree9563a60ce17de310327348eecae8ae9d882ccfd1 /sys/i386/linux
parentb3249a427e2ad828e9516e20fb574b5ce61c32de (diff)
downloadFreeBSD-src-538e4c7fd4174d7f9d142e593596d6d5a7dc62e0.zip
FreeBSD-src-538e4c7fd4174d7f9d142e593596d6d5a7dc62e0.tar.gz
Implementation of the linux_getcwd syscall.
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/linux_file.c17
-rw-r--r--sys/i386/linux/linux_proto.h7
-rw-r--r--sys/i386/linux/linux_syscall.h5
-rw-r--r--sys/i386/linux/linux_sysent.c10
4 files changed, 34 insertions, 5 deletions
diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c
index c27f1c9..e3d411c 100644
--- a/sys/i386/linux/linux_file.c
+++ b/sys/i386/linux/linux_file.c
@@ -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);
+}
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index 78b66e8..be5bc9f 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -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
diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h
index a893f91..9948e9a 100644
--- a/sys/i386/linux/linux_syscall.h
+++ b/sys/i386/linux/linux_syscall.h
@@ -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
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index f8f2b7e..8ed6d78 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -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 */
};
OpenPOWER on IntegriCloud