diff options
author | phk <phk@FreeBSD.org> | 1995-04-30 11:04:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-04-30 11:04:16 +0000 |
commit | 207cc9aa1b7958de0f80495004bef9a3d7cd67bd (patch) | |
tree | e2d59f880d13ec0362f8f6337a1f6cb182b43c1a /release/libdisk/write_disk.c | |
parent | 5eb0a0c02bef0c30ced9bca8f78a0f78c3febe1b (diff) | |
download | FreeBSD-src-207cc9aa1b7958de0f80495004bef9a3d7cd67bd.zip FreeBSD-src-207cc9aa1b7958de0f80495004bef9a3d7cd67bd.tar.gz |
get bootblocks right.
Add mbr and bteasy17 to tst01
read partitions from kernel instead of disk.
Still problems with writing labels, discussing with Bruce.
Extended slices doesn't get written yet.
Diffstat (limited to 'release/libdisk/write_disk.c')
-rw-r--r-- | release/libdisk/write_disk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/release/libdisk/write_disk.c b/release/libdisk/write_disk.c index 51e4e4a..d4d1c8a 100644 --- a/release/libdisk/write_disk.c +++ b/release/libdisk/write_disk.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: write_disk.c,v 1.2 1995/04/30 06:09:29 phk Exp $ + * $Id: write_disk.c,v 1.3 1995/04/30 07:30:45 phk Exp $ * */ @@ -64,6 +64,7 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1) } dl->d_partitions[j].p_size = c2->size; dl->d_partitions[j].p_offset = c2->offset - c1->offset; + dl->d_partitions[j].p_fstype = c2->subtype; } @@ -71,10 +72,12 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1) strcpy(dl->d_typename,c1->name); + dl->d_secsize = 512; dl->d_secperunit = new->chunks->size; dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl; dl->d_ntracks = new->real_hd ? new->real_hd : new->bios_hd; dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect; + dl->d_secpercyl = dl->d_ntracks * dl->d_nsectors; dl->d_npartitions = MAXPARTITIONS; @@ -97,7 +100,6 @@ int Write_Extended(int fd, struct disk *new, struct disk *old, struct chunk *c1) { printf("--> Write_Extended()\n"); - Print_Chunk(c1); return 0; } @@ -186,6 +188,8 @@ Write_Disk(struct disk *d1) case foo: dp[j].dp_typ = - c1->subtype; break; + default: + break; } } for(i=0;i<NDOSPART;i++) |