diff options
author | lulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no> | 2008-04-23 16:06:51 +0200 |
---|---|---|
committer | lulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no> | 2008-04-23 16:06:51 +0200 |
commit | 86314731468527bada0cbd911359dba89ab98882 (patch) | |
tree | 8d1f006277a100cc2ebbc4d99c1428670ec4ff18 | |
parent | dd4b3fd1631838415aadf6902133294b2ad70104 (diff) |
- Fix compile errors.
-rwxr-xr-x | src/mp3_vnops.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mp3_vnops.c b/src/mp3_vnops.c index b704abd..cfaed2f 100755 --- a/src/mp3_vnops.c +++ b/src/mp3_vnops.c @@ -13,6 +13,9 @@ const char *musicpath = "/home/lulf/dev/mp3fs/music"; +void traverse_hierarchy(char *, void (*)(char *, void *), void *); +void mp3_artist(char *, void *); + static int mp3_getattr (const char *path, struct stat *stbuf) { @@ -37,10 +40,9 @@ static int mp3_readdir (const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) { char *tmp; - char *parsepath, filepath[MAXPATHLEN]; - char name[MAXPATHLEN]; - struct stat st; - filler (buf, ".", NULL, 0); + char *parsepath; + + filler (buf, ".", NULL, 0); filler (buf, "..", NULL, 0); if (!strcmp(path, "/")) { @@ -70,6 +72,8 @@ traverse_hierarchy(char *dirpath, void (*fileop)(char *, void *), void *data) DIR *dirp; struct dirent *dp; char filepath[MAXPATHLEN]; + struct stat st; + dirp = opendir(dirpath); while ((dp = readdir(dirp)) != NULL) { if (!strcmp(dp->d_name, ".") || @@ -106,6 +110,7 @@ mp3_artist(char *filepath, void *data) ID3Field *field; fuse_fill_dir_t filler; void *buf; + char name[MAXPATHLEN]; fd = (struct filler_data *)data; filler = fd->filler; @@ -117,7 +122,6 @@ mp3_artist(char *filepath, void *data) field = ID3Frame_GetField(artist, ID3FN_TEXT); ID3Field_GetASCII(field, name, ID3Field_Size(field)); filler(buf, name, NULL, 0); - closedir(musicdirp); return 0; } |