Browse Source

Plan 9 from Bell Labs 2011-06-17

David du Colombier 13 years ago
parent
commit
a7cf791e70

+ 2 - 5
rc/bin/loadfossil

@@ -55,8 +55,7 @@ fossil/flfmt -y $fosspart
 
 # install listen-less config for fossil creation
 {
-	grep -v '^listen ' $fossconf | sed '/^fsys main config/c\
-fsys main config '^$fosspart
+	grep -v '^listen ' $fossconf
 	echo create /active/adm adm sys d775
 	echo create /active/adm/users adm sys 664
 } >/tmp/fossil-no-list.conf
@@ -103,6 +102,4 @@ mount -cC /srv/fossil.open /n/f
 killfossil
 
 # install permanent fossil configuration
-sed '/^fsys main config/c\
-fsys main config '^$fosspart $fossconf >/tmp/fossil-no-list.conf
-fossil/conf -w $fosspart /tmp/fossil-no-list.conf
+fossil/conf -w $fosspart $fossconf

+ 4 - 2
sys/doc/port.ms

@@ -181,7 +181,8 @@ The ARM compiler
 .PP
 The ARM compiler is fairly solid; it has been used for some production
 operating system work including Inferno and the Plan 9 kernel
-for the iPAQ, which uses a StrongArm SA1, and the Sheevaplug.
+for the iPAQ, which uses a StrongArm SA1, and the Sheevaplug,
+Guruplug, Dreamplug and others.
 The compiler supports the ARMv4 architecture;
 it does not support the Thumb instruction sets.
 It has been used on ARM7500FE, ARM926 and Cortex-A8 processors
@@ -347,7 +348,8 @@ The Marvell Kirkwood operating system
 This is an ARM kernel for the ARM926EJ-S processor
 and it emulates floating-point and
 CAS (compare-and-swap) instructions.
