Browse Source

Plan 9 from Bell Labs 2008-06-18

David du Colombier 13 years ago
parent
commit
b2dd15260f
5 changed files with 18 additions and 7 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 5 3
      rc/bin/diskparts
  5. 7 0
      sys/man/8/prep

+ 2 - 2
dist/replica/_plan9.db

@@ -5520,7 +5520,7 @@ rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
 rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1186289104 181
-rc/bin/diskparts - 775 sys sys 1213226510 928
+rc/bin/diskparts - 775 sys sys 1213733501 1052
 rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563
@@ -7884,7 +7884,7 @@ sys/man/8/ping - 664 sys sys 1196638947 3650
 sys/man/8/plan9.ini - 664 sys sys 1202255136 23868
 sys/man/8/pop3 - 664 sys sys 1197574309 3122
 sys/man/8/ppp - 664 sys sys 1210814269 4464
-sys/man/8/prep - 664 sys sys 1202496787 14211
+sys/man/8/prep - 664 sys sys 1213733470 14329
 sys/man/8/qer - 664 sys sys 1196638948 4909
 sys/man/8/reboot - 664 sys sys 1196638948 443
 sys/man/8/replica - 664 sys sys 1196638948 6383

+ 2 - 2
dist/replica/plan9.db

@@ -5520,7 +5520,7 @@ rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
 rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1186289104 181
-rc/bin/diskparts - 775 sys sys 1213226510 928
+rc/bin/diskparts - 775 sys sys 1213733501 1052
 rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563
@@ -7884,7 +7884,7 @@ sys/man/8/ping - 664 sys sys 1196638947 3650
 sys/man/8/plan9.ini - 664 sys sys 1202255136 23868
 sys/man/8/pop3 - 664 sys sys 1197574309 3122
 sys/man/8/ppp - 664 sys sys 1210814269 4464
-sys/man/8/prep - 664 sys sys 1202496787 14211
+sys/man/8/prep - 664 sys sys 1213733470 14329
 sys/man/8/qer - 664 sys sys 1196638948 4909
 sys/man/8/reboot - 664 sys sys 1196638948 443
 sys/man/8/replica - 664 sys sys 1196638948 6383

+ 2 - 0
dist/replica/plan9.log

@@ -19887,3 +19887,5 @@
 1213560004 6 d sys/src/cmd/vac/vtdump.c - 664 sys sys 1213498240 0
 1213635606 0 c rc/bin/dontkill - 775 sys sys 1213634657 313
 1213644604 0 c sys/man/4/cdfs - 664 sys sys 1213644483 5267
+1213734604 0 c rc/bin/diskparts - 775 sys sys 1213733501 1052
+1213734604 1 c sys/man/8/prep - 664 sys sys 1213733470 14329

+ 5 - 3
rc/bin/diskparts

@@ -8,8 +8,9 @@ if (! test -e /dev/sdctl)
 # note that really big disks (e.g., aoe devices) may have no mbr
 # partition table because the mbr partition table can't cope with large
 # block numbers, so we may have to examine the data file with prep if
-# there's no plan9 file.
-for(disk in /dev/sd[0-9A-Zabd-z]*) {
+# there's no plan9 file.  beware that `disk/prep -p data' on a disk with
+# no plan 9 partition table will delete all extant partitions.
+for(disk in /dev/sd*) {
 	if(test -f $disk/data && test -f $disk/ctl)
 		disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
 	if(test -f $disk/plan9)
@@ -18,7 +19,8 @@ for(disk in /dev/sd[0-9A-Zabd-z]*) {
 		parts=($disk/data)
 	for(part in $parts)
 		if(test -f $part)
-			disk/prep -p $part >$disk/ctl >[2]/dev/null
+			disk/prep -p $part |
+				grep -v '^delpart ' >$disk/ctl >[2]/dev/null
 }
 
 sysname=`{cat /dev/sysname}

+ 7 - 0
sys/man/8/prep

@@ -713,3 +713,10 @@ can create FAT12 and FAT16
 file systems, but not FAT32 file systems.
 The boot block can only read from
 FAT12 and FAT16 file systems.
+.PP
+If
+.L "prep -p"
+doesn't find a Plan 9 partition table,
+it will issue commands to delete
+.I all
+extant partitions.