~kris/9p

9hist

09734734a10deb488f74a5ef2766a4cbf4d7e12d — David du Colombier 30 years ago 75de308
Plan 9 from Bell Labs 1995-12-19
2 files changed, 11 insertions(+), 6 deletions(-)

M pc/devata.c
M pc/main.c
M pc/devata.c => pc/devata.c +6 -1
@@ 1392,15 1392,18 @@ atapart(Drive *dp)
		 *  we still check if there is a valid partition table in
		 *  the last sector if none is found in the second last.
		 */
		ataxfer(dp, &dp->p[0], Cread, dp->p[0].end-1, dp->bytes, buf);
print("R%d|", dp->p[0].end-2);
		ataxfer(dp, &dp->p[0], Cread, dp->p[0].end-2, dp->bytes, buf);
		buf[dp->bytes-1] = 0;
		n = getfields((char*)buf, line, Npart+1, "\n");
		if(n > 0 && strncmp(line[0], PARTMAGIC, sizeof(PARTMAGIC)-1) == 0){
			dp->p[0].end--;
			dp->p[1].start--;
			dp->p[1].end--;
print("OK%d|", dp->p[1].start);
		}
		else{
print("r%d|", dp->p[1].start);
			ataxfer(dp, &dp->p[1], Cread, 0, dp->bytes, buf);
			buf[dp->bytes-1] = 0;
			n = getfields((char*)buf, line, Npart+1, "\n");


@@ 1408,7 1411,9 @@ atapart(Drive *dp)
				dp->p[0].end--;
				dp->p[1].start--;
				dp->p[1].end--;
print("nok%d|", dp->p[1].start);
			}
else print("ok%d|", dp->p[1].start);
		}
	}
	else{

M pc/main.c => pc/main.c +5 -5
@@ 338,18 338,18 @@ romscan(void)
			p += p[2]*512;
			continue;
		}
		p[0] = 0xff;
		p[2048-1] = 0xff;
		if(p[0] == 0xff && p[2048-1] == 0xff)
		p[0] = 0xCC;
		p[2048-1] = 0xCC;
		if(p[0] != 0xCC && p[2048-1] != 0xCC)
			putisa(PADDR(p), 2048);
		p += 2048;
	}

	p = (uchar*)(KZERO+0xE0000);
	if(p[0] != 0x55 || p[1] != 0xAA){
		p[0] = 0xff;
		p[0] = 0xCC;
		p[64*1024-1] = 0xff;
		if(p[0] == 0xff && p[64*1024-1] == 0xff)
		if(p[0] != 0xCC && p[64*1024-1] != 0xCC)
			putisa(PADDR(p), 64*1024);
	}
}