From a44b517be8414d40bcd2b80740c6ed49e37fd50e Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 21 Dec 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-12-21 --- pc/devata.c | 27 +++++++++++---------------- port/devssl.c | 2 +- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/pc/devata.c b/pc/devata.c index 7021974439fcb8a9711c5baa5d32eb8a4683f0b2..2ddbf9d47710551ec493f3ed46889f85a7465824 100644 --- a/pc/devata.c +++ b/pc/devata.c @@ -1392,28 +1392,23 @@ 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. */ -print("R%d|", dp->p[0].end-2); - ataxfer(dp, &dp->p[0], Cread, dp->p[0].end-2, dp->bytes, buf); + i = 0; + ataxfer(dp, &dp->p[0], Cread, (dp->p[0].end-2)*dp->bytes, 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); - } + if(n > 0 && strncmp(line[0], PARTMAGIC, sizeof(PARTMAGIC)-1) == 0) + i = 1; 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"); - if(n == 0 || strncmp(line[0], PARTMAGIC, sizeof(PARTMAGIC)-1)){ - 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); + if(n == 0 || strncmp(line[0], PARTMAGIC, sizeof(PARTMAGIC)-1)) + i = 1; + } + if(i){ + dp->p[0].end--; + dp->p[1].start--; + dp->p[1].end--; } } else{ diff --git a/port/devssl.c b/port/devssl.c index 0633dee1111f5be333a63b1cd30aea47d8e3e960..63f0ac975fbb4a1a6bf601e590db3ce488368f85 100644 --- a/port/devssl.c +++ b/port/devssl.c @@ -73,7 +73,7 @@ enum{ Qclone, }; Dirtab digesttab[]={ - "digestclone", {Qclone, 0}, 0, 0600, + "ssl", {Qclone, 0}, 0, 0600, }; #define Ndigesttab (sizeof(digesttab)/sizeof(Dirtab))