Browse Source

Plan 9 from Bell Labs 2007-12-01

David du Colombier 13 years ago
parent
commit
3a6ed2284a

+ 7 - 6
dist/replica/_plan9.db

@@ -5252,7 +5252,7 @@ lib/ndb/consoledb - 664 sys sys 960222421 95
 lib/ndb/dhcp - 20000000775 sys sys 1020895764 0
 lib/ndb/dnsdump - 664 sys sys 1032057649 61
 lib/ndb/local - 664 sys sys 1077723747 292
-lib/ndb/local.complicated - 664 sys sys 1188534891 2946
+lib/ndb/local.complicated - 664 sys sys 1196401790 2980
 lib/ndb/nfs - 664 sys sys 954036707 113
 lib/news - 20000000775 sys sys 1020895764 0
 lib/pci - 664 sys sys 1160617172 206912
@@ -7828,6 +7828,7 @@ sys/man/8/cec - 664 sys sys 1193683685 1929
 sys/man/8/cpurc - 664 sys sys 1187227584 1522
 sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1191306105 5575
+sys/man/8/diskparts - 664 sys sys 1196454103 696
 sys/man/8/disksim - 664 sys sys 1193174817 1700
 sys/man/8/drawterm - 664 sys sys 1181675938 1921
 sys/man/8/fossilcons - 664 sys sys 1187134504 18542
@@ -10053,13 +10054,13 @@ sys/src/cmd/con/xmr.c - 664 sys sys 1143759347 2872
 sys/src/cmd/con/xms.c - 664 sys sys 1022049386 3530
 sys/src/cmd/cp.c - 664 sys sys 1021580000 2928
 sys/src/cmd/cpp - 20000000775 sys sys 1039727553 0
-sys/src/cmd/cpp/cpp.c - 664 sys sys 1097900425 6211
-sys/src/cmd/cpp/cpp.h - 664 sys sys 1144691586 4707
-sys/src/cmd/cpp/eval.c - 664 sys sys 1178313120 9886
+sys/src/cmd/cpp/cpp.c - 664 sys sys 1196458745 6235
+sys/src/cmd/cpp/cpp.h - 664 sys sys 1196458746 4748
+sys/src/cmd/cpp/eval.c - 664 sys sys 1196458908 9898
 sys/src/cmd/cpp/hideset.c - 664 sys sys 944960879 1936
-sys/src/cmd/cpp/include.c - 664 sys sys 959299274 2845
+sys/src/cmd/cpp/include.c - 664 sys sys 1196458932 2857
 sys/src/cmd/cpp/lex.c - 664 sys sys 1166823021 13582
-sys/src/cmd/cpp/macro.c - 664 sys sys 1144691586 11287
+sys/src/cmd/cpp/macro.c - 664 sys sys 1196458858 11352
 sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1188413849 4745
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47

+ 7 - 6
dist/replica/plan9.db

@@ -5252,7 +5252,7 @@ lib/ndb/consoledb - 664 sys sys 960222421 95
 lib/ndb/dhcp - 20000000775 sys sys 1020895764 0
 lib/ndb/dnsdump - 664 sys sys 1032057649 61
 lib/ndb/local - 664 sys sys 1077723747 292
-lib/ndb/local.complicated - 664 sys sys 1188534891 2946
+lib/ndb/local.complicated - 664 sys sys 1196401790 2980
 lib/ndb/nfs - 664 sys sys 954036707 113
 lib/news - 20000000775 sys sys 1020895764 0
 lib/pci - 664 sys sys 1160617172 206912
@@ -7828,6 +7828,7 @@ sys/man/8/cec - 664 sys sys 1193683685 1929
 sys/man/8/cpurc - 664 sys sys 1187227584 1522
 sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1191306105 5575
+sys/man/8/diskparts - 664 sys sys 1196454103 696
 sys/man/8/disksim - 664 sys sys 1193174817 1700
 sys/man/8/drawterm - 664 sys sys 1181675938 1921
 sys/man/8/fossilcons - 664 sys sys 1187134504 18542
@@ -10053,13 +10054,13 @@ sys/src/cmd/con/xmr.c - 664 sys sys 1143759347 2872
 sys/src/cmd/con/xms.c - 664 sys sys 1022049386 3530
 sys/src/cmd/cp.c - 664 sys sys 1021580000 2928
 sys/src/cmd/cpp - 20000000775 sys sys 1039727553 0
-sys/src/cmd/cpp/cpp.c - 664 sys sys 1097900425 6211
-sys/src/cmd/cpp/cpp.h - 664 sys sys 1144691586 4707
-sys/src/cmd/cpp/eval.c - 664 sys sys 1178313120 9886
+sys/src/cmd/cpp/cpp.c - 664 sys sys 1196458745 6235
+sys/src/cmd/cpp/cpp.h - 664 sys sys 1196458746 4748
+sys/src/cmd/cpp/eval.c - 664 sys sys 1196458908 9898
 sys/src/cmd/cpp/hideset.c - 664 sys sys 944960879 1936
