mirror of
https://github.com/openharmony/third_party_libfuse.git
synced 2026-07-18 18:44:26 -04:00
trailing whitespace fix
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
the terms of the BSD Licence as follows:
|
||||
|
||||
Copyright (C) 2005 Miklos Szeredi. All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
@@ -20,7 +20,7 @@
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
|
||||
+2
-2
@@ -1820,11 +1820,11 @@ struct fuse *fuse_new_common(int fd, const char *opts,
|
||||
free(llopts);
|
||||
if (f->se == NULL)
|
||||
goto out_free;
|
||||
|
||||
|
||||
ch = fuse_kern_chan_new(fd);
|
||||
if (ch == NULL)
|
||||
goto out_free_session;
|
||||
|
||||
|
||||
fuse_session_add_chan(f->se, ch);
|
||||
|
||||
f->ctr = 0;
|
||||
|
||||
+2
-2
@@ -715,7 +715,7 @@ static void fuse_ll_process(void *data, const char *buf, size_t len,
|
||||
case FUSE_INIT:
|
||||
do_init(req, (struct fuse_init_in_out *) inarg);
|
||||
break;
|
||||
|
||||
|
||||
case FUSE_LOOKUP:
|
||||
do_lookup(req, in->nodeid, (char *) inarg);
|
||||
break;
|
||||
@@ -875,7 +875,7 @@ static void fuse_ll_destroy(void *data)
|
||||
}
|
||||
|
||||
|
||||
struct fuse_session *fuse_lowlevel_new(const char *opts,
|
||||
struct fuse_session *fuse_lowlevel_new(const char *opts,
|
||||
const struct fuse_lowlevel_ops *op,
|
||||
size_t op_size, void *userdata)
|
||||
{
|
||||
|
||||
+3
-3
@@ -109,13 +109,13 @@ static int mt_chan_receive(struct fuse_chan *ch, char *buf, size_t size)
|
||||
struct procdata *pd = (struct procdata *) fuse_chan_data(ch);
|
||||
|
||||
assert(size >= sizeof(cmd));
|
||||
|
||||
|
||||
cmd = fuse_read_cmd(pd->f);
|
||||
if (cmd == NULL)
|
||||
return 0;
|
||||
|
||||
|
||||
*(struct fuse_cmd **) buf = cmd;
|
||||
|
||||
|
||||
return sizeof(cmd);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ struct fuse_session {
|
||||
struct fuse_session_ops op;
|
||||
|
||||
void *data;
|
||||
|
||||
|
||||
volatile int exited;
|
||||
|
||||
struct fuse_chan *ch;
|
||||
@@ -31,7 +31,7 @@ struct fuse_chan {
|
||||
int fd;
|
||||
|
||||
size_t bufsize;
|
||||
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -105,7 +105,7 @@ int fuse_session_exited(struct fuse_session *se)
|
||||
return se->exited;
|
||||
}
|
||||
|
||||
struct fuse_chan *fuse_chan_new(struct fuse_chan_ops *op, int fd,
|
||||
struct fuse_chan *fuse_chan_new(struct fuse_chan_ops *op, int fd,
|
||||
size_t bufsize, void *data)
|
||||
{
|
||||
struct fuse_chan *ch = (struct fuse_chan *) malloc(sizeof(*ch));
|
||||
|
||||
+8
-8
@@ -550,10 +550,10 @@ static int do_test_open(int exist, int flags, const char *flags_str, int mode)
|
||||
res = create_file(testfile, testdata2, testdata2len);
|
||||
if (res == -1)
|
||||
return -1;
|
||||
|
||||
|
||||
currlen = testdata2len;
|
||||
}
|
||||
|
||||
|
||||
fd = open(testfile, flags, mode);
|
||||
if ((flags & O_CREAT) && (flags & O_EXCL) && exist) {
|
||||
if (fd != -1) {
|
||||
@@ -578,12 +578,12 @@ static int do_test_open(int exist, int flags, const char *flags_str, int mode)
|
||||
|
||||
if (flags & O_TRUNC)
|
||||
currlen = 0;
|
||||
|
||||
|
||||
err += check_type(testfile, S_IFREG);
|
||||
if (exist)
|
||||
err += check_mode(testfile, 0644);
|
||||
else
|
||||
err += check_mode(testfile, mode);
|
||||
err += check_mode(testfile, mode);
|
||||
err += check_nlink(testfile, 1);
|
||||
err += check_size(testfile, currlen);
|
||||
if (exist && !(flags & O_TRUNC) && (mode & 0400))
|
||||
@@ -602,7 +602,7 @@ static int do_test_open(int exist, int flags, const char *flags_str, int mode)
|
||||
currlen = datalen;
|
||||
|
||||
err += check_size(testfile, currlen);
|
||||
|
||||
|
||||
if (mode & 0400) {
|
||||
err += check_data(testfile, data, 0, datalen);
|
||||
if (exist && !(flags & O_TRUNC) && testdata2len > datalen)
|
||||
@@ -699,7 +699,7 @@ static int do_test_open_acc(int flags, const char *flags_str, int mode, int err)
|
||||
PERROR("chmod");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
res = check_mode(testfile, mode);
|
||||
if (res == -1)
|
||||
return -1;
|
||||
@@ -943,7 +943,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
basepath = argv[1];
|
||||
assert(strlen(basepath) < 512);
|
||||
|
||||
|
||||
sprintf(testfile, "%s/testfile", basepath);
|
||||
sprintf(testfile2, "%s/testfile2", basepath);
|
||||
sprintf(testdir, "%s/testdir", basepath);
|
||||
@@ -1001,7 +1001,7 @@ int main(int argc, char *argv[])
|
||||
err += test_open_acc(O_RDONLY, 0000, EACCES);
|
||||
err += test_open_acc(O_WRONLY, 0000, EACCES);
|
||||
err += test_open_acc(O_RDWR, 0000, EACCES);
|
||||
|
||||
|
||||
unlink(testfile);
|
||||
unlink(testfile2);
|
||||
rmdir(testdir);
|
||||
|
||||
+1
-1
@@ -199,7 +199,7 @@ static int remove_mount(const char *mnt, int quiet, const char *mtab,
|
||||
strcmp(p + 5, user) == 0)
|
||||
removed = 1;
|
||||
/* /etc/mtab is a link pointing to /proc/mounts: */
|
||||
else if ((p = strstr(entp->mnt_opts, "user_id=")) &&
|
||||
else if ((p = strstr(entp->mnt_opts, "user_id=")) &&
|
||||
(p == entp->mnt_opts || *(p-1) == ',') &&
|
||||
strncmp(p + 8, uidstr, uidlen) == 0 &&
|
||||
(*(p+8+uidlen) == ',' || *(p+8+uidlen) == '\0'))
|
||||
|
||||
Reference in New Issue
Block a user