Browse Source

Plan 9 from Bell Labs 2008-06-12

David du Colombier 13 years ago
parent
commit
32e9ccdbfe
4 changed files with 13 additions and 4 deletions
  1. 1 1
      dist/replica/_plan9.db
  2. 1 1
      dist/replica/plan9.db
  3. 1 0
      dist/replica/plan9.log
  4. 10 2
      rc/bin/diskparts

+ 1 - 1
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 1178399618 624
+rc/bin/diskparts - 775 sys sys 1213226510 928
 rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563

+ 1 - 1
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 1178399618 624
+rc/bin/diskparts - 775 sys sys 1213226510 928
 rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563

+ 1 - 0
dist/replica/plan9.log

@@ -19841,3 +19841,4 @@
 1213135206 1 c sys/src/9/pc/sdiahci.c - 664 sys sys 1213134393 39005
 1213135206 2 c sys/src/9/pc/usbohci.c - 664 sys sys 1213134352 48372
 1213135206 3 c sys/src/boot/pc/sdiahci.c - 664 sys sys 1213134135 28620
+1213227004 0 c rc/bin/diskparts - 775 sys sys 1213226510 928

+ 10 - 2
rc/bin/diskparts

@@ -4,11 +4,19 @@ rfork e
 if (! test -e /dev/sdctl)
 	bind -a '#S' /dev
 
-# set up any /dev/sd partitions
+# set up any /dev/sd partitions.
+# 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]*) {
 	if(test -f $disk/data && test -f $disk/ctl)
 		disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
-	for(part in $disk/plan9*)
+	if(test -f $disk/plan9)
+		parts=($disk/plan9*)
+	if not
+		parts=($disk/data)
+	for(part in $parts)
 		if(test -f $part)
 			disk/prep -p $part >$disk/ctl >[2]/dev/null
 }