rpms/fsarchiver/F-12 fsarchiver-0.6.2-fix-splitting.patch,NONE,1.1

drago01 drago01 at fedoraproject.org
Tue Dec 22 19:40:23 UTC 2009


Author: drago01

Update of /cvs/pkgs/rpms/fsarchiver/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5958

Added Files:
	fsarchiver-0.6.2-fix-splitting.patch 
Log Message:
0.6.2

fsarchiver-0.6.2-fix-splitting.patch:
 fsarchiver.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- NEW FILE fsarchiver-0.6.2-fix-splitting.patch ---
diff -urN fsarchiver-0.6.2-orig/src/fsarchiver.c fsarchiver-0.6.2-patch/src/fsarchiver.c
--- fsarchiver-0.6.2-orig/src/fsarchiver.c	2009-12-07 20:20:16.000000000 +0000
+++ fsarchiver-0.6.2-patch/src/fsarchiver.c	2009-12-21 15:04:41.000000000 +0000
@@ -199,6 +199,7 @@
     sigset_t mask_set;
     char *probemode;
     bool probedetailed=0;
+    char tempbuf[512];
     char *command=NULL;
     char *archive=NULL;
     char *partition[32];
@@ -266,13 +267,18 @@
                 }
                 break;
             case 's': // split archive into several volumes
-                g_options.splitsize=atol(optarg)*1024*1024;
+                g_options.splitsize=((u64)atoll(optarg))*((u64)1024LL*1024LL);
                 if (g_options.splitsize==0)
                 {
                     errprintf("argument of option -s is invalid (%s). It must be a valid integer\n", optarg);
                     usage(progname, false);
                     return 1;
                 }
+                else // show the calculated size since it was probably incorrect before due to an integer overflow
+                {
+                    msgprintf(MSG_FORCE, "Archives will be split into volumes of the following size:\n%lld bytes (%s)",
+                        (long long)g_options.splitsize, format_size(g_options.splitsize, tempbuf, sizeof(tempbuf), 'h'));
+                }
                 break;
             case 'z': // compression level
                 g_options.fsacomplevel=atoi(optarg);




More information about the fedora-extras-commits mailing list