-sys/src/cmd/cpp/include.c - 664 sys sys 959299274 2845
+sys/src/cmd/cpp/include.c - 664 sys sys 1196458932 2857
 sys/src/cmd/cpp/lex.c - 664 sys sys 1166823021 13582
-sys/src/cmd/cpp/macro.c - 664 sys sys 1144691586 11287
+sys/src/cmd/cpp/macro.c - 664 sys sys 1196458858 11352
 sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1188413849 4745
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47

+ 7 - 0
dist/replica/plan9.log

@@ -17519,3 +17519,10 @@
 1196370004 9 c sys/src/cmd/venti/srv/venti.c - 664 sys sys 1196369098 5595
 1196382604 0 c sys/src/cmd/venti/srv/icachewrite.c - 664 sys sys 1196382019 7477
 1196382604 1 c sys/src/cmd/venti/srv/venti.c - 664 sys sys 1196382019 5604
+1196402406 0 c lib/ndb/local.complicated - 664 sys sys 1196401790 2980
+1196454603 0 a sys/man/8/diskparts - 664 sys sys 1196454103 696
+1196460005 0 c sys/src/cmd/cpp/cpp.c - 664 sys sys 1196458745 6235
+1196460005 1 c sys/src/cmd/cpp/cpp.h - 664 sys sys 1196458746 4748
+1196460005 2 c sys/src/cmd/cpp/eval.c - 664 sys sys 1196458908 9898
+1196460005 3 c sys/src/cmd/cpp/include.c - 664 sys sys 1196458932 2857
+1196460005 4 c sys/src/cmd/cpp/macro.c - 664 sys sys 1196458858 11352

+ 4 - 4
lib/ndb/local.complicated

@@ -25,7 +25,7 @@ dom=
 	ns=L.ROOT-SERVERS.NET
 	ns=M.ROOT-SERVERS.NET
 dom=A.ROOT-SERVERS.NET ip=198.41.0.4
-dom=B.ROOT-SERVERS.NET ip=192.228.79.201
+dom=B.ROOT-SERVERS.NET ip=128.9.0.107
 dom=C.ROOT-SERVERS.NET ip=192.33.4.12
 dom=D.ROOT-SERVERS.NET ip=128.8.10.90
 dom=E.ROOT-SERVERS.NET ip=192.203.230.10
@@ -33,13 +33,13 @@ dom=F.ROOT-SERVERS.NET ip=192.5.5.241
 dom=G.ROOT-SERVERS.NET ip=192.112.36.4
 dom=H.ROOT-SERVERS.NET ip=128.63.2.53
 dom=I.ROOT-SERVERS.NET ip=192.36.148.17
-dom=J.ROOT-SERVERS.NET ip=192.58.128.30
+dom=J.ROOT-SERVERS.NET ip=198.41.0.10
 dom=K.ROOT-SERVERS.NET ip=193.0.14.129
-dom=L.ROOT-SERVERS.NET ip=198.32.64.12
+dom=L.ROOT-SERVERS.NET ip=198.32.64.12	# old
+			ip=199.7.83.42	# new, nov 2007
 dom=M.ROOT-SERVERS.NET ip=202.12.27.33
 
 
-
 #  select one of the following two entries:
 
 #

+ 44 - 0
sys/man/8/diskparts

@@ -0,0 +1,44 @@
+.TH DISKPARTS 8
+.SH NAME
+diskparts, dmaon \- prepare disks for use
+.SH SYNOPSIS
+.B diskparts
+.br
+.B dmaon
+.SH DESCRIPTION
+.I Diskparts
+configures FDISK and Plan 9 partitions on any disks named
+.BR /dev/sd* ,
+then configures
+.IR fs (3)
+by copying
+.BR /cfg/$sysname/fsconfig ,
+if present, to
+.BR /dev/fs/ctl ,
+if present,
+one line at a time.
+If
+.B #S
+or
+.B #k
+are not bound to
+.B /dev
+yet, they are first bound after the current contents.
+.PP
+.I Dmaon
+enables
+.SM DMA
+for all attached
+.SM IDE
+devices that claim to support it.
+.SH FILES
+.TF /dev/sd[C-H]?/ctl
+.TP
+.B /dev/sd[C-H]?/ctl
+storage interface control files for IDE devices
+.PD
+.SH SOURCE
+.B /rc/bin
+.SH SEE ALSO
+.IR sd (3),
+.IR partfs (8)

+ 2 - 2
sys/src/cmd/cpp/cpp.c

@@ -69,7 +69,7 @@ process(Tokenrow *trp)
 			trp->tp += 1;
 			control(trp);
 		} else if (!skipping && anymacros)
-			expandrow(trp, NULL);
+			expandrow(trp, NULL, Notinmacro);
 		if (skipping)
 			setempty(trp);
 		puttokens(trp);
@@ -213,7 +213,7 @@ control(Tokenrow *trp)
 
 	case KLINE:
 		trp->tp = tp+1;
