[Tux3] Patch : Changes to tuxio()

Chinmay Kamat chinmaykamat at gmail.com
Thu Jan 22 11:52:39 PST 2009


The patch seemed to have wrapped.
Made changes to tuxio() to mark buffer dirty only on writes. Also changed 
printf to trace_off and commented the hexdump.

diff -r 7fb52abf2f30 user/inode.c
--- a/user/inode.c	Thu Jan 22 00:36:36 2009 -0800
+++ b/user/inode.c	Fri Jan 23 00:49:14 2009 +0530
@@ -86,13 +86,15 @@
 			err = -EIO;
 			break;
 		}
-		if (write)
+		if (write){
+			mark_buffer_dirty(buffer);
 			memcpy(bufdata(buffer) + from, data, some);
+		}
 		else
 			memcpy(data, bufdata(buffer) + from, some);
-		printf("transfer %u bytes, block 0x%Lx, buffer %p\n", some, (L)bufindex(buffer), buffer);
-		hexdump(bufdata(buffer) + from, some);
-		brelse_dirty(buffer);
+		trace_off("transfer %u bytes, block 0x%Lx, buffer %p\n", some, (L)bufindex(buffer), buffer);
+		//hexdump(bufdata(buffer) + from, some);
+		brelse(buffer);
 		tail -= some;
 		data += some;
 		pos += some;

Regards,
Chinmay Kamat
Kushal Dalmia
Gaurav Tungatkar
Amey Magar

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list