From 538e4c7fd4174d7f9d142e593596d6d5a7dc62e0 Mon Sep 17 00:00:00 2001 From: marcel 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/linux/linux_file.c') diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index c27f1c9..e3d411c 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.1