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
|
|
@ -15,7 +15,7 @@ allocfusemsg(void)
|
|||
{
|
||||
FuseMsg *m;
|
||||
void *vbuf;
|
||||
|
||||
|
||||
lock(&fusemsglock);
|
||||
if((m = fusemsglist) != nil){
|
||||
fusemsglist = m->next;
|
||||
|
|
@ -46,7 +46,7 @@ readfusemsg(void)
|
|||
{
|
||||
FuseMsg *m;
|
||||
int n, nn;
|
||||
|
||||
|
||||
m = allocfusemsg();
|
||||
/*
|
||||
* The FUSE kernel device apparently guarantees
|
||||
|
|
@ -84,7 +84,7 @@ readfusemsg(void)
|
|||
sysfatal("readfusemsg: got %d wanted %d",
|
||||
n, m->hdr->len);
|
||||
m->hdr->len -= sizeof(*m->hdr);
|
||||
|
||||
|
||||
/*
|
||||
* Paranoia.
|
||||
* Make sure lengths are long enough.
|
||||
|
|
@ -125,7 +125,7 @@ readfusemsg(void)
|
|||
if(((char*)m->tx)[m->hdr->len-1] != 0
|
||||
|| memchr(m->tx, 0, m->hdr->len-1) == 0)
|
||||
goto bad;
|
||||
break;
|
||||
break;
|
||||
case FUSE_MKNOD:
|
||||
if(m->hdr->len <= sizeof(struct fuse_mknod_in)
|
||||
|| ((char*)m->tx)[m->hdr->len-1] != 0)
|
||||
|
|
@ -219,7 +219,7 @@ readfusemsg(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Reply to FUSE request m using additonal
|
||||
* Reply to FUSE request m using additonal
|
||||
* argument buffer arg of size narg bytes.
|
||||
* Perhaps should free the FuseMsg here?
|
||||
*/
|
||||
|
|
@ -229,7 +229,7 @@ replyfuse(FuseMsg *m, void *arg, int narg)
|
|||
struct iovec vec[2];
|
||||
struct fuse_out_header hdr;
|
||||
int nvec;
|
||||
|
||||
|
||||
hdr.len = sizeof hdr + narg;
|
||||
hdr.error = 0;
|
||||
hdr.unique = m->hdr->unique;
|
||||
|
|
@ -255,7 +255,7 @@ void
|
|||
replyfuseerrno(FuseMsg *m, int e)
|
||||
{
|
||||
struct fuse_out_header hdr;
|
||||
|
||||
|
||||
hdr.len = sizeof hdr;
|
||||
hdr.error = -e; /* FUSE sends negative errnos. */
|
||||
hdr.unique = m->hdr->unique;
|
||||
|
|
@ -307,12 +307,12 @@ initfuse(char *mtpt)
|
|||
/*
|
||||
* Complain if the kernel is too new.
|
||||
* We could forge ahead, but at least the one time I tried,
|
||||
* the kernel rejected the newer version by making the
|
||||
* the kernel rejected the newer version by making the
|
||||
* writev fail in replyfuse, which is a much more confusing
|
||||
* error message. In the future, might be nice to try to
|
||||
* error message. In the future, might be nice to try to
|
||||
* support older versions that differ only slightly.
|
||||
*/
|
||||
if(tx->major < FUSE_KERNEL_VERSION
|
||||
if(tx->major < FUSE_KERNEL_VERSION
|
||||
|| (tx->major == FUSE_KERNEL_VERSION && tx->minor < FUSE_KERNEL_MINOR_VERSION))
|
||||
sysfatal("fuse: too kernel version %d.%d older than program version %d.%d",
|
||||
tx->major, tx->minor, FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
|
||||
|
|
@ -386,7 +386,7 @@ fusefmt(Fmt *fmt)
|
|||
}
|
||||
case FUSE_SYMLINK: {
|
||||
char *old, *new;
|
||||
|
||||
|
||||
old = a;
|
||||
new = a + strlen(a) + 1;
|
||||
fmtprint(fmt, "Symlink nodeid %#llux old %#q new %#q",
|
||||
|
|
@ -455,7 +455,7 @@ fusefmt(Fmt *fmt)
|
|||
case FUSE_RELEASE: {
|
||||
struct fuse_release_in *tx = a;
|
||||
fmtprint(fmt, "Release nodeid %#llux fh %#llux flags %#ux",
|
||||
hdr->nodeid, tx->fh, tx->flags);
|
||||
hdr->nodeid, tx->fh, tx->flags);
|
||||
break;
|
||||
}
|
||||
case FUSE_FSYNC: {
|
||||
|
|
@ -516,7 +516,7 @@ fusefmt(Fmt *fmt)
|
|||
case FUSE_RELEASEDIR: {
|
||||
struct fuse_release_in *tx = a;
|
||||
fmtprint(fmt, "Releasedir nodeid %#llux fh %#llux flags %#ux",
|
||||
hdr->nodeid, tx->fh, tx->flags);
|
||||
hdr->nodeid, tx->fh, tx->flags);
|
||||
break;
|
||||
}
|
||||
case FUSE_FSYNCDIR: {
|
||||
|
|
@ -554,7 +554,7 @@ fusefmt(Fmt *fmt)
|
|||
case FUSE_LOOKUP: {
|
||||
/*
|
||||
* For a negative entry, can send back ENOENT
|
||||
* or rx->ino == 0.
|
||||
* or rx->ino == 0.
|
||||
* In protocol version 7.4 and before, can only use
|
||||
* the ENOENT method.
|
||||
* Presumably the benefit of sending rx->ino == 0
|
||||
|
|
@ -571,7 +571,7 @@ fusefmt(Fmt *fmt)
|
|||
rx->attr_valid+rx->attr_valid_nsec*1e-9);
|
||||
fmtprint(fmt, " ino %#llux size %lld blocks %lld atime %.20g mtime %.20g ctime %.20g mode %#uo nlink %d uid %d gid %d rdev %#ux",
|
||||
rx->attr.ino, rx->attr.size, rx->attr.blocks,
|
||||
rx->attr.atime+rx->attr.atimensec*1e-9,
|
||||
rx->attr.atime+rx->attr.atimensec*1e-9,
|
||||
rx->attr.mtime+rx->attr.mtimensec*1e-9,
|
||||
rx->attr.ctime+rx->attr.ctimensec*1e-9,
|
||||
rx->attr.mode, rx->attr.nlink, rx->attr.uid,
|
||||
|
|
@ -592,7 +592,7 @@ fusefmt(Fmt *fmt)
|
|||
rx->attr_valid+rx->attr_valid_nsec*1e-9);
|
||||
fmtprint(fmt, " ino %#llux size %lld blocks %lld atime %.20g mtime %.20g ctime %.20g mode %#uo nlink %d uid %d gid %d rdev %#ux",
|
||||
rx->attr.ino, rx->attr.size, rx->attr.blocks,
|
||||
rx->attr.atime+rx->attr.atimensec*1e-9,
|
||||
rx->attr.atime+rx->attr.atimensec*1e-9,
|
||||
rx->attr.mtime+rx->attr.mtimensec*1e-9,
|
||||
rx->attr.ctime+rx->attr.ctimensec*1e-9,
|
||||
rx->attr.mode, rx->attr.nlink, rx->attr.uid,
|
||||
|
|
@ -733,7 +733,7 @@ fusefmt(Fmt *fmt)
|
|||
rx->e.attr_valid+rx->e.attr_valid_nsec*1e-9);
|
||||
fmtprint(fmt, " ino %#llux size %lld blocks %lld atime %.20g mtime %.20g ctime %.20g mode %#uo nlink %d uid %d gid %d rdev %#ux",
|
||||
rx->e.attr.ino, rx->e.attr.size, rx->e.attr.blocks,
|
||||
rx->e.attr.atime+rx->e.attr.atimensec*1e-9,
|
||||
rx->e.attr.atime+rx->e.attr.atimensec*1e-9,
|
||||
rx->e.attr.mtime+rx->e.attr.mtimensec*1e-9,
|
||||
rx->e.attr.ctime+rx->e.attr.ctimensec*1e-9,
|
||||
rx->e.attr.mode, rx->e.attr.nlink, rx->e.attr.uid,
|
||||
|
|
@ -753,7 +753,7 @@ fusefmt(Fmt *fmt)
|
|||
|
||||
/*
|
||||
* Mounts a fuse file system on mtpt and returns
|
||||
* a file descriptor for the corresponding fuse
|
||||
* a file descriptor for the corresponding fuse
|
||||
* message conversation.
|
||||
*/
|
||||
int
|
||||
|
|
@ -762,7 +762,7 @@ mountfuse(char *mtpt)
|
|||
#if defined(__linux__)
|
||||
int p[2], pid, fd;
|
||||
char buf[20];
|
||||
|
||||
|
||||
if(socketpair(AF_UNIX, SOCK_STREAM, 0, p) < 0)
|
||||
return -1;
|
||||
pid = fork();
|
||||
|
|
@ -783,11 +783,11 @@ mountfuse(char *mtpt)
|
|||
#elif defined(__FreeBSD__) && !defined(__APPLE__)
|
||||
int pid, fd;
|
||||
char buf[20];
|
||||
|
||||
|
||||
if((fd = open("/dev/fuse", ORDWR)) < 0)
|
||||
return -1;
|
||||
snprint(buf, sizeof buf, "%d", fd);
|
||||
|
||||
|
||||
pid = fork();
|
||||
if(pid < 0)
|
||||
return -1;
|
||||
|
|
@ -903,7 +903,7 @@ mountfuse(char *mtpt)
|
|||
_exit(1);
|
||||
}
|
||||
return fd;
|
||||
|
||||
|
||||
#else
|
||||
werrstr("cannot mount fuse on this system");
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue