Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
szmi committed Mar 30, 2007
1 parent 2a53c58 commit 4a709fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 0 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
* Fix 2.6.9 RHEL kernels, which have compatibility mutex.h, but
don't define mutex_destroy(), bummer. Patch from Phil Schwan

2007-02-04 Miklos Szeredi <[email protected]>

* Released 2.6.3

2007-02-04 Miklos Szeredi <[email protected]>

* Compile fuseblk for kernels which don't have an option to turn
Expand Down
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
What is new in 2.7

- Stacking support for the high level API

- Fix problems with mtab writing

What is new in 2.6

- Improved read characteristics (asynchronous reads)
Expand Down
14 changes: 6 additions & 8 deletions example/hello.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ static int hello_getattr(const char *path, struct stat *stbuf)
int res = 0;

memset(stbuf, 0, sizeof(struct stat));
if(strcmp(path, "/") == 0) {
if (strcmp(path, "/") == 0) {
stbuf->st_mode = S_IFDIR | 0755;
stbuf->st_nlink = 2;
}
else if(strcmp(path, hello_path) == 0) {
} else if (strcmp(path, hello_path) == 0) {
stbuf->st_mode = S_IFREG | 0444;
stbuf->st_nlink = 1;
stbuf->st_size = strlen(hello_str);
}
else
} else
res = -ENOENT;

return res;
Expand All @@ -45,7 +43,7 @@ static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
(void) offset;
(void) fi;

if(strcmp(path, "/") != 0)
if (strcmp(path, "/") != 0)
return -ENOENT;

filler(buf, ".", NULL, 0);
Expand All @@ -57,10 +55,10 @@ static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler,

static int hello_open(const char *path, struct fuse_file_info *fi)
{
if(strcmp(path, hello_path) != 0)
if (strcmp(path, hello_path) != 0)
return -ENOENT;

if((fi->flags & 3) != O_RDONLY)
if ((fi->flags & 3) != O_RDONLY)
return -EACCES;

return 0;
Expand Down

0 comments on commit 4a709fc

Please sign in to comment.