From 81d960fa6d17ec93eb2e515a2db045947b2e315c Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 14 Aug 1999 18:20:44 +0000 Subject: Implementation of the linux_getcwd syscall. --- sys/compat/linux/linux_file.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'sys/compat') diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index c27f1c9e49cc6..e3d411cf763b8 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/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); +} -- cgit v1.3