summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-05-25 06:14:49 +0000
committerphk <phk@FreeBSD.org>1995-05-25 06:14:49 +0000
commit20051e5d380e59f5078ee3a7f8d1e4a4cd2d5404 (patch)
treea78a57ce1690294f3b5787163ea7f03cf8ec3132 /lib/libdisk
parent165302f7b199f2be0c8b7057dd05e1e3765614a0 (diff)
downloadFreeBSD-src-20051e5d380e59f5078ee3a7f8d1e4a4cd2d5404.zip
FreeBSD-src-20051e5d380e59f5078ee3a7f8d1e4a4cd2d5404.tar.gz
Remove Ontrack special from All_FreeBSD().
Add chunk->disk pointer.
Diffstat (limited to 'lib/libdisk')
-rw-r--r--lib/libdisk/change.c7
-rw-r--r--lib/libdisk/chunk.c7
-rw-r--r--lib/libdisk/libdisk.h3
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c
index 80ce1f2..0f39179 100644
--- a/lib/libdisk/change.c
+++ b/lib/libdisk/change.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: change.c,v 1.5 1995/05/01 04:05:23 phk Exp $
+ * $Id: change.c,v 1.6 1995/05/24 08:59:36 jkh Exp $
*
*/
@@ -55,10 +55,5 @@ All_FreeBSD(struct disk *d)
goto again;
}
c=d->chunks;
- if (d->flags & DISK_ON_TRACK) {
- c->offset += 63;
- c->part->offset += 63;
- d->flags &= ~DISK_ON_TRACK;
- }
Create_Chunk(d,c->offset,c->size,freebsd,0xa5,0);
}
diff --git a/lib/libdisk/chunk.c b/lib/libdisk/chunk.c
index c100927..fbf4b0e 100644
--- a/lib/libdisk/chunk.c
+++ b/lib/libdisk/chunk.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: chunk.c,v 1.11 1995/05/08 02:08:25 phk Exp $
+ * $Id: chunk.c,v 1.12 1995/05/11 05:22:49 phk Exp $
*
*/
@@ -114,6 +114,7 @@ Insert_Chunk(struct chunk *c2, u_long offset, u_long size, char *name, chunk_e t
ct = new_chunk();
if (!ct) err(1,"malloc failed");
memset(ct,0,sizeof *ct);
+ ct->disk = c2->disk;
ct->offset = offset;
ct->size = size;
ct->end = offset + size - 1;
@@ -131,6 +132,7 @@ Insert_Chunk(struct chunk *c2, u_long offset, u_long size, char *name, chunk_e t
cs = new_chunk();
if (!cs) err(1,"malloc failed");
memset(cs,0,sizeof *cs);
+ cs->disk = c2->disk;
cs->offset = offset;
cs->size = size;
cs->end = offset + size - 1;
@@ -144,6 +146,7 @@ Insert_Chunk(struct chunk *c2, u_long offset, u_long size, char *name, chunk_e t
cs = new_chunk();
if (!cs) err(1,"malloc failed");
*cs = *c2;
+ cs->disk = c2->disk;
cs->offset = ct->end + 1;
cs->size = c2->end - ct->end;
if(c2->name)
@@ -189,6 +192,7 @@ Add_Chunk(struct disk *d, long offset, u_long size, char *name, chunk_e type,
c2 = c1->part = new_chunk();
if (!c2) err(1,"malloc failed");
memset(c2,0,sizeof *c2);
+ c2->disk = c1->disk = d;
c2->offset = c1->offset = offset;
c2->size = c1->size = size;
c2->end = c1->end = end;
@@ -385,6 +389,7 @@ Collapse_Chunk(struct disk *d, struct chunk *c1)
if (!c2) err(1,"malloc failed");
*c2 = *c1;
c1->next = c2;
+ c1->disk = d;
c1->name = strdup("-");
c1->part = 0;
c1->type = unused;
diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h
index cdc966f..ebc4d83 100644
--- a/lib/libdisk/libdisk.h
+++ b/lib/libdisk/libdisk.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: libdisk.h,v 1.15 1995/05/10 05:57:03 phk Exp $
+ * $Id: libdisk.h,v 1.16 1995/05/12 18:49:58 phk Exp $
*
*/
@@ -44,6 +44,7 @@ struct disk {
struct chunk {
struct chunk *next;
struct chunk *part;
+ struct disk *disk;
long offset;
u_long size;
u_long end;
OpenPOWER on IntegriCloud