Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110000175
D17805.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D17805.diff
View Options
Index: head/share/man/man9/VOP_CREATE.9
===================================================================
--- head/share/man/man9/VOP_CREATE.9
+++ head/share/man/man9/VOP_CREATE.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 24, 1996
+.Dd November 2, 2018
.Dt VOP_CREATE 9
.Os
.Sh NAME
@@ -48,7 +48,7 @@
.Ft int
.Fn VOP_MKDIR "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap"
.Ft int
-.Fn VOP_SYMLINK "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" "char *target"
+.Fn VOP_SYMLINK "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" "const char *target"
.Sh DESCRIPTION
These entry points create a new file, socket, fifo, device, directory or symlink
in a given directory.
Index: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
===================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -5314,7 +5314,7 @@
vattr_init_mask(vap);
return (zfs_symlink(ap->a_dvp, ap->a_vpp, cnp->cn_nameptr, vap,
- ap->a_target, cnp->cn_cred, cnp->cn_thread));
+ __DECONST(char *, ap->a_target), cnp->cn_cred, cnp->cn_thread));
}
static int
Index: head/sys/fs/ext2fs/ext2_vnops.c
===================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c
+++ head/sys/fs/ext2fs/ext2_vnops.c
@@ -1521,8 +1521,8 @@
ip->i_size = len;
ip->i_flag |= IN_CHANGE | IN_UPDATE;
} else
- error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
+ error = vn_rdwr(UIO_WRITE, vp, __DECONST(void *, ap->a_target),
+ len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
if (error)
vput(vp);
Index: head/sys/fs/fuse/fuse_vnops.c
===================================================================
--- head/sys/fs/fuse/fuse_vnops.c
+++ head/sys/fs/fuse/fuse_vnops.c
@@ -1708,7 +1708,7 @@
struct vnode *dvp = ap->a_dvp;
struct vnode **vpp = ap->a_vpp;
struct componentname *cnp = ap->a_cnp;
- char *target = ap->a_target;
+ const char *target = ap->a_target;
struct fuse_dispatcher fdi;
Index: head/sys/fs/nandfs/nandfs_vnops.c
===================================================================
--- head/sys/fs/nandfs/nandfs_vnops.c
+++ head/sys/fs/nandfs/nandfs_vnops.c
@@ -1939,8 +1939,8 @@
len = strlen(ap->a_target);
- error = vn_rdwr(UIO_WRITE, *vpp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
+ error = vn_rdwr(UIO_WRITE, *vpp, __DECONST(void *, ap->a_target),
+ len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
cnp->cn_cred, NOCRED, NULL, NULL);
if (error)
vput(*vpp);
Index: head/sys/fs/nfs/nfs_var.h
===================================================================
--- head/sys/fs/nfs/nfs_var.h
+++ head/sys/fs/nfs/nfs_var.h
@@ -474,7 +474,7 @@
int nfsrpc_link(vnode_t, vnode_t, char *, int,
struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
int *, int *, void *);
-int nfsrpc_symlink(vnode_t, char *, int, char *, struct vattr *,
+int nfsrpc_symlink(vnode_t, char *, int, const char *, struct vattr *,
struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *,
struct nfsfh **, int *, int *, void *);
int nfsrpc_mkdir(vnode_t, char *, int, struct vattr *,
Index: head/sys/fs/nfsclient/nfs_clrpcops.c
===================================================================
--- head/sys/fs/nfsclient/nfs_clrpcops.c
+++ head/sys/fs/nfsclient/nfs_clrpcops.c
@@ -2627,7 +2627,7 @@
* nfs symbolic link create rpc
*/
APPLESTATIC int
-nfsrpc_symlink(vnode_t dvp, char *name, int namelen, char *target,
+nfsrpc_symlink(vnode_t dvp, char *name, int namelen, const char *target,
struct vattr *vap, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap,
struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp,
int *dattrflagp, void *dstuff)
Index: head/sys/fs/tmpfs/tmpfs.h
===================================================================
--- head/sys/fs/tmpfs/tmpfs.h
+++ head/sys/fs/tmpfs/tmpfs.h
@@ -411,7 +411,7 @@
void tmpfs_ref_node_locked(struct tmpfs_node *node);
int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype,
uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *,
- char *, dev_t, struct tmpfs_node **);
+ const char *, dev_t, struct tmpfs_node **);
void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *);
bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool);
void tmpfs_free_tmp(struct tmpfs_mount *);
@@ -424,7 +424,7 @@
struct vnode **);
void tmpfs_free_vp(struct vnode *);
int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *,
- struct componentname *, char *);
+ struct componentname *, const char *);
void tmpfs_check_mtime(struct vnode *);
void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *);
void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *);
Index: head/sys/fs/tmpfs/tmpfs_subr.c
===================================================================
--- head/sys/fs/tmpfs/tmpfs_subr.c
+++ head/sys/fs/tmpfs/tmpfs_subr.c
@@ -182,7 +182,7 @@
int
tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type,
uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *parent,
- char *target, dev_t rdev, struct tmpfs_node **node)
+ const char *target, dev_t rdev, struct tmpfs_node **node)
{
struct tmpfs_node *nnode;
vm_object_t obj;
@@ -717,7 +717,7 @@
*/
int
tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap,
- struct componentname *cnp, char *target)
+ struct componentname *cnp, const char *target)
{
int error;
struct tmpfs_dirent *de;
Index: head/sys/fs/tmpfs/tmpfs_vnops.c
===================================================================
--- head/sys/fs/tmpfs/tmpfs_vnops.c
+++ head/sys/fs/tmpfs/tmpfs_vnops.c
@@ -1176,7 +1176,7 @@
struct vnode **vpp = v->a_vpp;
struct componentname *cnp = v->a_cnp;
struct vattr *vap = v->a_vap;
- char *target = v->a_target;
+ const char *target = v->a_target;
#ifdef notyet /* XXX FreeBSD BUG: kern_symlink is not setting VLNK */
MPASS(vap->va_type == VLNK);
Index: head/sys/kern/vnode_if.src
===================================================================
--- head/sys/kern/vnode_if.src
+++ head/sys/kern/vnode_if.src
@@ -325,7 +325,7 @@
OUT struct vnode **vpp;
IN struct componentname *cnp;
IN struct vattr *vap;
- IN char *target;
+ IN const char *target;
};
Index: head/sys/sys/param.h
===================================================================
--- head/sys/sys/param.h
+++ head/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300002 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300003 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
Index: head/sys/ufs/ufs/ufs_vnops.c
===================================================================
--- head/sys/ufs/ufs/ufs_vnops.c
+++ head/sys/ufs/ufs/ufs_vnops.c
@@ -2095,7 +2095,7 @@
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
- char *a_target;
+ const char *a_target;
} */ *ap;
{
struct vnode *vp, **vpp = ap->a_vpp;
@@ -2116,8 +2116,8 @@
ip->i_flag |= IN_CHANGE | IN_UPDATE;
error = UFS_UPDATE(vp, 0);
} else
- error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
+ error = vn_rdwr(UIO_WRITE, vp, __DECONST(void *, ap->a_target),
+ len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
if (error)
vput(vp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 13, 7:11 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16624413
Default Alt Text
D17805.diff (7 KB)
Attached To
Mode
D17805: Make vop_symlink take a const target path.
Attached
Detach File
Event Timeline
Log In to Comment