-It is known to run on the Sheevaplug, Guruplug and Openrd-client boards.
+It is known to run on the Sheevaplug, Guruplug, Dreamplug
+and Openrd-client boards.
 It is derived from a port of native Inferno to the Sheevaplug
 by Salva Peir\f(Jpó\fP and Mechiel Lukkien.
 There are many features of the Kirkwood system-on-a-chip

File diff suppressed because it is too large
+ 885 - 873
sys/doc/port.ps


+ 1 - 1
sys/lib/sysconfig/usb/fossil.conf

@@ -4,7 +4,7 @@
 # srv boot			# created by /boot/boot
 # srv -p fscons			# explicit in fossil invocation from /boot/boot
 
-fsys main config /dev/sdXX/fossil
+fsys main config
 fsys main open -Va -c 20000
 fsys main snaptime -a none -s none -t none
 fsys main

+ 2 - 1
sys/man/4/fossil

@@ -431,7 +431,7 @@ checking turned off, create a users file, and mount the server:
 .EX
 fossil/flfmt /dev/sdC0/fossil
 fossil/conf -w /dev/sdC0/fossil <<EOF
-fsys main config /dev/sdC0/fossil
+fsys main config
 fsys main open -AWP
 fsys main
 create /active/adm adm sys d775
@@ -492,6 +492,7 @@ command to prepare the script.
 .IR fs (4),
 .IR srv (4),
 .IR fossilcons (8),
+.IR loadfossil (8),
 .IR venti (8)
 .SH BUGS
 It is possible that the disk format (but not the Venti format)

+ 1 - 1
sys/man/8/booting

@@ -152,7 +152,7 @@ are
 .L /arm/9gd
 for the Marvell PXA168-based Guruplug Display,
 .L /arm/9plug
-for all Marvell Kirkwood plugs (Sheevaplug, Guruplug, Openrd, etc.),
+for all Marvell Kirkwood plugs (Sheevaplug, Guruplug, Dreamplug, Openrd, etc.),
 and
 .L /arm/9beagle
 for TI OMAP3 boards (IGEPv2 from ISEE, Gumstix Overo).

+ 18 - 1
sys/man/8/fossilcons

@@ -93,7 +93,9 @@ con /srv/fscons
 .B fsys
 .I name
 .B config
+[
 .I device
+]
 .PP
 .B fsys
 .I name
@@ -685,8 +687,21 @@ operate on unopened file systems; they require the prefix.
 creates a new file system named
 .I name
 using disk file
-.I device .
+.IR device .
 This just adds an entry to fossil's internal table.
+If
+.I device
+is missing,
+the
+.I file
+argument to
+.IR fossil 's
+.B -f
+option will be used instead;
+this allows the
+.I fossil
+configuration file to avoid naming the partition that it is embedded in,
+making it more portable.
 .PP
 .I Venti
 establishes a connection to the Venti server
@@ -758,6 +773,8 @@ and then closes the device file.
 .I Unconfig
 removes the named file system (which must be closed)
 from fossil's internal table.
+.br
+.ne 3
 .SS File system maintenance
 .I Bfree
 marks the block at disk address

+ 6 - 8
sys/man/8/loadfossil

@@ -20,18 +20,16 @@ using the
 .IR mkfs (8)
 prototype file
 .I proto
-and installs a configuration derived from
+and installs the configuration in
 .IR fossil.conf .
 .PP
-The
+Simply declaring
 .LR "fsys main config"
-line of
+in
 .I fossil.conf
-will be replaced by a reference to
-.IR fossil ,
-so
-.I fossil
-ought to be a full path name.
+takes the device name from
+.L "fossil -f"
+and avoids wiring it into the configuration.
 .SH EXAMPLES
 Create a standalone
 .I fossil

+ 6 - 2
sys/src/9/pc/devether.c

@@ -428,8 +428,12 @@ etherprobe(int cardno, int ctlrno)
 	if(ether->irq >= 0)
 		intrenable(ether->irq, ether->interrupt, ether, ether->tbdf, name);
 
-	i = sprint(buf, "#l%d: %s: %dMbps port 0x%luX irq %d",
-		ctlrno, cards[cardno].type, ether->mbps, ether->port, ether->irq);
+	i = sprint(buf, "#l%d: %s: ", ctlrno, cards[cardno].type);
+	if(ether->mbps >= 1000)
+		i += sprint(buf+i, "%dGbps", ether->mbps/1000);
+	else
+		i += sprint(buf+i, "%dMbps", ether->mbps);
+	i += sprint(buf+i, " port 0x%luX irq %d", ether->port, ether->irq);
 	if(ether->mem)
 		i += sprint(buf+i, " addr 0x%luX", ether->mem);
 	if(ether->size)

+ 13 - 8
sys/src/cmd/fossil/9fsys.c

@@ -51,10 +51,10 @@ static char *
 ventihost(char *host)
 {
 	if(host != nil)
-		return strdup(host);
+		return vtStrDup(host);
 	host = getenv("venti");
 	if(host == nil)
-		host = strdup("$venti");
+		host = vtStrDup("$venti");
 	return host;
 }
 
@@ -1690,16 +1690,22 @@ static int
 fsysConfig(char* name, int argc, char* argv[])
 {
 	Fsys *fsys;
-	char *usage = "usage: fsys name config dev";
+	char *part;
+	char *usage = "usage: fsys name config [dev]";
 
 	ARGBEGIN{
 	default:
 		return cliError(usage);
 	}ARGEND
-	if(argc != 1)
+	if(argc > 1)
 		return cliError(usage);
 
-	if((fsys = _fsysGet(argv[0])) != nil){
+	if(argc == 0)
+		part = foptname;
+	else
+		part = argv[0];
+
+	if((fsys = _fsysGet(part)) != nil){
 		vtLock(fsys->lock);
 		if(fsys->fs != nil){
 			vtSetError(EFsysBusy, fsys->name);
@@ -1708,14 +1714,13 @@ fsysConfig(char* name, int argc, char* argv[])
 			return 0;
 		}
 		vtMemFree(fsys->dev);
-		fsys->dev = vtStrDup(argv[0]);
+		fsys->dev = vtStrDup(part);
 		vtUnlock(fsys->lock);
 	}
-	else if((fsys = fsysAlloc(name, argv[0])) == nil)
+	else if((fsys = fsysAlloc(name, part)) == nil)
 		return 0;
 
 	fsysPut(fsys);
-
 	return 1;
 }
 

+ 2 - 2
sys/src/cmd/fossil/file.c

@@ -1824,11 +1824,11 @@ fileName(File *f)
 	static char root[] = "/";
 
 	if (f == nil)
-		return strdup("/**GOK**");
+		return vtStrDup("/**GOK**");
 
 	p = fileGetParent(f);
 	if (p == f)
-		name = strdup(root);
+		name = vtStrDup(root);
 	else {
 		pname = fileName(p);
 		if (strcmp(pname, root) == 0)

+ 2 - 1
sys/src/cmd/fossil/fossil.c

@@ -6,6 +6,7 @@
 int Dflag;
 int mempcnt;			/* for 9fsys.c */
 char* none = "none";
+char* foptname = "/none/such";
 
 static void
 usage(void)
@@ -101,7 +102,7 @@ main(int argc, char* argv[])
 		break;
 	case 'f':
 		p = EARGF(usage());
-		currfsysname = p;
+		currfsysname = foptname = p;
 		readCmdPart(p, &cmd, &ncmd);
 		break;
 	case 'm':

+ 1 - 0
sys/src/cmd/fossil/fs.h

@@ -15,6 +15,7 @@ enum {
 };
 
 extern char *currfsysname;
+extern char *foptname;
 
 void	fsClose(Fs*);
 int	fsEpochLow(Fs*, u32int);

Some files were not shown because too many files changed in this diff