Hello community,

here is the log from the commit of package clicfs for openSUSE:Factory
checked in at Wed Aug 3 17:47:54 CEST 2011.



--------
--- clicfs/clicfs.changes       2011-03-21 14:58:39.000000000 +0100
+++ /mounts/work_src_done/STABLE/clicfs/clicfs.changes  2011-03-23 
13:15:39.000000000 +0100
@@ -1,0 +2,12 @@
+Wed Mar 23 12:15:10 UTC 2011 - co...@novell.com
+
+- update to 1.4.1
+   - upstream patch
+   - support old fuse versions
+
+-------------------------------------------------------------------
+Mon Mar 21 17:13:38 CET 2011 - dmuel...@suse.de
+
+- fix crash when outfile is no longer writeable
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  fix-crash.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ clicfs.spec ++++++
--- /var/tmp/diff_new_pack.qFchiu/_old  2011-08-03 17:47:24.000000000 +0200
+++ /var/tmp/diff_new_pack.qFchiu/_new  2011-08-03 17:47:24.000000000 +0200
@@ -22,7 +22,7 @@
 BuildRequires:  cmake e2fsprogs-devel fuse-devel gcc-c++ openssl-devel xz-devel
 Requires:       fuse
 Summary:        Compressed Loop Image Container
-Version:        1.4.0
+Version:        1.4.1
 Release:        1
 License:        GPLv2
 Group:          System/Filesystems

++++++ clicfs.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/clicfs.c new/src/clicfs.c
--- old/src/clicfs.c    2011-03-21 14:55:37.000000000 +0100
+++ new/src/clicfs.c    2011-03-23 12:13:07.000000000 +0100
@@ -692,6 +692,9 @@
 {
     // avoid random reads or our profiling will be destroyed
     conn->max_readahead = 0;
+#ifdef FUSE_CAP_BIG_WRITES
+    conn->want = FUSE_CAP_BIG_WRITES;
+#endif
     clic_sync_tid = 0;
 
     pthread_create(&clic_sync_tid, NULL, clic_sync_thread, 0);
@@ -827,7 +830,6 @@
 
     // not sure why but multiple threads make it slower
     //fuse_opt_add_arg(&args, "-s");
-    fuse_opt_add_arg(&args, "-obig_writes");
 
     if (!packfilename) {
        fprintf(stderr, "usage: [-m <mb>] [-l <logfile|->] [-c <cowfile>] 
<packfile> <mntpoint>\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/src/unclicfs.c new/src/unclicfs.c
--- old/src/unclicfs.c  2011-03-21 14:55:37.000000000 +0100
+++ new/src/unclicfs.c  2011-03-23 12:13:07.000000000 +0100
@@ -34,15 +34,20 @@
       return 1;
     }
     const char *packfilename = argv[1];
-    
+
     if (clicfs_read_pack(packfilename))
       return 1;
 
+    FILE *outfile = fopen(thefile, "w");
+
+    if (!outfile) {
+        perror("Error while opening");
+        return 1;
+    }
+
     inbuf = malloc(blocksize_large*pagesize + 300);
     outbuf = malloc(blocksize_large*pagesize);
 
-    FILE *outfile = fopen(thefile, "w");
-
     size_t delta = num_pages / 100;
 
     size_t page;
@@ -81,13 +86,16 @@
            }
 
            if (fwrite(outbuf + pagesize * off, 1, pagesize, outfile) != 
pagesize) {
-               perror("write");
-               break;
+               perror("Error while writing the file");
+               return 1;
            }
        }
     }
 
-    fclose(outfile);
+    if (fclose(outfile)) {
+        perror("Error while closing the file");
+        return 1;
+    }
 
     return 0;
 }

++++++ fix-crash.diff ++++++
diff -ur a/src/unclicfs.c b/src/unclicfs.c
--- a/src/unclicfs.c    2011-03-21 14:55:37.000000000 +0100
+++ b/src/unclicfs.c    2011-03-21 17:09:22.133993657 +0100
@@ -34,15 +34,20 @@
       return 1;
     }
     const char *packfilename = argv[1];
-    
+
     if (clicfs_read_pack(packfilename))
       return 1;
 
+    FILE *outfile = fopen(thefile, "w");
+
+    if (!outfile) {
+        perror("Error while opening");
+        return 1;
+    }
+
     inbuf = malloc(blocksize_large*pagesize + 300);
     outbuf = malloc(blocksize_large*pagesize);
 
-    FILE *outfile = fopen(thefile, "w");
-
     size_t delta = num_pages / 100;
 
     size_t page;
@@ -81,13 +86,16 @@
            }
 
            if (fwrite(outbuf + pagesize * off, 1, pagesize, outfile) != 
pagesize) {
-               perror("write");
-               break;
+               perror("Error while writing the file");
+               return 1;
            }
        }
     }
 
-    fclose(outfile);
+    if (fclose(outfile)) {
+        perror("Error while closing the file");
+        return 1;
+    }
 
     return 0;
 }

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to