PERFORCE change 163886 for review

Zhao Shuai zhaoshuai at FreeBSD.org
Tue Jun 9 11:17:03 UTC 2009


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

Change 163886 by zhaoshuai at zhaoshuai on 2009/06/09 11:16:08

	fix a bug in fifo_read/write_f(), the 4th argument of generic_pipe_read/write
	is file flag.

Affected files ...

.. //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#12 edit
.. //depot/projects/soc2009/fifo/sys/kern/sys_pipe.c#12 edit

Differences ...

==== //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#12 (text+ko) ====

@@ -394,7 +394,8 @@
 
 	struct fifoinfo *fip = fp->f_data;
 
-	return (generic_pipe_read(fip->fi_rpipe, uio, cred, flags, td));
+	/* The 4th argument of generic_pipe_read is file flag */
+	return (generic_pipe_read(fip->fi_rpipe, uio, cred, fp->f_flag, td));
 }
 
 static int
@@ -403,7 +404,8 @@
 
 	struct fifoinfo *fip = fp->f_data;
 
-	return (generic_pipe_write(fip->fi_wpipe, uio, cred, flags, td));
+	/* The 4th argument of generic_pipe_write is file flag */
+	return (generic_pipe_write(fip->fi_wpipe, uio, cred, fp->f_flag, td));
 }
 
 static int

==== //depot/projects/soc2009/fifo/sys/kern/sys_pipe.c#12 (text+ko) ====

@@ -138,6 +138,7 @@
 
 	struct pipe *pipe = fp->f_data;
 
+	/* The 4th arguments of generic_pipe_read is file flag */
   	return generic_pipe_read(pipe, uio, active_cred, fp->f_flag, td);
 }
 
@@ -148,6 +149,7 @@
 
 	struct pipe *pipe = fp->f_data;
 
+	/* The 4th arguments of generic_pipe_write is file flag */
 	return generic_pipe_write(pipe, uio, active_cred, fp->f_flag, td);
 }
 


More information about the p4-projects mailing list