Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/pdisk when creating a partition, set bzb bits appropria...
details: https://anonhg.NetBSD.org/src/rev/64ecacecbb73
branches: trunk
changeset: 536504:64ecacecbb73
user: dbj <dbj%NetBSD.org@localhost>
date: Tue Sep 17 07:42:55 2002 +0000
description:
when creating a partition, set bzb bits appropriate for netbsd root
diffstat:
dist/pdisk/partition_map.c | 13 +++++++++++++
dist/pdisk/pdisk.8 | 25 ++++++++++++++-----------
dist/pdisk/pdisk.c | 2 +-
3 files changed, 28 insertions(+), 12 deletions(-)
diffs (93 lines):
diff -r d2d184e79abe -r 64ecacecbb73 dist/pdisk/partition_map.c
--- a/dist/pdisk/partition_map.c Tue Sep 17 07:29:46 2002 +0000
+++ b/dist/pdisk/partition_map.c Tue Sep 17 07:42:55 2002 +0000
@@ -722,6 +722,19 @@
strncpy(data->dpme_type, dptype, DPISTRLEN);
data->dpme_lblock_start = 0;
data->dpme_lblocks = data->dpme_pblocks;
+ memset(data->dpme_bzb,0,sizeof(data->dpme_bzb));
+ /* if this function was explicitly invoked with the kUnixType constant,
+ * then make a default unix root partition with appropriate
+ * bzb magic set.
+ */
+ if (dptype == kUnixType) {
+ BZB *bp = (BZB *)data->dpme_bzb;
+ bp->bzb_magic = BZBMAGIC;
+ bp->bzb_inode = 1;
+ bp->bzb_type = FST;
+ bzb_root_set(bp,1);
+ bzb_usr_set(bp,1);
+ }
if (strcmp(data->dpme_type, kHFSType) == 0) { /* XXX this is gross, fix it! */
data->dpme_flags = APPLE_HFS_FLAGS_VALUE;
}
diff -r d2d184e79abe -r 64ecacecbb73 dist/pdisk/pdisk.8
--- a/dist/pdisk/pdisk.8 Tue Sep 17 07:29:46 2002 +0000
+++ b/dist/pdisk/pdisk.8 Tue Sep 17 07:42:55 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pdisk.8,v 1.7 2002/09/09 13:07:36 dbj Exp $
+.\" $NetBSD: pdisk.8,v 1.8 2002/09/17 07:42:56 dbj Exp $
.Dd August 19, 2002
.Os
.Dt PDISK 8
@@ -121,10 +121,10 @@
after the affected partition.
You are advised to print the table as frequently as necessary.
.Pp
-Creating more than fifteen partitions is not advised.
+.\"Creating more than fifteen partitions is not advised.
.\"There may be a bug in old linux kernels which causes
.\"access to the whole disk fail if more than fifteen partitions are in the map.
-.Pp
+.\".Pp
The
.Ic c
(create new partition) command is the only one with complicated arguments.
@@ -149,16 +149,17 @@
The last argument is the name of the partition.
This can be a single word without quotes, or a string surrounded by
single or double quotes.
-The type of the created partition is the correct type for
-Linux but not for
-.Nx .
+The type of the created partition is the correct type for a
+.Nx
+root partition.
.Pp
The
.Ic C
-command is identical to the
+command is similar to the
.Ic c
command, with the addition of a partition type argument after the
-other arguments.
+other arguments. The Block Zero Block magic bits are not set using
+this method.
.Pp
The
.Ic i
@@ -203,7 +204,9 @@
.Fl -logical
option has not been heavily tested.
.Pp
+When creating a standard
+.Nx
+partition,
.Nm
-cannot create
-.Nx
-partitions. This is being worked on.
+should prompt for the filesystem type to fill in the
+Block Zero Block magic bits.
diff -r d2d184e79abe -r 64ecacecbb73 dist/pdisk/pdisk.c
--- a/dist/pdisk/pdisk.c Tue Sep 17 07:29:46 2002 +0000
+++ b/dist/pdisk/pdisk.c Tue Sep 17 07:42:55 2002 +0000
@@ -552,7 +552,7 @@
printf(" P (print ordered by base address)\n");
printf(" i initialize partition map\n");
printf(" s change size of partition map\n");
- printf(" c create new partition (standard linux type)\n");
+ printf(" c create new partition (standard unix root)\n");
printf(" C (create with type also specified)\n");
printf(" n (re)name a partition\n");
printf(" d delete a partition\n");
Home |
Main Index |
Thread Index |
Old Index