[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two bugs fixed in ramfs 1.4



Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:

|> Everyone should apply this patch as soon as possible :-/

[broken patch deleted]

Sorry, this was *wrong*, it replaced a bug with another :-|
This should be correct: (btw., quite interesting, on the proc fs the
end of the file is the same as the beginning...)

diff -ur orig/procfs.c ./procfs.c
--- orig/procfs.c	Tue Aug 17 21:23:26 1993
+++ ./procfs.c	Tue Nov 30 18:14:36 1993
@@ -690,13 +690,11 @@
 {
 	switch(whence) {
 	case 0:
+	case 2:
 		f->pos = where;
 		break;
 	case 1:
 		f->pos += where;
-		break;
-	case 2:
-		f->pos = -where;
 		break;
 	default:
 		return EINVFN;
diff -ur orig/shmfs.c ./shmfs.c
--- orig/shmfs.c	Fri Jun 25 22:23:36 1993
+++ ./shmfs.c	Tue Nov 30 18:14:30 1993
@@ -656,7 +656,7 @@
 		newpos = f->pos + where;
 		break;
 	case 2:
-		newpos = maxpos - where;
+		newpos = maxpos + where;
 		break;
 	default:
 		return EINVFN;