aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fossil
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/fossil
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
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>
Diffstat (limited to 'src/cmd/fossil')
-rw-r--r--src/cmd/fossil/9fsys.c8
-rw-r--r--src/cmd/fossil/9lstn.c2
-rw-r--r--src/cmd/fossil/9p.c4
-rw-r--r--src/cmd/fossil/9ping.c6
-rw-r--r--src/cmd/fossil/archive.c4
-rw-r--r--src/cmd/fossil/bwatch.c3
-rw-r--r--src/cmd/fossil/cache.c24
-rw-r--r--src/cmd/fossil/flchk.c3
-rw-r--r--src/cmd/fossil/flfmt9660.c4
-rw-r--r--src/cmd/fossil/fs.c3
-rw-r--r--src/cmd/fossil/nobwatch.c1
-rw-r--r--src/cmd/fossil/pack.c1
-rw-r--r--src/cmd/fossil/periodic.c1
-rw-r--r--src/cmd/fossil/srcload.c8
-rw-r--r--src/cmd/fossil/view.c8
-rw-r--r--src/cmd/fossil/walk.c1
16 files changed, 37 insertions, 44 deletions
diff --git a/src/cmd/fossil/9fsys.c b/src/cmd/fossil/9fsys.c
index ac724251..121e5b66 100644
--- a/src/cmd/fossil/9fsys.c
+++ b/src/cmd/fossil/9fsys.c
@@ -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);
}
diff --git a/src/cmd/fossil/9lstn.c b/src/cmd/fossil/9lstn.c
index b4023e8b..4f960729 100644
--- a/src/cmd/fossil/9lstn.c
+++ b/src/cmd/fossil/9lstn.c
@@ -46,7 +46,7 @@ lstnListen(void* a)
Lstn *lstn;
int dfd, lfd;
char newdir[NETPATHLEN];
-
+
threadsetname("listen");
lstn = a;
diff --git a/src/cmd/fossil/9p.c b/src/cmd/fossil/9p.c
index 6738670e..e15622af 100644
--- a/src/cmd/fossil/9p.c
+++ b/src/cmd/fossil/9p.c
@@ -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){
diff --git a/src/cmd/fossil/9ping.c b/src/cmd/fossil/9ping.c
index dbf628c5..d820f208 100644
--- a/src/cmd/fossil/9ping.c
+++ b/src/cmd/fossil/9ping.c
@@ -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;
diff --git a/src/cmd/fossil/archive.c b/src/cmd/fossil/archive.c
index 7a88f23e..451fe628 100644
--- a/src/cmd/fossil/archive.c
+++ b/src/cmd/fossil/archive.c
@@ -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.
diff --git a/src/cmd/fossil/bwatch.c b/src/cmd/fossil/bwatch.c
index 8cd0956e..7dcd6b2d 100644
--- a/src/cmd/fossil/bwatch.c
+++ b/src/cmd/fossil/bwatch.c
@@ -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];
}
-
diff --git a/src/cmd/fossil/cache.c b/src/cmd/fossil/cache.c
index 23f89461..6707d50a 100644
--- a/src/cmd/fossil/cache.c
+++ b/src/cmd/fossil/cache.c
@@ -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);
diff --git a/src/cmd/fossil/flchk.c b/src/cmd/fossil/flchk.c
index c003f706..2068a617 100644
--- a/src/cmd/fossil/flchk.c
+++ b/src/cmd/fossil/flchk.c
@@ -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);
}
-
diff --git a/src/cmd/fossil/flfmt9660.c b/src/cmd/fossil/flfmt9660.c
index ac466bdd..128227d8 100644
--- a/src/cmd/fossil/flfmt9660.c
+++ b/src/cmd/fossil/flfmt9660.c
@@ -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);
}
diff --git a/src/cmd/fossil/fs.c b/src/cmd/fossil/fs.c
index 5f8a1cfd..d1baf736 100644
--- a/src/cmd/fossil/fs.c
+++ b/src/cmd/fossil/fs.c
@@ -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);
}
-
diff --git a/src/cmd/fossil/nobwatch.c b/src/cmd/fossil/nobwatch.c
index 9f98c03f..e0e7b17e 100644
--- a/src/cmd/fossil/nobwatch.c
+++ b/src/cmd/fossil/nobwatch.c
@@ -37,4 +37,3 @@ bwatchUnlock(Block *b)
{
USED(b);
}
-
diff --git a/src/cmd/fossil/pack.c b/src/cmd/fossil/pack.c
index b27f90b8..75077a05 100644
--- a/src/cmd/fossil/pack.c
+++ b/src/cmd/fossil/pack.c
@@ -222,4 +222,3 @@ Err:
werrstr(EBadSuper);
return 0;
}
-
diff --git a/src/cmd/fossil/periodic.c b/src/cmd/fossil/periodic.c
index 634f975d..6164eca2 100644
--- a/src/cmd/fossil/periodic.c
+++ b/src/cmd/fossil/periodic.c
@@ -79,4 +79,3 @@ periodicThread(void *a)
}
periodicFree(p);
}
-
diff --git a/src/cmd/fossil/srcload.c b/src/cmd/fossil/srcload.c
index 8cf63b4f..97e45541 100644
--- a/src/cmd/fossil/srcload.c
+++ b/src/cmd/fossil/srcload.c
@@ -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)
diff --git a/src/cmd/fossil/view.c b/src/cmd/fossil/view.c
index ed18febc..659e5380 100644
--- a/src/cmd/fossil/view.c
+++ b/src/cmd/fossil/view.c
@@ -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)));
diff --git a/src/cmd/fossil/walk.c b/src/cmd/fossil/walk.c
index 632e3e5e..8fb1ceb7 100644
--- a/src/cmd/fossil/walk.c
+++ b/src/cmd/fossil/walk.c
@@ -62,4 +62,3 @@ nextWalk(WalkPtr *w, uchar score[VtScoreSize], uchar *type, u32int *tag, Entry *
w->n++;
return 1;
}
-