PERFORCE change 122635 for review

Peter Wemm peter at FreeBSD.org
Sun Jul 1 10:49:42 UTC 2007


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

Change 122635 by peter at peter_melody on 2007/07/01 10:49:28

	Invert wrappers.

Affected files ...

.. //depot/projects/hammer/sys/kern/sys_generic.c#33 edit
.. //depot/projects/hammer/sys/kern/vfs_syscalls.c#70 edit
.. //depot/projects/hammer/sys/vm/vm_mmap.c#43 edit

Differences ...

==== //depot/projects/hammer/sys/kern/sys_generic.c#33 (text+ko) ====

@@ -142,20 +142,21 @@
 	return(error);
 }
 
+#ifdef COMPAT_FREEBSD6
 int
-_new_pread(td, uap)
+freebsd6_pread(td, uap)
 	struct thread *td;
-	struct _new_pread_args *uap;
+	struct freebsd6_pread_args *uap;
 {
 	struct pread_args oargs;
 
 	oargs.fd = uap->fd;
 	oargs.buf = uap->buf;
 	oargs.nbyte = uap->nbyte;
-	oargs.pad = 0;
 	oargs.offset = uap->offset;
 	return (pread(td, &oargs));
 }
+#endif
 
 /*
  * Scatter read system call.
@@ -352,20 +353,21 @@
 	return(error);
 }
 
+#ifdef COMPAT_FREEBSD6
 int
-_new_pwrite(td, uap)
+freebsd6_pwrite(td, uap)
 	struct thread *td;
-	struct _new_pwrite_args *uap;
+	struct freebsd6_pwrite_args *uap;
 {
 	struct pwrite_args oargs;
 
 	oargs.fd = uap->fd;
 	oargs.buf = uap->buf;
 	oargs.nbyte = uap->nbyte;
-	oargs.pad = 0;
 	oargs.offset = uap->offset;
 	return (pwrite(td, &oargs));
 }
+#endif
 
 /*
  * Gather write system call.

==== //depot/projects/hammer/sys/kern/vfs_syscalls.c#70 (text+ko) ====

@@ -1793,20 +1793,21 @@
 }
 #endif /* COMPAT_43 */
 
-/* Skip the 'pad' argument */
+#if defined(COMPAT_FREEBSD6)
+/* Ignore the 'pad' argument */
 int
-_new_lseek(td, uap)
+freebsd6_lseek(td, uap)
 	struct thread *td;
-	register struct _new_lseek_args *uap;
+	register struct freebsd6_lseek_args *uap;
 {
 	struct lseek_args ouap;
 
 	ouap.fd = uap->fd;
-	ouap.pad = 0;
 	ouap.offset = uap->offset;
 	ouap.whence = uap->whence;
 	return (lseek(td, &ouap));
 }
+#endif
 
 /*
  * Check access permissions using passed credentials.
@@ -3238,32 +3239,32 @@
 }
 #endif /* COMPAT_43 */
 
+#if defined(COMPAT_FREEBSD6)
 /* Versions without the pad argument */
 int
-_new_truncate(td, uap)
+freebsd6_truncate(td, uap)
 	struct thread *td;
-	register struct _new_truncate_args *uap;
+	register struct freebsd6_truncate_args *uap;
 {
 	struct truncate_args ouap;
 
 	ouap.path = uap->path;
-	ouap.pad = 0;
 	ouap.length = uap->length;
 	return (truncate(td, &ouap));
 }
 
 int
-_new_ftruncate(td, uap)
+freebsd6_ftruncate(td, uap)
 	struct thread *td;
-	register struct _new_ftruncate_args *uap;
+	register struct freebsd6_ftruncate_args *uap;
 {
 	struct ftruncate_args ouap;
 
 	ouap.fd = uap->fd;
-	ouap.pad = 0;
 	ouap.length = uap->length;
 	return (ftruncate(td, &ouap));
 }
+#endif
 
 /*
  * Sync an open file.

==== //depot/projects/hammer/sys/vm/vm_mmap.c#43 (text+ko) ====

@@ -392,10 +392,11 @@
 	return (error);
 }
 
+#ifdef COMPAT_FREEBSD6
 int
-_new_mmap(td, uap)
+freebsd6_mmap(td, uap)
 	struct thread *td;
-	struct _new_mmap_args *uap;
+	struct freebsd6_mmap_args *uap;
 {
 	struct mmap_args oargs;
 
@@ -404,10 +405,10 @@
 	oargs.prot = uap->prot;
 	oargs.flags = uap->flags;
 	oargs.fd = uap->fd;
-	oargs.pad = 0;
 	oargs.pos = uap->pos;
 	return (mmap(td, &oargs));
 }
+#endif
 
 #ifdef COMPAT_43
 #ifndef _SYS_SYSPROTO_H_


More information about the p4-projects mailing list