Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Make all creation operations (mkdir, create, mknod ...



details:   https://anonhg.NetBSD.org/src/rev/cb2c954f3d2a
branches:  trunk
changeset: 583929:cb2c954f3d2a
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Tue Aug 30 09:37:41 2005 +0000

description:
Make all creation operations (mkdir, create, mknod and symlink) consistent
by changing the symlink one to set vap's vatype to VLNK.  All the other three
already set vatype to the correct type.  Note that, however, in the mkdir
case (and now symlink too) this is not strictly necessary.

diffstat:

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

diffs (26 lines):

diff -r 33566b42570b -r cb2c954f3d2a sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Mon Aug 29 23:57:35 2005 +0000
+++ b/sys/kern/vfs_syscalls.c   Tue Aug 30 09:37:41 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.229 2005/08/19 12:30:02 elad Exp $  */
+/*     $NetBSD: vfs_syscalls.c,v 1.230 2005/08/30 09:37:41 jmmv Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.229 2005/08/19 12:30:02 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.230 2005/08/30 09:37:41 jmmv Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
@@ -1659,6 +1659,7 @@
                goto restart;
        }
        VATTR_NULL(&vattr);
+       vattr.va_type = VLNK;
        vattr.va_mode = ACCESSPERMS &~ p->p_cwdi->cwdi_cmask;
        VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
        error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, path);



Home | Main Index | Thread Index | Old Index