diff options
author | pooka <pooka@pkgsrc.org> | 2007-03-08 05:14:38 +0000 |
---|---|---|
committer | pooka <pooka@pkgsrc.org> | 2007-03-08 05:14:38 +0000 |
commit | 2f5d3009bfe4b0f60f7b1aaa3b4432bde96726d2 (patch) | |
tree | 80d9494b4f8853223c1cff5679fdbb31f622f082 /filesystems/fuse-lzofs/patches | |
parent | 5e2cc53c82b9a108eee6c7851a44e2eea77e7b74 (diff) | |
download | pkgsrc-2f5d3009bfe4b0f60f7b1aaa3b4432bde96726d2.tar.gz |
make pwd work
Diffstat (limited to 'filesystems/fuse-lzofs/patches')
-rw-r--r-- | filesystems/fuse-lzofs/patches/patch-ab | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/filesystems/fuse-lzofs/patches/patch-ab b/filesystems/fuse-lzofs/patches/patch-ab index e28ac1c7c67..d28a131e9da 100644 --- a/filesystems/fuse-lzofs/patches/patch-ab +++ b/filesystems/fuse-lzofs/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ +$NetBSD: patch-ab,v 1.2 2007/03/08 05:14:38 pooka Exp $ ---- LZOlayer_fs.c.orig 2007-02-18 16:38:19.000000000 +0100 -+++ LZOlayer_fs.c 2007-02-18 16:43:03.000000000 +0100 +--- LZOlayer_fs.c.orig 2006-05-19 04:23:35.000000000 +0900 ++++ LZOlayer_fs.c 2007-03-08 14:12:22.000000000 +0900 @@ -21,6 +21,15 @@ #define __USE_UNIX98 #include <unistd.h> @@ -27,7 +27,36 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ read(fd, &stbuf->st_size, sizeof(off_t)); close(fd); } -@@ -166,7 +175,7 @@ +@@ -143,15 +152,26 @@ + + static int LZOlayer_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi) + { ++ char dpath[MAXPATHLEN+1]; + char *xPath = LZOlayer_makePath(path); ++ char *p; + + DIR *dp = opendir(xPath); + struct dirent *dirp; ++ struct stat sb; ++ ++ strcpy(dpath, path); ++ p = dpath + strlen(path); + + while(dp) + { +- if ((dirp = readdir(dp)) != NULL) +- filler(buf, dirp->d_name, NULL, 0); ++ if ((dirp = readdir(dp)) != NULL) { ++ strcpy(p, dirp->d_name); ++ if (LZOlayer_getattr(dpath, &sb)) ++ filler(buf, dirp->d_name, NULL, 0); ++ else ++ filler(buf, dirp->d_name, &sb, 0); ++ } + else break; + } + +@@ -166,7 +186,7 @@ { char *xPath = LZOlayer_makePath(path); @@ -36,7 +65,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ off_t outLen = 0; read(fd, &outLen, sizeof(off_t)); close(fd); -@@ -193,7 +202,7 @@ +@@ -193,7 +213,7 @@ char *xPath = filePtr->path; int done = 0; @@ -45,7 +74,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ while(1) { -@@ -249,7 +258,7 @@ +@@ -249,7 +269,7 @@ off_t block_start = (float)filePtr->packets[min_offset].offset / (float)block_size; char *xPath = filePtr->path; @@ -54,7 +83,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ LZOlayer_block_seek(fd, block_start); off_t alloc_size = (filePtr->size-(block_start*block_size) -@@ -315,10 +324,10 @@ +@@ -315,10 +335,10 @@ { LZOlayer_packet_sync(path, fi); @@ -67,7 +96,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ chown(filePtr->path, fuse_get_context()->uid, fuse_get_context()->gid); } // old open/create for write -@@ -365,7 +374,7 @@ +@@ -365,7 +385,7 @@ } else { @@ -76,7 +105,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $ off_t null = 0; write(fd, &null, sizeof(off_t)); write(fd, &null, sizeof(off_t)); -@@ -383,7 +392,7 @@ +@@ -383,7 +403,7 @@ { char *xPath = LZOlayer_makePath(path); |