PERFORCE change 41699 for review

Chris Vance cvance at FreeBSD.org
Sat Nov 8 02:22:29 GMT 2003


http://perforce.freebsd.org/chv.cgi?CH=41699

Change 41699 by cvance at cvance_osx_laptop on 2003/11/07 18:21:55

	On Darwin, you can't pass NULL as the last argument to copyinstr.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_syscalls.c#7 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_syscalls.c#7 (text+ko) ====

@@ -3982,6 +3982,7 @@
 	struct nameidata nd;
 	struct mount *mp, *mp_writable;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
 	/*
@@ -3990,7 +3991,7 @@
 	 */
 	if (uap->attrname != NULL) {
 		error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN,
-		    NULL);
+		    &dummy);
 		if (error)
 			return (error);
 	}
@@ -4112,9 +4113,10 @@
 {
 	struct file *fp;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4144,9 +4146,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4178,9 +4181,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4291,9 +4295,10 @@
 {
 	struct file *fp;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4323,9 +4328,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4357,9 +4363,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4431,9 +4438,10 @@
 	struct file *fp;
 	struct vnode *vp;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return (error);
 
@@ -4460,9 +4468,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return(error);
 
@@ -4491,9 +4500,10 @@
 {
 	struct nameidata nd;
 	char attrname[EXTATTR_MAXNAMELEN];
+	size_t dummy;
 	int error;
 
-	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, NULL);
+	error = copyinstr(uap->attrname, attrname, EXTATTR_MAXNAMELEN, &dummy);
 	if (error)
 		return(error);
 
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list