pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/filesystems/fuse-lzofs make pwd work



details:   https://anonhg.NetBSD.org/pkgsrc/rev/90fc92e83a1e
branches:  trunk
changeset: 526336:90fc92e83a1e
user:      pooka <pooka%pkgsrc.org@localhost>
date:      Thu Mar 08 05:14:38 2007 +0000

description:
make pwd work

diffstat:

 filesystems/fuse-lzofs/distinfo         |   4 +-
 filesystems/fuse-lzofs/patches/patch-ab |  47 ++++++++++++++++++++++++++------
 2 files changed, 40 insertions(+), 11 deletions(-)

diffs (110 lines):

diff -r 1c43319abe68 -r 90fc92e83a1e filesystems/fuse-lzofs/distinfo
--- a/filesystems/fuse-lzofs/distinfo   Wed Mar 07 23:32:49 2007 +0000
+++ b/filesystems/fuse-lzofs/distinfo   Thu Mar 08 05:14:38 2007 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/02/20 23:00:08 xtraeme Exp $
+$NetBSD: distinfo,v 1.2 2007/03/08 05:14:38 pooka Exp $
 
 SHA1 (LZOlayer_fs-20060306.tar.gz) = f069142a32d9b2325784329500689cc0dd726285
 RMD160 (LZOlayer_fs-20060306.tar.gz) = a9f839950368706b3c90cc5195168f6616947e40
 Size (LZOlayer_fs-20060306.tar.gz) = 17669 bytes
 SHA1 (patch-aa) = 70df68443cb7b4d9eec5effea0dbb0e3fc666551
-SHA1 (patch-ab) = 1c14076c136e410d5590e009d8f83bcf2173a5c9
+SHA1 (patch-ab) = 34a6ca5ea0229568dc87c303a36c1c453f3f3b81
diff -r 1c43319abe68 -r 90fc92e83a1e filesystems/fuse-lzofs/patches/patch-ab
--- a/filesystems/fuse-lzofs/patches/patch-ab   Wed Mar 07 23:32:49 2007 +0000
+++ b/filesystems/fuse-lzofs/patches/patch-ab   Thu Mar 08 05:14:38 2007 +0000
@@ -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 @@
      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 @@
    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 @@
    
    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 @@
    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 @@
        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 @@
      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);
    



Home | Main Index | Thread Index | Old Index