summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-05-03 06:30:59 +0000
committerphk <phk@FreeBSD.org>1995-05-03 06:30:59 +0000
commitaf83fa703c134aa38db0de2662d3a56819a501f9 (patch)
tree85625b62bb713949dc08bb262bb93941e5c861bb /lib/libdisk/disk.c
parent8f856ffcfd3b5de2138f01c117f1b30a60e0cf7d (diff)
downloadFreeBSD-src-af83fa703c134aa38db0de2662d3a56819a501f9.zip
FreeBSD-src-af83fa703c134aa38db0de2662d3a56819a501f9.tar.gz
Make the target for tst01 more sensible.
Remove bogus targets. Allocate partition letters as follows: lowest offset "flags & CHUNK_IS_ROOT" gets 'a', lowest offset "subtype==FS_SWAP" gets 'b' the rest is allocated in offset order from this sequence "defghab". This will generally make sense. Added rules to complain if more than one CHUNK_IS_ROOT or more than one FS_SWAP per FreeBSD chunk. Set CHUNK_IS_ROOT on the 'a' partition in Open_Disk. Run Fixup_Names in Open_Disk.
Diffstat (limited to 'lib/libdisk/disk.c')
-rw-r--r--lib/libdisk/disk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
index e0701ce..03c30c5 100644
--- a/lib/libdisk/disk.c
+++ b/lib/libdisk/disk.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: disk.c,v 1.11 1995/05/02 19:52:27 jkh Exp $
+ * $Id: disk.c,v 1.12 1995/05/02 20:16:16 jkh Exp $
*
*/
@@ -65,7 +65,7 @@ Int_Open_Disk(char *name, u_long size)
return 0;
}
-#if 0
+#ifdef DEBUG
for(i=0;i<ds.dss_nslices;i++)
if(ds.dss_slices[i].ds_openmask)
printf(" open(%d)=0x%2x",
@@ -174,7 +174,7 @@ Int_Open_Disk(char *name, u_long size)
dl.d_partitions[j].p_size,
pname,part,
dl.d_partitions[j].p_fstype,
- 0) && j != 3)
+ j == 0 ? CHUNK_IS_ROOT : 0) && j != 3)
warn(
"Failed to add chunk for partition %c [%lu,%lu]",
j + 'a',dl.d_partitions[j].p_offset,
@@ -183,6 +183,7 @@ Int_Open_Disk(char *name, u_long size)
}
}
close(fd);
+ Fixup_Names(d);
return d;
}
OpenPOWER on IntegriCloud