patch-2.3.22 linux/fs/binfmt_aout.c

Next file: linux/fs/buffer.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.21/linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
@@ -270,6 +270,7 @@
 	unsigned long fd_offset;
 	unsigned long rlim;
 	int retval;
+	static unsigned long error_time=0;
 
 	ex = *((struct exec *) bprm->buf);		/* exec-header */
 	if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
@@ -283,7 +284,11 @@
 
 #ifdef __i386__
 	if (N_MAGIC(ex) == ZMAGIC && fd_offset != BLOCK_SIZE) {
-		printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h.\n");
+		if((jiffies-error_time) >5)
+		{
+			printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h.\n");
+			error_time=jiffies;
+		}
 		return -ENOEXEC;
 	}
 
@@ -291,7 +296,11 @@
 	    bprm->dentry->d_inode->i_op &&
 	    bprm->dentry->d_inode->i_op->get_block &&
 	    (fd_offset < bprm->dentry->d_inode->i_sb->s_blocksize)) {
-		printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n");
+		if((jiffies-error_time) >5)
+		{
+			printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n");
+			error_time=jiffies;
+		}
 		return -ENOEXEC;
 	}
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)