Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
This commit is contained in:
parent
77a0a5b519
commit
fa325e9b42
1021 changed files with 5688 additions and 6193 deletions
|
|
@ -503,7 +503,7 @@ fsysSync(Fsys* fsys, int argc, char* argv[])
|
|||
{
|
||||
char *usage = "usage: [fsys name] sync";
|
||||
int n;
|
||||
|
||||
|
||||
ARGBEGIN{
|
||||
default:
|
||||
return cliError(usage);
|
||||
|
|
@ -1307,7 +1307,7 @@ fsckClri(Fsck *fsck, char *name, MetaBlock *mb, int i, Block *b)
|
|||
|
||||
mbDelete(mb, i);
|
||||
mbPack(mb);
|
||||
blockDirty(b);
|
||||
blockDirty(b);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1322,12 +1322,12 @@ fsckClose(Fsck *fsck, Block *b, u32int epoch)
|
|||
consPrint("%#ux is already closed\n", b->addr);
|
||||
return;
|
||||
}
|
||||
if(epoch){
|
||||
if(epoch){
|
||||
l.state |= BsClosed;
|
||||
l.epochClose = epoch;
|
||||
}else
|
||||
l.state = BsFree;
|
||||
|
||||
|
||||
if(!blockSetLabel(b, &l, 0))
|
||||
consPrint("%#ux setlabel: %r\n", b->addr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ lstnListen(void* a)
|
|||
Lstn *lstn;
|
||||
int dfd, lfd;
|
||||
char newdir[NETPATHLEN];
|
||||
|
||||
|
||||
threadsetname("listen");
|
||||
|
||||
lstn = a;
|
||||
|
|
|
|||
|
|
@ -939,7 +939,7 @@ parseAname(char *aname, char **fsname, char **path)
|
|||
/*
|
||||
* Check remote IP address against /mnt/ipok.
|
||||
* Sources.cs.bell-labs.com uses this to disallow
|
||||
* network connections from Sudan, Libya, etc.,
|
||||
* network connections from Sudan, Libya, etc.,
|
||||
* following U.S. cryptography export regulations.
|
||||
*/
|
||||
static int
|
||||
|
|
@ -955,7 +955,7 @@ conIPCheck(Con* con)
|
|||
}
|
||||
if(access("/mnt/ipok/ok", AEXIST) < 0){
|
||||
/* mount closes the fd on success */
|
||||
if((fd = open("/srv/ipok", ORDWR)) >= 0
|
||||
if((fd = open("/srv/ipok", ORDWR)) >= 0
|
||||
&& mount(fd, -1, "/mnt/ipok", MREPL, "") < 0)
|
||||
close(fd);
|
||||
if(access("/mnt/ipok/ok", AEXIST) < 0){
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ main(int argc, char *argv[])
|
|||
int n = 1000, m;
|
||||
int s = 1;
|
||||
double *t, t0, t1;
|
||||
uchar *buf;
|
||||
uchar *buf;
|
||||
double a, d, max, min;
|
||||
|
||||
m = OREAD;
|
||||
|
|
@ -67,7 +67,7 @@ main(int argc, char *argv[])
|
|||
|
||||
buf = malloc(s);
|
||||
t = malloc(n*sizeof(double));
|
||||
|
||||
|
||||
t0 = nsec();
|
||||
for(i=0; i<n; i++){
|
||||
if(m == OREAD){
|
||||
|
|
@ -96,7 +96,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
a /= n;
|
||||
|
||||
|
||||
for(i=0; i<n; i++)
|
||||
d += (a - t[i]) * (a - t[i]);
|
||||
d /= n;
|
||||
|
|
|
|||
|
|
@ -273,14 +273,14 @@ if(0) fprint(2, "falling\n");
|
|||
blockDirty(b);
|
||||
/*
|
||||
* If b is in the active tree, then we need to note that we've
|
||||
* just removed addr from the active tree (replacing it with the
|
||||
* just removed addr from the active tree (replacing it with the
|
||||
* copy we just stored to Venti). If addr is in other snapshots,
|
||||
* this will close addr but not free it, since it has a non-empty
|
||||
* epoch range.
|
||||
*
|
||||
* If b is in the active tree but has been copied (this can happen
|
||||
* if we get killed at just the right moment), then we will
|
||||
* mistakenly leak its kids.
|
||||
* mistakenly leak its kids.
|
||||
*
|
||||
* The children of an archive directory (e.g., /archive/2004/0604)
|
||||
* are not treated as in the active tree.
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ _bwatchResetParent(uchar *score)
|
|||
}
|
||||
}
|
||||
/*
|
||||
* and child
|
||||
* and child
|
||||
*/
|
||||
static void
|
||||
_bwatchResetChild(uchar *score)
|
||||
|
|
@ -417,4 +417,3 @@ bwatchUnlock(Block *b)
|
|||
}else
|
||||
w->b[i] = w->b[--w->nb];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1062,10 +1062,10 @@ if(0)fprint(2, "%s: %d:%x:%d depends on %d:%x:%d\n", argv0, b->part, b->addr, b-
|
|||
|
||||
/*
|
||||
* Mark an in-memory block as dirty. If there are too many
|
||||
* dirty blocks, start writing some out to disk.
|
||||
*
|
||||
* dirty blocks, start writing some out to disk.
|
||||
*
|
||||
* If there were way too many dirty blocks, we used to
|
||||
* try to do some flushing ourselves, but it's just too dangerous --
|
||||
* try to do some flushing ourselves, but it's just too dangerous --
|
||||
* it implies that the callers cannot have any of our priors locked,
|
||||
* but this is hard to avoid in some cases.
|
||||
*/
|
||||
|
|
@ -1332,16 +1332,16 @@ if(0) fprint(2, "%s: iostate part=%d addr=%x %s->%s\n", argv0, b->part, b->addr,
|
|||
}
|
||||
|
||||
/*
|
||||
* The active file system is a tree of blocks.
|
||||
* The active file system is a tree of blocks.
|
||||
* When we add snapshots to the mix, the entire file system
|
||||
* becomes a dag and thus requires a bit more care.
|
||||
*
|
||||
*
|
||||
* The life of the file system is divided into epochs. A snapshot
|
||||
* ends one epoch and begins the next. Each file system block
|
||||
* is marked with the epoch in which it was created (b.epoch).
|
||||
* When the block is unlinked from the file system (closed), it is marked
|
||||
* with the epoch in which it was removed (b.epochClose).
|
||||
* Once we have discarded or archived all snapshots up to
|
||||
* with the epoch in which it was removed (b.epochClose).
|
||||
* Once we have discarded or archived all snapshots up to
|
||||
* b.epochClose, we can reclaim the block.
|
||||
*
|
||||
* If a block was created in a past epoch but is not yet closed,
|
||||
|
|
@ -1359,7 +1359,7 @@ if(0) fprint(2, "%s: iostate part=%d addr=%x %s->%s\n", argv0, b->part, b->addr,
|
|||
* lbb (bb's label block).
|
||||
*
|
||||
* (2) We have to mark b as closed, but only after we switch
|
||||
* the pointer, so lb must be written out after p. In fact, we
|
||||
* the pointer, so lb must be written out after p. In fact, we
|
||||
* can't even update the in-memory copy, or the cache might
|
||||
* mistakenly give out b for reuse before p gets written.
|
||||
*
|
||||
|
|
@ -1369,7 +1369,7 @@ if(0) fprint(2, "%s: iostate part=%d addr=%x %s->%s\n", argv0, b->part, b->addr,
|
|||
* to arrange for (2) to happen once p is written.
|
||||
*
|
||||
* Until (2) happens, some pieces of the code (e.g., the archiver)
|
||||
* still need to know whether a block has been copied, so we
|
||||
* still need to know whether a block has been copied, so we
|
||||
* set the BsCopied bit in the label and force that to disk *before*
|
||||
* the copy gets written out.
|
||||
*/
|
||||
|
|
@ -1436,7 +1436,7 @@ void
|
|||
blockRemoveLink(Block *b, u32int addr, int type, u32int tag, int recurse)
|
||||
{
|
||||
BList *p, **pp, bl;
|
||||
|
||||
|
||||
/* remove bb from prior list */
|
||||
for(pp=&b->prior; (p=*pp)!=nil; ){
|
||||
if(p->part == PartData && p->addr == addr){
|
||||
|
|
@ -1479,7 +1479,7 @@ blockRemoveLink(Block *b, u32int addr, int type, u32int tag, int recurse)
|
|||
b->utail = p;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Process removal of a single block and perhaps its children.
|
||||
*/
|
||||
static void
|
||||
|
|
@ -1592,7 +1592,7 @@ blistAlloc(Block *b)
|
|||
/*
|
||||
* No free BLists. What are our options?
|
||||
*/
|
||||
|
||||
|
||||
/* Block has no priors? Just write it. */
|
||||
if(b->prior == nil){
|
||||
qunlock(&c->lk);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ threadmain(int argc, char *argv[])
|
|||
int csize = 1000;
|
||||
VtConn *z;
|
||||
char *host = nil;
|
||||
|
||||
|
||||
fsck.useventi = 1;
|
||||
Binit(&bout, 1, OWRITE);
|
||||
ARGBEGIN{
|
||||
|
|
@ -119,4 +119,3 @@ threadmain(int argc, char *argv[])
|
|||
|
||||
threadexitsall(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Initialize a fossil file system from an ISO9660 image already in the
|
||||
* file system. This is a fairly bizarre thing to do, but it lets us generate
|
||||
* installation CDs that double as valid Plan 9 disk partitions.
|
||||
* installation CDs that double as valid Plan 9 disk partitions.
|
||||
* People having trouble booting the CD can just copy it into a disk
|
||||
* partition and you've got a working Plan 9 system.
|
||||
*
|
||||
|
|
@ -329,7 +329,7 @@ iso9660start(Cdir *c)
|
|||
c = (Cdir*)((uchar*)c+c->len); /* skip dotdot */
|
||||
/* oops: might happen if leftmost directory is empty or leftmost file is zero length! */
|
||||
if(little(c->dloc, 4) == 0)
|
||||
sysfatal("error parsing cd image or unfortunate cd image");
|
||||
sysfatal("error parsing cd image or unfortunate cd image");
|
||||
}
|
||||
return little(c->dloc, 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ fsSnapshot(Fs *fs, char *srcpath, char *dstpath, int doarchive)
|
|||
* It is important that we maintain the invariant that:
|
||||
* if both b and bb are marked as Active with start epoch e
|
||||
* and b points at bb, then no other pointers to bb exist.
|
||||
*
|
||||
*
|
||||
* When bb is unlinked from b, its close epoch is set to b's epoch.
|
||||
* A block with epoch == close epoch is
|
||||
* treated as free by cacheAllocBlock; this aggressively
|
||||
|
|
@ -1095,4 +1095,3 @@ snapClose(Snap *s)
|
|||
periodicKill(s->tick);
|
||||
vtfree(s);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,4 +37,3 @@ bwatchUnlock(Block *b)
|
|||
{
|
||||
USED(b);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,4 +222,3 @@ Err:
|
|||
werrstr(EBadSuper);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,4 +79,3 @@ periodicThread(void *a)
|
|||
}
|
||||
periodicFree(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ main(int argc, char *argv[])
|
|||
case 'l':
|
||||
length = atoi(ARGF());
|
||||
break;
|
||||
case 'b':
|
||||
case 'b':
|
||||
block = atoi(ARGF());
|
||||
break;
|
||||
case 'u':
|
||||
|
|
@ -92,7 +92,7 @@ main(int argc, char *argv[])
|
|||
|
||||
fprint(2, "count = %d\n", count(r, 1));
|
||||
fprint(2, "total time = %ld\n", time(0)-t);
|
||||
|
||||
|
||||
fsClose(fs);
|
||||
vtDetach();
|
||||
exits(0);
|
||||
|
|
@ -119,7 +119,7 @@ new(Source *s, int trace, int depth)
|
|||
int i, n;
|
||||
Source *ss;
|
||||
Entry e;
|
||||
|
||||
|
||||
if(depth > maxdepth)
|
||||
maxdepth = depth;
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ delete(Source *s)
|
|||
}
|
||||
if(i == n)
|
||||
return 0;
|
||||
|
||||
|
||||
for(;;){
|
||||
ss = sourceOpen(s, nrand(n), OReadWrite);
|
||||
if(ss == nil)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ copyMetaBlock(MetaBlock mb)
|
|||
}
|
||||
|
||||
/*
|
||||
* visualizer
|
||||
* visualizer
|
||||
*/
|
||||
|
||||
#pragma varargck argpos stringnode 1
|
||||
|
|
@ -555,7 +555,7 @@ initxentryblock(Block *b, Entry *ed)
|
|||
}
|
||||
|
||||
typedef struct Xentry Xentry;
|
||||
struct Xentry
|
||||
struct Xentry
|
||||
{
|
||||
Tnode t;
|
||||
Entry e;
|
||||
|
|
@ -813,7 +813,7 @@ parseScore(uchar *score, char *buf, int n)
|
|||
|
||||
if((i & 1) == 0)
|
||||
c <<= 4;
|
||||
|
||||
|
||||
score[i>>1] |= c;
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -912,7 +912,7 @@ drawnub(Image *m, Image *clipr, Point o, Tnode *t)
|
|||
o.y += (display->defaultfont->height-Nubheight)/2;
|
||||
draw(m, rectaddpt(Rect(0,0,1,Nubheight), o), display->black, clipr, ZP);
|
||||
draw(m, rectaddpt(Rect(0,0,Nubwidth,1), o), display->black, clipr, o);
|
||||
draw(m, rectaddpt(Rect(Nubwidth-1,0,Nubwidth,Nubheight), o),
|
||||
draw(m, rectaddpt(Rect(Nubwidth-1,0,Nubwidth,Nubheight), o),
|
||||
display->black, clipr, addpt(o, Pt(Nubwidth-1, 0)));
|
||||
draw(m, rectaddpt(Rect(0, Nubheight-1, Nubwidth, Nubheight), o),
|
||||
display->black, clipr, addpt(o, Pt(0, Nubheight-1)));
|
||||
|
|
|
|||
|
|
@ -62,4 +62,3 @@ nextWalk(WalkPtr *w, uchar score[VtScoreSize], uchar *type, u32int *tag, Entry *
|
|||
w->n++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue