rpms/kernel/devel linux-2.6.3-printopen.patch,1.13,1.14

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Mar 22 23:35:36 UTC 2005


Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19220

Modified Files:
	linux-2.6.3-printopen.patch 
Log Message:
make atomic


linux-2.6.3-printopen.patch:
 linux-2.6.11/fs/namei.c            |   12 +++++
 linux-2.6.11/fs/open.c             |   88 ++++++++++++++++++++++++-------------
 linux-2999/fs/exec.c               |   10 ++++
 linux-2999/fs/namei.c              |    8 +++
 linux-2999/fs/open.c               |   11 ++++
 linux-2999/include/linux/jiffies.h |    2 
 6 files changed, 101 insertions(+), 30 deletions(-)

Index: linux-2.6.3-printopen.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6.3-printopen.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- linux-2.6.3-printopen.patch	22 Mar 2005 21:38:02 -0000	1.13
+++ linux-2.6.3-printopen.patch	22 Mar 2005 23:35:33 -0000	1.14
@@ -127,3 +127,77 @@
  	/* make sure the stuff we saved doesn't go away */
  	dget(save.dentry);
  	mntget(save.mnt);
+--- linux-2.6.11/fs/open.c~	2005-03-22 18:27:03.000000000 -0500
++++ linux-2.6.11/fs/open.c	2005-03-22 18:34:47.000000000 -0500
+@@ -954,37 +954,43 @@ asmlinkage long sys_open(const char __us
+ 			fd_install(fd, f);
+ 			{
+ 				static unsigned long prev_jiffies;
+-				static char buf[1024];
++				static char buf[512]=0;
++				static char buf2[256]=0;
++				int len=0;
+ 				char *p;
+ 				p = d_path(f->f_dentry, f->f_vfsmnt, buf, 1023);
+-				if (jiffies < 600 * HZ)
+-					printk(KERN_ERR "[%2d.%02d] [+%2d.%02d] %s open()'d %s flags:[", jiffies / HZ, jiffies % HZ,
+-					(jiffies-prev_jiffies)/HZ, (jiffies-prev_jiffies) % HZ,
+-					current->comm, p);
+-				if (flags & O_CREAT)
+-					printk (" O_CREAT");
+-				if (flags & O_EXCL)
+-					printk (" O_EXCL");
+-				if (flags & O_NOCTTY)
+-					printk (" O_NOCTTY");
+-				if (flags & O_TRUNC)
+-					printk (" O_TRUNC");
+-				if (flags & O_APPEND)
+-					printk (" O_APPEND");
+-				if (flags & O_NONBLOCK)
+-					printk (" O_NONBLOCK");
+-				if (flags & O_SYNC)
+-					printk (" O_SYNC");
+-				if (flags & O_NOFOLLOW)
+-					printk (" O_NOFOLLOW");
+-				if (flags & O_DIRECTORY)
+-					printk (" O_DIRECTORY");
+-				if (flags & O_DIRECT)
+-					printk (" O_DIRECT");
+-				if (flags & O_LARGEFILE)
+-					printk (" O_LARGEFILE");
++				if (jiffies < 600 * HZ) {
++					len = sprintf(buf2+len, "[%2d.%02d] ", (jiffies-prev_jiffies)/HZ, (jiffies-prev_jiffies) % HZ);
++					len += sprintf(buf2+len "[+%2d.%02d] " ,jiffies / HZ, jiffies % HZ);
++					len += sprintf(buf2+len, "%s open()'d %s flags:[", command->comm, p);
++			
++					if (flags & O_CREAT)
++						len+= sprintf(buf2+len, "%s", " O_CREAT");
++					if (flags & O_EXCL)
++						len+= sprintf(buf2+len, "%s", " O_EXCL");
++					if (flags & O_NOCTTY)
++						len+= sprintf(buf2+len, "%s", " O_NOCTTY");
++					if (flags & O_TRUNC)
++						len+= sprintf(buf2+len, "%s", " O_TRUNC");
++					if (flags & O_APPEND)
++						len+= sprintf(buf2+len, "%s", " O_APPEND");
++					if (flags & O_NONBLOCK)
++						len+= sprintf(buf2+len, "%s", " O_NONBLOCK");
++					if (flags & O_SYNC)
++						len+= sprintf(buf2+len, "%s", " O_SYNC");
++					if (flags & O_NOFOLLOW)
++						len+= sprintf(buf2+len, "%s", " O_NOFOLLOW");
++					if (flags & O_DIRECTORY)
++						len+= sprintf(buf2+len, "%s", " O_DIRECTORY");
++					if (flags & O_DIRECT)
++						len+= sprintf(buf2+len, "%s", " O_DIRECT");
++					if (flags & O_LARGEFILE)
++						len+= sprintf(buf2+len, "%s", " O_LARGEFILE");
+ 
+-				printk(" ] mode: %x\n", mode);
++					sprintf(buf2+len, " ] mode: %x\n", mode);
++
++					printk (KERN_ERR "%s\n", buf2);
++				}
+ 				prev_jiffies = jiffies;
+ 			}
+ 		}




More information about the fedora-cvs-commits mailing list