-		expandrow(trp, "<line>");
+		expandrow(trp, "<line>", Notinmacro);
 		tp = trp->bp+2;
 	kline:
 		if (tp+1>=trp->lp || tp->type!=NUMBER || tp+3<trp->lp

+ 4 - 2
sys/src/cmd/cpp/cpp.h

@@ -33,6 +33,8 @@ enum kwtype { KIF, KIFDEF, KIFNDEF, KELIF, KELSE, KENDIF, KINCLUDE, KDEFINE,
 #define	EOFC	0xFD		/* sentinel for end of input file */
 #define	XPWS	1		/* token flag: white space to assure token sep. */
 
+enum { Notinmacro, Inmacro };
+
 typedef struct token {
 	unsigned char	type;
 	unsigned char 	flag;
@@ -109,11 +111,11 @@ void	dodefine(Tokenrow *);
 void	doadefine(Tokenrow *, int);
 void	doinclude(Tokenrow *);
 void	doif(Tokenrow *, enum kwtype);
-void	expand(Tokenrow *, Nlist *);
+void	expand(Tokenrow *, Nlist *, int);
 void	builtin(Tokenrow *, int);
 int	gatherargs(Tokenrow *, Tokenrow **, int, int *);
 void	substargs(Nlist *, Tokenrow *, Tokenrow **);
-void	expandrow(Tokenrow *, char *);
+void	expandrow(Tokenrow *, char *, int);
 void	maketokenrow(int, Tokenrow *);
 Tokenrow *copytokenrow(Tokenrow *, Tokenrow *);
 Token	*growtokenrow(Tokenrow *);

+ 1 - 1
sys/src/cmd/cpp/eval.c

@@ -116,7 +116,7 @@ eval(Tokenrow *trp, int kw)
 	}
 	ntok = trp->tp - trp->bp;
 	kwdefined->val = KDEFINED;	/* activate special meaning of defined */
-	expandrow(trp, "<if>");
+	expandrow(trp, "<if>", Notinmacro);
 	kwdefined->val = NAME;
 	vp = vals;
 	op = ops;

+ 1 - 1
sys/src/cmd/cpp/include.c

@@ -18,7 +18,7 @@ doinclude(Tokenrow *trp)
 		goto syntax;
 	if (trp->tp->type!=STRING && trp->tp->type!=LT) {
 		len = trp->tp - trp->bp;
-		expandrow(trp, "<include>");
+		expandrow(trp, "<include>", Notinmacro);
 		trp->tp = trp->bp+len;
 	}
 	if (trp->tp->type==STRING) {

+ 7 - 6
sys/src/cmd/cpp/macro.c

@@ -138,7 +138,7 @@ syntax:
  * Flag is NULL if more input can be gathered.
  */
 void
-expandrow(Tokenrow *trp, char *flag)
+expandrow(Tokenrow *trp, char *flag, int inmacro)
 {
 	Token *tp;
 	Nlist *np;
@@ -170,7 +170,7 @@ expandrow(Tokenrow *trp, char *flag)
 		if (np->flag&ISMAC)
 			builtin(trp, np->val);
 		else {
-			expand(trp, np);
+			expand(trp, np, inmacro);
 		}
 		tp = trp->tp;
 	}
@@ -184,7 +184,7 @@ expandrow(Tokenrow *trp, char *flag)
  * (ordinarily the beginning of the expansion)
  */
 void
-expand(Tokenrow *trp, Nlist *np)
+expand(Tokenrow *trp, Nlist *np, int inmacro)
 {
 	Tokenrow ntr;
 	int ntokc, narg, i;
@@ -214,7 +214,8 @@ expand(Tokenrow *trp, Nlist *np)
 			dofree(atr[i]);
 		}
 	}
-	doconcat(&ntr);				/* execute ## operators */
+	if(!inmacro)
+		doconcat(&ntr);				/* execute ## operators */
 	hs = newhideset(trp->tp->hideset, np);
 	for (tp=ntr.bp; tp<ntr.lp; tp++) {	/* distribute hidesets */
 		if (tp->type==NAME) {
@@ -359,7 +360,7 @@ substargs(Nlist *np, Tokenrow *rtr, Tokenrow **atr)
 				insertrow(rtr, 1, atr[argno]);
 			else {
 				copytokenrow(&tatr, atr[argno]);
-				expandrow(&tatr, "<macro>");
+				expandrow(&tatr, "<macro>", Inmacro);
 				insertrow(rtr, 1, &tatr);
 				dofree(tatr.bp);
 			}
@@ -452,7 +453,7 @@ stringify(Tokenrow *vp)
 			error(ERROR, "Stringified macro arg is too long");
 			break;
 		}
-		if (tp->wslen && (tp->flag&XPWS)==0)
+		if (tp->wslen /* && (tp->flag&XPWS)==0 */)
 			*sp++ = ' ';
 		for (i=0, cp=tp->t; i<tp->len; i++) {	
 			if (instring && (*cp=='"' || *cp=='\\'))