diff options
author | lulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no> | 2008-04-23 16:01:09 +0200 |
---|---|---|
committer | lulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no> | 2008-04-23 16:01:09 +0200 |
commit | dd4b3fd1631838415aadf6902133294b2ad70104 (patch) | |
tree | be506ece0b1e4296cc70d28c06ec9f0af13f60f3 | |
parent | 7a8bf19bf00cb292455a37b71c492bd6c9c78cfe (diff) |
- Add structure to handle passing of data.
-rwxr-xr-x | src/mp3_vnops.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mp3_vnops.c b/src/mp3_vnops.c index ecc93cd..b704abd 100755 --- a/src/mp3_vnops.c +++ b/src/mp3_vnops.c @@ -63,11 +63,6 @@ static int mp3_readdir (const char *path, void *buf, fuse_fill_dir_t filler, return (-ENOENT); } -struct filler_data { - void *buf; - fuse_fill_dir_t filler; - -}; void traverse_hierarchy(char *dirpath, void (*fileop)(char *, void *), void *data) @@ -96,14 +91,25 @@ traverse_hierarchy(char *dirpath, void (*fileop)(char *, void *), void *data) return (0); } +struct filler_data { + void *buf; + fuse_fill_dir_t filler; +}; + +/* Retrieve artist name given a path. */ void mp3_artist(char *filepath, void *data) { - + struct filler_data *fd; ID3Tag *tag; ID3Frame *artist; ID3Field *field; - fuse_fill_dir_t filler = (fuse_fill_dir_t)data; + fuse_fill_dir_t filler; + void *buf; + + fd = (struct filler_data *)data; + filler = fd->filler; + buf = fd->buf; tag = ID3Tag_New(); ID3Tag_Link(tag, filepath); |