Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Add compat_10, open NULL == open "."



details:   https://anonhg.NetBSD.org/src/rev/9e769d325416
branches:  trunk
changeset: 793059:9e769d325416
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 25 17:24:45 2014 +0000

description:
Add compat_10, open NULL == open "."

diffstat:

 sys/kern/vfs_syscalls.c |  17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r de5abf7e2e53 -r 9e769d325416 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Sat Jan 25 17:21:49 2014 +0000
+++ b/sys/kern/vfs_syscalls.c   Sat Jan 25 17:24:45 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.474 2014/01/25 02:28:31 christos Exp $      */
+/*     $NetBSD: vfs_syscalls.c,v 1.475 2014/01/25 17:24:45 christos Exp $      */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.474 2014/01/25 02:28:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.475 2014/01/25 17:24:45 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -1623,9 +1623,16 @@
        struct pathbuf *pb;
        int error;
 
-       error = pathbuf_copyin(path, &pb);
-       if (error)
-               return error;
+#ifdef COMPAT_10       /* XXX: and perhaps later */
+       if (path == NULL)
+               pb = pathbuf_create(".");
+       else
+#endif
+       {
+               error = pathbuf_copyin(path, &pb);
+               if (error)
+                       return error;
+       }
 
        if (fdat != AT_FDCWD) {
                /* fd_getvnode() will use the descriptor for us */



Home | Main Index | Thread Index | Old Index