Hello community,

here is the log from the commit of package fsarchiver for openSUSE:Factory 
checked in at 2016-08-15 10:31:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fsarchiver (Old)
 and      /work/SRC/openSUSE:Factory/.fsarchiver.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fsarchiver"

Changes:
--------
--- /work/SRC/openSUSE:Factory/fsarchiver/fsarchiver.changes    2016-07-14 
09:50:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.fsarchiver.new/fsarchiver.changes       
2016-08-15 10:32:01.000000000 +0200
@@ -1,0 +2,14 @@
+Thu Aug 11 11:18:39 UTC 2016 - [email protected]
+
+- Update to 0.8.0.
+  * Implemented FAT filesystem support for EFI system partitions.
+  * Allow user to specify new filesystem label or UUID during
+    restfs.
+  * Fixed more errors and warnings reported by cppcheck.
+- Changes in 0.6.24.
+  * Updated man page and description of the commands and options.
+  * Support for sparse inode chunks on XFS v5.
+  * Avoid internationalization when running commands so mkfs output
+    can be parsed properly.
+
+-------------------------------------------------------------------

Old:
----
  fsarchiver-0.6.23.tar.gz

New:
----
  fsarchiver-0.8.0.tar.gz

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

Other differences:
------------------
++++++ fsarchiver.spec ++++++
--- /var/tmp/diff_new_pack.WRxDeE/_old  2016-08-15 10:32:01.000000000 +0200
+++ /var/tmp/diff_new_pack.WRxDeE/_new  2016-08-15 10:32:01.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           fsarchiver
-Version:        0.6.23
+Version:        0.8.0
 Release:        0
 Summary:        Filesystem Archiver
 License:        GPL-2.0

++++++ fsarchiver-0.6.23.tar.gz -> fsarchiver-0.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/ChangeLog 
new/fsarchiver-0.8.0/ChangeLog
--- old/fsarchiver-0.6.23/ChangeLog     2016-06-16 20:52:20.000000000 +0200
+++ new/fsarchiver-0.8.0/ChangeLog      2016-08-09 23:06:37.000000000 +0200
@@ -1,5 +1,13 @@
 fsarchiver: Filesystem Archiver for Linux [http://www.fsarchiver.org]
 =====================================================================
+* 0.8.0 (2016-08-09):
+  - Implemented FAT filesystem support for EFI system partitions
+  - Allow user to specify new filesystem label or UUID during restfs
+  - Fixed more errors and warnings reported by cppcheck
+* 0.6.24 (2016-08-07):
+  - Updated man page and description of the commands and options
+  - Support for sparse inode chunks on XFS v5
+  - Avoid internationalization when running commands so mkfs output can be 
parsed properly
 * 0.6.23 (2016-06-16):
   - Added micro-seconds to timestamp used in the name of the temporary 
directory
   - Fixed memory leaks on failure scenarios and protect against buffer 
overflows in scanf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/THANKS new/fsarchiver-0.8.0/THANKS
--- old/fsarchiver-0.6.23/THANKS        2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/THANKS 2016-08-07 23:55:51.000000000 +0200
@@ -15,4 +15,5 @@
 Many thanks to Marcos Mello who helped a lot improve the XFS support
 in fsarchiver-0.6.20. He found unexpected fsarchiver behaviors with new
 versions of the kernel and xfsprogs, did a lot of research regarding these
-components, and tested the XFS fixes in fsarchiver.
+components, and tested the XFS fixes in fsarchiver. He also provided fixes
+and documentation updates in fsarchiver-0.6.24.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/configure 
new/fsarchiver-0.8.0/configure
--- old/fsarchiver-0.6.23/configure     2016-06-16 20:53:19.000000000 +0200
+++ new/fsarchiver-0.8.0/configure      2016-08-09 23:08:28.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for fsarchiver 0.6.23.
+# Generated by GNU Autoconf 2.69 for fsarchiver 0.8.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='fsarchiver'
 PACKAGE_TARNAME='fsarchiver'
-PACKAGE_VERSION='0.6.23'
-PACKAGE_STRING='fsarchiver 0.6.23'
+PACKAGE_VERSION='0.8.0'
+PACKAGE_STRING='fsarchiver 0.8.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1314,7 +1314,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures fsarchiver 0.6.23 to adapt to many kinds of systems.
+\`configure' configures fsarchiver 0.8.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1385,7 +1385,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of fsarchiver 0.6.23:";;
+     short | recursive ) echo "Configuration of fsarchiver 0.8.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1510,7 +1510,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-fsarchiver configure 0.6.23
+fsarchiver configure 0.8.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1875,7 +1875,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by fsarchiver $as_me 0.6.23, which was
+It was created by fsarchiver $as_me 0.8.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2224,7 +2224,7 @@
 
 
 
-$as_echo "#define PACKAGE_RELDATE \"2016-06-16\"" >>confdefs.h
+$as_echo "#define PACKAGE_RELDATE \"2016-08-09\"" >>confdefs.h
 
 
 $as_echo "#define PACKAGE_FILEFMT \"FsArCh_002\"" >>confdefs.h
@@ -2233,10 +2233,10 @@
 $as_echo "#define PACKAGE_VERSION_A 0" >>confdefs.h
 
 
-$as_echo "#define PACKAGE_VERSION_B 6" >>confdefs.h
+$as_echo "#define PACKAGE_VERSION_B 8" >>confdefs.h
 
 
-$as_echo "#define PACKAGE_VERSION_C 23" >>confdefs.h
+$as_echo "#define PACKAGE_VERSION_C 0" >>confdefs.h
 
 
 $as_echo "#define PACKAGE_VERSION_D 0" >>confdefs.h
@@ -2867,7 +2867,7 @@
 
 # Define the identity of the package.
  PACKAGE='fsarchiver'
- VERSION='0.6.23'
+ VERSION='0.8.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7167,7 +7167,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by fsarchiver $as_me 0.6.23, which was
+This file was extended by fsarchiver $as_me 0.8.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7233,7 +7233,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-fsarchiver config.status 0.6.23
+fsarchiver config.status 0.8.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/configure.ac 
new/fsarchiver-0.8.0/configure.ac
--- old/fsarchiver-0.6.23/configure.ac  2016-06-16 20:52:45.000000000 +0200
+++ new/fsarchiver-0.8.0/configure.ac   2016-08-09 23:06:56.000000000 +0200
@@ -3,12 +3,12 @@
 
 AC_PREREQ(2.59)
 
-AC_INIT([fsarchiver], 0.6.23)
-AC_DEFINE([PACKAGE_RELDATE], "2016-06-16", [Define the date of the release])
+AC_INIT([fsarchiver], 0.8.0)
+AC_DEFINE([PACKAGE_RELDATE], "2016-08-09", [Define the date of the release])
 AC_DEFINE([PACKAGE_FILEFMT], "FsArCh_002", [Define the version of the file 
format])
 AC_DEFINE([PACKAGE_VERSION_A], 0, [Major version number])
-AC_DEFINE([PACKAGE_VERSION_B], 6, [Medium version number])
-AC_DEFINE([PACKAGE_VERSION_C], 23, [Minor version number])
+AC_DEFINE([PACKAGE_VERSION_B], 8, [Medium version number])
+AC_DEFINE([PACKAGE_VERSION_C], 0, [Minor version number])
 AC_DEFINE([PACKAGE_VERSION_D], 0, [Patch version number])
 
 AC_CANONICAL_HOST([])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/distrib/rpm/fsarchiver.spec 
new/fsarchiver-0.8.0/distrib/rpm/fsarchiver.spec
--- old/fsarchiver-0.6.23/distrib/rpm/fsarchiver.spec   2016-06-14 
20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/distrib/rpm/fsarchiver.spec    2016-08-08 
00:00:41.000000000 +0200
@@ -1,5 +1,5 @@
 Name:          fsarchiver
-Version:       0.6.23
+Version:       0.8.0
 Release:       1%{?dist}
 Summary:       Safe and flexible file-system backup/deployment tool
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/doc/fsarchiver.8 
new/fsarchiver-0.8.0/doc/fsarchiver.8
--- old/fsarchiver-0.6.23/doc/fsarchiver.8      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/doc/fsarchiver.8       2016-08-09 21:33:52.000000000 
+0200
@@ -4,13 +4,13 @@
 fsarchiver \- filesystem archiver
 
 .SH DESCRIPTION
-fsarchiver is a system tool that allows you to save the contents of a 
-filesystem to a compressed archive file. The file-system can be restored 
-on a partition which has a different size and it can be restored on a 
-different file-system. Unlike tar/dar, FSArchiver also creates the 
-filesystem when it extracts the data to partitions. Everything is 
-checksummed in the archive in order to protect the data. If the archive 
-is corrupt, you just lose the current file, not the whole archive. 
+fsarchiver is a system tool that allows you to save the contents of a
+filesystem to a compressed archive file. The filesystem contents can be
+restored on a device which has a different size and it can be restored on a
+different filesystem. Unlike tar/dar, fsarchiver also creates the
+filesystem when it extracts the data to devices. Everything is checksummed
+in the archive in order to protect the data. If the archive is corrupt, you
+just lose the current file, not the whole archive.
 
 .SH LINKS
 .SS Official project homepage:
@@ -19,22 +19,24 @@
 http://www.fsarchiver.org/QuickStart
 .SS Forums where to ask questions:
 http://www.fsarchiver.org/forums/
+.SS Git repository:
+https://github.com/fdupoux/fsarchiver
 .SS Report a bug:
-http://www.fsarchiver.org/forums/viewforum.php?f=17
+https://github.com/fdupoux/fsarchiver/issues
 
 .SH SYNOPSIS
 .B fsarchiver [
 .I options
 .B ] savefs
 .I archive
-.I filesystem
+.I device
 .B ...
 .PP
 .B fsarchiver [
 .I options
 .B ] restfs
 .I archive
-.BI id= n ,dest= filesystem [,mkfs= fstype, mkfsopt= options ]
+.BI id= n ,dest= device [,mkfs= fstype ,mkfsopt= options ,label= newlabel 
,uuid= newuuid ]
 .B ...
 .PP
 .B fsarchiver [
@@ -62,20 +64,23 @@
 .TP
 .B savefs
 Save
-.I filesystems
-to
+.I device
+filesystem to
 .IR archive .
 .TP
 .B restfs
 Restore filesystems from
 .IR archive .
 This overwrites the existing data on
-.IR filesystems .
+.IR device .
 Zero-based index
 .I n
 indicates the part of the archive to restore.
 Optionally, a filesystem may be converted to
-.IR fstype .
+.IR fstype
+and extra mkfs
+.IR options
+specified.
 .TP
 .B savedir
 Save
@@ -98,8 +103,6 @@
 .B probe
 Show list of filesystems detected on the disks.
 
-
-
 .SH "OPTIONS"
 .PP
 .IP "\fB\-h, \-\-help\fP"
@@ -115,58 +118,56 @@
 Debug mode (can be used several times to increase the level of details).
 The details will be written in /var/log/fsarchiver.log.
 .IP "\fB\-A, \-\-allow-rw-mounted\fP"
-Allow to save a filesystem which is mounted in read-write (live backup).
-By default fsarchiver fails with an error if the partition is mounted 
-in read-write mode which allows modifications to be done on the filesystem
-during the backup. Modifications can drive to inconsistencies in the backup.
-Using lvm snapshots is the recommended way to make backups since it will
-provide consistency, but it is only available for filesystems which are on
-LVM logical-volumes.
+Allow to save a filesystem which is mounted in read-write (live backup). By
+default fsarchiver fails with an error if the device is mounted in
+read-write mode which allows modifications to be done on the filesystem
+during the backup. Modifications can drive to inconsistencies in the
+backup. Using LVM snapshots is the recommended way to make backups since it
+will provide consistency, but it is only available for filesystems which
+are on LVM logical volumes.
 .IP "\fB\-a, \-\-allow-no-acl-xattr\fP"
-Allow to run savefs when partition is mounted without the acl/xattr options.
-By default fsarchiver fails with an error if the partition is mounted
-in such a way that the ACL and Extended-Attributes are not readable. These
-attributes would not be saved and then such attributes could be lost. If you
-know what you don't need ACL and Extended-Attributes to be preserved then
-it's safe to run fsarchiver with that option.
+Allow to to save a filesystem when ACLs and extended attributes are not
+supported (or are disabled) by the kernel. By default fsarchiver fails with
+an error if it cannot access ACLs and extended attributes, since they would
+not be saved. If you do not need ACLs and extended attributes preserved
+then it is safe to use this option.
 .IP "\fB\-e pattern, \-\-exclude=pattern\fP"
-Exclude files and directories that match that pattern. The pattern can 
-contains shell asterisks such as * and ?, and the pattern may be either
-a simple file/dir name or an absolute file/dir path. You must use quotes
-around the pattern each time you use wildcards, else it would be interpreted
-by the shell. The wildcards must be interpreted by fsarchiver. See examples
-below for more details about this option.
+Exclude files and directories that match specified pattern. The pattern can
+contain shell wildcards such as * and ? or may be either a simple file/dir
+name or an absolute file/dir path. You must use quotes around the pattern
+each time you use wildcards, else it would be interpreted by the shell. The
+wildcards must be interpreted by fsarchiver. See examples below for more
+details about this option.
 .IP "\fB\-L label, \-\-label=label\fP"
-Set the label of the archive: it's just a comment about the contents. 
-It can be used to remember a particular thing about the archive or the
-state of the filesystem for instance.
+Set the label of the archive: it is just a comment about its contents. It
+can be used to remember a particular thing about the archive or the state
+of the filesystem for instance.
 .IP "\fB\-z level, \-\-compress=level\fP"
-Valid compression levels are between 1 (very fast) and 9 (very good).
-The memory requirement increases a lot with the best compression levels,
-and it's multiplied by the number of compression threads (option -j).
-Level 9 is considered as an extreme compression level and requires an
-huge amount of memory to run.
-For more details please read this page: http://www.fsarchiver.org/Compression
+Valid compression levels are between 1 (very fast) and 9 (very good). The
+memory requirement increases a lot with the best compression levels, and it
+is multiplied by the number of compression threads (option -j). Level 9 is
+considered as an extreme compression level and requires an huge amount of
+memory to run. For more details please read this page:
+http://www.fsarchiver.org/Compression
 .IP "\fB\-s mbsize, \-\-split=mbsize\fP"
 Split the archive into several files of mbsize megabytes each.
 .IP "\fB\-j count, \-\-jobs=count\fP"
-Create more than one compression thread. Useful on multi-core CPUs. 
-By default fsarchiver will only use one compression thread (-j 1) and
-then only one logical processor will be used for compression.
-You should use that option if you have a multi-core CPU or more than one
-physical CPU on your computer. The typical way to use this option is to
-specify the number of logical processors available so that all the
-processing power is used to compress the archive very quickly. You may 
-also want to use all the logical processors but one for that task so that
-the system stays responsive for other applications.
+Create more than one (de)compression thread. Useful on multi-core CPUs. By
+default fsarchiver will only use one (de)compression thread (-j 1) and then
+only one logical processor will be used for the task. You should use this
+option if you have a multi-core CPU or more than one physical CPU on your
+computer. The typical way to use it is to specify the number of logical
+processors available so that all the processing power is used to
+(de)compress the archive very quickly. You may also want to use all logical
+processors but one so that your system stays responsive for other
+applications.
 .IP "\fB\-c password, \-\-cryptpass=password\fP"
-Encrypt/decrypt data in archive. Password length: 6 to 64 chars.
-You can either provide a real password or a dash ("-c -") with this option
-if you do not want to provide the password in the command line and you
-want to be prompted for a password in the terminal instead.
+Encrypt/decrypt data in archive. Password length: 6 to 64 characters. You
+can either provide a real password or a dash (-c -). Use the dash if you do
+not want to provide the password in the command line. It will be prompted
+in the terminal instead.
 
 .SH EXAMPLES
-
 .SS save only one filesystem (/dev/sda1) to an archive:
 fsarchiver savefs /data/myarchive1.fsa /dev/sda1
 .SS save two filesystems (/dev/sda1 and /dev/sdb1) to an archive:
@@ -181,29 +182,35 @@
 fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reiserfs
 .SS restore a filesystem from an archive and specify extra mkfs options:
 fsarchiver restfs /data/myarchive1.fsa 
id=0,dest=/dev/sda1,mkfs=ext4,mkfsopt="-I 256"
+.SS restore a filesystem from an archive and specify a new filesystem label:
+fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,label=root
+.SS restore a filesystem from an archive and specify a new filesystem UUID:
+fsarchiver restfs /data/myarchive1.fsa 
id=0,dest=/dev/sda1,uuid=5f6e5f4f-dc2a-4dbd-a6ea-9ca997cde75e
 .SS save the contents of /usr/src/linux to an archive (similar to tar):
 fsarchiver savedir /data/linux-sources.fsa /usr/src/linux
-.SS save a /dev/sda1 to an archive split into volumes of 680MB:
+.SS save a filesystem (/dev/sda1) to an archive split into volumes of 680MB:
 fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1
-.SS save a filesystem and exclude all files/dirs called 'pagefile.*'
+.SS save a filesystem and exclude all files/dirs called 'pagefile.*':
 fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*'
-.SS exclude 'share' in both '/usr/share' and '/usr/local/share':
+.SS generic exclude for 'share' such as '/usr/share' and '/usr/local/share':
 fsarchiver savefs /data/myarchive.fsa --exclude=share
-.SS absolute exclude valid for '/usr/share' but not '/usr/local/share'
+.SS absolute exclude valid for '/usr/share' but not for '/usr/local/share':
 fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share
 .SS save a filesystem (/dev/sda1) to an encrypted archive:
 fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1
+.SS same as before but prompt for password in the terminal:
+fsarchiver savefs -c - /data/myarchive1.fsa /dev/sda1
 .SS extract an archive made of simple files to /tmp/extract:
-fsarchiver restdir /data/linux-sources.fsa /tmp/extract   
-.SS show information about an archive and its file systems:
+fsarchiver restdir /data/linux-sources.fsa /tmp/extract
+.SS show information about an archive and its filesystems:
 fsarchiver archinfo /data/myarchive2.fsa
 
 .SH WARNING
 .B fsarchiver
-is still in development, don't use it for critical data yet.
+is considered stable for Linux filesystems such as EXT4 and XFS but unstable 
for
+NTFS.
 
 .SH AUTHOR
-fsarchiver was written by Francois Dupoux. It is released under the 
-GPL2 (GNU General Public License version 2). This manpage was written 
+fsarchiver was written by Francois Dupoux. It is released under the
+GPL2 (GNU General Public License version 2). This manpage was written
 by Ilya Barygin and Francois Dupoux.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/Makefile.am 
new/fsarchiver-0.8.0/src/Makefile.am
--- old/fsarchiver-0.6.23/src/Makefile.am       2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/Makefile.am        2016-08-08 00:20:26.000000000 
+0200
@@ -4,14 +4,14 @@
        thread_archio.c archreader.c archwriter.c writebuf.c archinfo.c \
        thread_comp.c comp_gzip.c comp_bzip2.c comp_lzma.c comp_lzo.c crypto.c \
        fs_ntfs.c fs_ext2.c fs_reiserfs.c fs_reiser4.c fs_btrfs.c fs_xfs.c 
fs_jfs.c \
-       common.c dico.c strdico.c dichl.c queue.c error.c syncthread.c \
+       fs_vfat.c common.c dico.c strdico.c dichl.c queue.c error.c 
syncthread.c \
        datafile.c strlist.c regmulti.c options.c logfile.c filesys.c devinfo.c
 
 noinst_HEADERS         = fsarchiver.h oper_save.h oper_restore.h oper_probe.h \
        thread_archio.h archreader.h archwriter.h writebuf.h archinfo.h \
        thread_comp.h comp_gzip.h comp_bzip2.h comp_lzma.h comp_lzo.h crypto.h \
        fs_ntfs.h fs_ext2.h fs_reiserfs.h fs_reiser4.h fs_btrfs.h fs_xfs.h 
fs_jfs.h \
-       common.h dico.h strdico.h dichl.h queue.h error.h syncthread.h \
+       fs_vfat.h common.h dico.h strdico.h dichl.h queue.h error.h 
syncthread.h \
        datafile.h strlist.h regmulti.h options.h logfile.h types.h filesys.h 
devinfo.h
 
 fsarchiver_LDADD       = -lpthread -lrt \
@@ -33,4 +33,3 @@
 DEFS=@DEFS@ -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE 
-D_GNU_SOURCE
 
 MAINTAINERCLEANFILES   = Makefile.in
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/Makefile.in 
new/fsarchiver-0.8.0/src/Makefile.in
--- old/fsarchiver-0.6.23/src/Makefile.in       2016-06-16 20:53:20.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/Makefile.in        2016-08-09 23:08:29.000000000 
+0200
@@ -118,13 +118,14 @@
        fsarchiver-fs_ext2.$(OBJEXT) fsarchiver-fs_reiserfs.$(OBJEXT) \
        fsarchiver-fs_reiser4.$(OBJEXT) fsarchiver-fs_btrfs.$(OBJEXT) \
        fsarchiver-fs_xfs.$(OBJEXT) fsarchiver-fs_jfs.$(OBJEXT) \
-       fsarchiver-common.$(OBJEXT) fsarchiver-dico.$(OBJEXT) \
-       fsarchiver-strdico.$(OBJEXT) fsarchiver-dichl.$(OBJEXT) \
-       fsarchiver-queue.$(OBJEXT) fsarchiver-error.$(OBJEXT) \
-       fsarchiver-syncthread.$(OBJEXT) fsarchiver-datafile.$(OBJEXT) \
-       fsarchiver-strlist.$(OBJEXT) fsarchiver-regmulti.$(OBJEXT) \
-       fsarchiver-options.$(OBJEXT) fsarchiver-logfile.$(OBJEXT) \
-       fsarchiver-filesys.$(OBJEXT) fsarchiver-devinfo.$(OBJEXT)
+       fsarchiver-fs_vfat.$(OBJEXT) fsarchiver-common.$(OBJEXT) \
+       fsarchiver-dico.$(OBJEXT) fsarchiver-strdico.$(OBJEXT) \
+       fsarchiver-dichl.$(OBJEXT) fsarchiver-queue.$(OBJEXT) \
+       fsarchiver-error.$(OBJEXT) fsarchiver-syncthread.$(OBJEXT) \
+       fsarchiver-datafile.$(OBJEXT) fsarchiver-strlist.$(OBJEXT) \
+       fsarchiver-regmulti.$(OBJEXT) fsarchiver-options.$(OBJEXT) \
+       fsarchiver-logfile.$(OBJEXT) fsarchiver-filesys.$(OBJEXT) \
+       fsarchiver-devinfo.$(OBJEXT)
 fsarchiver_OBJECTS = $(am_fsarchiver_OBJECTS)
 am__DEPENDENCIES_1 =
 fsarchiver_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -314,14 +315,14 @@
        thread_archio.c archreader.c archwriter.c writebuf.c archinfo.c \
        thread_comp.c comp_gzip.c comp_bzip2.c comp_lzma.c comp_lzo.c crypto.c \
        fs_ntfs.c fs_ext2.c fs_reiserfs.c fs_reiser4.c fs_btrfs.c fs_xfs.c 
fs_jfs.c \
-       common.c dico.c strdico.c dichl.c queue.c error.c syncthread.c \
+       fs_vfat.c common.c dico.c strdico.c dichl.c queue.c error.c 
syncthread.c \
        datafile.c strlist.c regmulti.c options.c logfile.c filesys.c devinfo.c
 
 noinst_HEADERS = fsarchiver.h oper_save.h oper_restore.h oper_probe.h \
        thread_archio.h archreader.h archwriter.h writebuf.h archinfo.h \
        thread_comp.h comp_gzip.h comp_bzip2.h comp_lzma.h comp_lzo.h crypto.h \
        fs_ntfs.h fs_ext2.h fs_reiserfs.h fs_reiser4.h fs_btrfs.h fs_xfs.h 
fs_jfs.h \
-       common.h dico.h strdico.h dichl.h queue.h error.h syncthread.h \
+       fs_vfat.h common.h dico.h strdico.h dichl.h queue.h error.h 
syncthread.h \
        datafile.h strlist.h regmulti.h options.h logfile.h types.h filesys.h 
devinfo.h
 
 fsarchiver_LDADD = -lpthread -lrt \
@@ -449,6 +450,7 @@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fs_ntfs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fs_reiser4.Po@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fs_reiserfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fs_vfat.Po@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fs_xfs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-fsarchiver.Po@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/fsarchiver-logfile.Po@am__quote@
@@ -787,6 +789,20 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -c -o 
fsarchiver-fs_jfs.obj `if test -f 'fs_jfs.c'; then $(CYGPATH_W) 'fs_jfs.c'; 
else $(CYGPATH_W) '$(srcdir)/fs_jfs.c'; fi`
 
+fsarchiver-fs_vfat.o: fs_vfat.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -MT 
fsarchiver-fs_vfat.o -MD -MP -MF $(DEPDIR)/fsarchiver-fs_vfat.Tpo -c -o 
fsarchiver-fs_vfat.o `test -f 'fs_vfat.c' || echo '$(srcdir)/'`fs_vfat.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fsarchiver-fs_vfat.Tpo 
$(DEPDIR)/fsarchiver-fs_vfat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fs_vfat.c' 
object='fsarchiver-fs_vfat.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -c -o 
fsarchiver-fs_vfat.o `test -f 'fs_vfat.c' || echo '$(srcdir)/'`fs_vfat.c
+
+fsarchiver-fs_vfat.obj: fs_vfat.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -MT 
fsarchiver-fs_vfat.obj -MD -MP -MF $(DEPDIR)/fsarchiver-fs_vfat.Tpo -c -o 
fsarchiver-fs_vfat.obj `if test -f 'fs_vfat.c'; then $(CYGPATH_W) 'fs_vfat.c'; 
else $(CYGPATH_W) '$(srcdir)/fs_vfat.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fsarchiver-fs_vfat.Tpo 
$(DEPDIR)/fsarchiver-fs_vfat.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='fs_vfat.c' 
object='fsarchiver-fs_vfat.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -c -o 
fsarchiver-fs_vfat.obj `if test -f 'fs_vfat.c'; then $(CYGPATH_W) 'fs_vfat.c'; 
else $(CYGPATH_W) '$(srcdir)/fs_vfat.c'; fi`
+
 fsarchiver-common.o: common.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(fsarchiver_CFLAGS) $(CFLAGS) -MT 
fsarchiver-common.o -MD -MP -MF $(DEPDIR)/fsarchiver-common.Tpo -c -o 
fsarchiver-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/fsarchiver-common.Tpo 
$(DEPDIR)/fsarchiver-common.Po
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/archwriter.c 
new/fsarchiver-0.8.0/src/archwriter.c
--- old/fsarchiver-0.6.23/src/archwriter.c      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/archwriter.c       2016-08-09 21:33:26.000000000 
+0200
@@ -189,12 +189,12 @@
     
     assert(ai);
     assert(wb);
-    
-    if (wb->size <=0)
+
+    if (wb->size == 0)
     {   errprintf("wb->size=%ld\n", (long)wb->size);
         return -1;
     }
-    
+
     if ((lres=write(ai->archfd, (char*)wb->data, 
(long)wb->size))!=(long)wb->size)
     {
         errprintf("write(size=%ld) returned %ld\n", (long)wb->size, 
(long)lres);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/common.c 
new/fsarchiver-0.8.0/src/common.c
--- old/fsarchiver-0.6.23/src/common.c  2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/common.c   2016-08-09 21:12:25.000000000 +0200
@@ -358,6 +358,7 @@
         close(pfildes1[1]); // close excess fildes
         dup2(pfildes2[1],2); // make 1 same as write-to end of pipe
         close(pfildes2[1]); // close excess fildes
+        setenv("LC_ALL", "C", 1); // kill internationalization
         execvp(pathtoprog, argv);
         errprintf("execvp(%s) failed\n", pathtoprog); // still around? exec 
failed
         wordfree(&p);
@@ -396,9 +397,9 @@
         
         // read the remaining data in the pipes 
         if ((stdoutbuf!=NULL) && (outpos+1 < stdoutsize))
-            res=read(mystdout, stdoutbuf+outpos, stdoutsize-outpos-1);
+            read(mystdout, stdoutbuf+outpos, stdoutsize-outpos-1);
         if ((stderrbuf!=NULL) && (errpos+1 < stderrsize))
-            res=read(mystderr, stderrbuf+errpos, stderrsize-errpos-1);
+            read(mystderr, stderrbuf+errpos, stderrsize-errpos-1);
         
         msgprintf(MSG_VERB1, "command [%s] returned %d\n", command, 
WEXITSTATUS(status));
         if (exitst)
@@ -615,4 +616,3 @@
     
     return 0;
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/filesys.c 
new/fsarchiver-0.8.0/src/filesys.c
--- old/fsarchiver-0.6.23/src/filesys.c 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/filesys.c  2016-08-08 20:50:34.000000000 +0200
@@ -40,20 +40,22 @@
 #include "fs_xfs.h"
 #include "fs_jfs.h"
 #include "fs_ntfs.h"
+#include "fs_vfat.h"
 #include "error.h"
 
 cfilesys filesys[]=
 {
-    {"ext2",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext2_mkfs, 
    ext2_test,     extfs_get_reqmntopt,    true,  true,  false, false},
-    {"ext3",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext3_mkfs, 
    ext3_test,     extfs_get_reqmntopt,    true,  true,  false, false},
-    {"ext4",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext4_mkfs, 
    ext4_test,     extfs_get_reqmntopt,    true,  true,  false, false},
-    {"reiserfs", reiserfs_mount, reiserfs_umount, reiserfs_getinfo, 
reiserfs_mkfs, reiserfs_test, reiserfs_get_reqmntopt, true,  true,  false, 
false},
-    {"reiser4",  reiser4_mount,  reiser4_umount,  reiser4_getinfo,  
reiser4_mkfs,  reiser4_test,  reiser4_get_reqmntopt,  true,  true,  false, 
false},
-    {"btrfs",    btrfs_mount,    btrfs_umount,    btrfs_getinfo,    
btrfs_mkfs,    btrfs_test,    btrfs_get_reqmntopt,    true,  true,  false, 
false},
-    {"xfs",      xfs_mount,      xfs_umount,      xfs_getinfo,      xfs_mkfs,  
    xfs_test,      xfs_get_reqmntopt,      true,  true,  false, false},
-    {"jfs",      jfs_mount,      jfs_umount,      jfs_getinfo,      jfs_mkfs,  
    jfs_test,      jfs_get_reqmntopt,      true,  true,  false, false},
-    {"ntfs",     ntfs_mount,     ntfs_umount,     ntfs_getinfo,     ntfs_mkfs, 
    ntfs_test,     ntfs_get_reqmntopt,     false, false, true,  true},
-    {NULL,       NULL,           NULL,            NULL,             NULL,      
    NULL,          NULL,                   false, false},
+    {"ext2",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext2_mkfs, 
    ext2_test,     extfs_get_reqmntopt,    true,  true,  false, false, true},
+    {"ext3",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext3_mkfs, 
    ext3_test,     extfs_get_reqmntopt,    true,  true,  false, false, true},
+    {"ext4",     extfs_mount,    extfs_umount,    extfs_getinfo,    ext4_mkfs, 
    ext4_test,     extfs_get_reqmntopt,    true,  true,  false, false, true},
+    {"reiserfs", reiserfs_mount, reiserfs_umount, reiserfs_getinfo, 
reiserfs_mkfs, reiserfs_test, reiserfs_get_reqmntopt, true,  true,  false, 
false, true},
+    {"reiser4",  reiser4_mount,  reiser4_umount,  reiser4_getinfo,  
reiser4_mkfs,  reiser4_test,  reiser4_get_reqmntopt,  true,  true,  false, 
false, true},
+    {"btrfs",    btrfs_mount,    btrfs_umount,    btrfs_getinfo,    
btrfs_mkfs,    btrfs_test,    btrfs_get_reqmntopt,    true,  true,  false, 
false, true},
+    {"xfs",      xfs_mount,      xfs_umount,      xfs_getinfo,      xfs_mkfs,  
    xfs_test,      xfs_get_reqmntopt,      true,  true,  false, false, true},
+    {"jfs",      jfs_mount,      jfs_umount,      jfs_getinfo,      jfs_mkfs,  
    jfs_test,      jfs_get_reqmntopt,      true,  true,  false, false, true},
+    {"ntfs",     ntfs_mount,     ntfs_umount,     ntfs_getinfo,     ntfs_mkfs, 
    ntfs_test,     ntfs_get_reqmntopt,     false, false, true,  true,  false},
+    {"vfat",     vfat_mount,     vfat_umount,     vfat_getinfo,     vfat_mkfs, 
    vfat_test,     vfat_get_reqmntopt,     false, false, false, false, true},
+    {NULL,       NULL,           NULL,            NULL,             NULL,      
    NULL,          NULL,                   false, false, false, false, false}
 };
 
 // return the index of a filesystem in the filesystem table
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/filesys.h 
new/fsarchiver-0.8.0/src/filesys.h
--- old/fsarchiver-0.6.23/src/filesys.h 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/filesys.h  2016-08-09 21:33:52.000000000 +0200
@@ -32,13 +32,14 @@
     int (*mount)(char *partition, char *mntbuf, char *fsname, int flags, char 
*mntinfo);
     int (*umount)(char *partition, char *mntbuf);
     int (*getinfo)(struct s_dico *d, char *devname);
-    int (*mkfs)(struct s_dico *d, char *partition, char *fsoptions);
+    int (*mkfs)(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
     int (*test)(char *partition);
     int (*reqmntopt)(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
     bool support_for_xattr;
     bool support_for_acls;
     bool winattr;
     bool savesymtargettype; // we have to know the type of the target to 
recreate a symlink on ntfs
+    bool stable; // say if the fsarchiver support for this filesystem is 
considered stable or not
 };
 
 extern cfilesys filesys[];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_btrfs.c 
new/fsarchiver-0.8.0/src/fs_btrfs.c
--- old/fsarchiver-0.6.23/src/fs_btrfs.c        2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_btrfs.c 2016-08-09 21:33:52.000000000 +0200
@@ -50,7 +50,7 @@
     return 0;
 }
 
-int btrfs_mkfs(cdico *d, char *partition, char *fsoptions)
+int btrfs_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
     char command[2048];
     char buffer[2048];
@@ -88,9 +88,16 @@
 
     strlcatf(options, sizeof(options), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " -L '%s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " -L '%s' ", buffer);
-    
+
+    if (strlen(mkfsuuid) > 0)
+        strlcatf(options, sizeof(options), " -U '%s' ", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0)
+        strlcatf(options, sizeof(options), " -U '%s' ", buffer);
+
     if (dico_get_u64(d, 0, FSYSHEADKEY_FSBTRFSSECTORSIZE, &temp64)==0)
         strlcatf(options, sizeof(options), " -s %ld ", (long)temp64);
     
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_btrfs.h 
new/fsarchiver-0.8.0/src/fs_btrfs.h
--- old/fsarchiver-0.6.23/src/fs_btrfs.h        2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_btrfs.h 2016-08-09 21:33:52.000000000 +0200
@@ -21,7 +21,7 @@
 struct s_dico;
 struct s_strlist;
 
-int btrfs_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int btrfs_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int btrfs_getinfo(struct s_dico *d, char *devname);
 int btrfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int btrfs_umount(char *partition, char *mntbuf);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_ext2.c 
new/fsarchiver-0.8.0/src/fs_ext2.c
--- old/fsarchiver-0.6.23/src/fs_ext2.c 2016-06-14 20:56:06.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_ext2.c  2016-08-09 21:33:52.000000000 +0200
@@ -84,19 +84,19 @@
     }
 }
 
-int ext2_mkfs(cdico *d, char *partition, char *fsoptions)
+int ext2_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
-    return extfs_mkfs(d, partition, EXTFSTYPE_EXT2, fsoptions);
+    return extfs_mkfs(d, partition, EXTFSTYPE_EXT2, fsoptions, mkfslabel, 
mkfsuuid);
 }
 
-int ext3_mkfs(cdico *d, char *partition, char *fsoptions)
+int ext3_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
-    return extfs_mkfs(d, partition, EXTFSTYPE_EXT3, fsoptions);
+    return extfs_mkfs(d, partition, EXTFSTYPE_EXT3, fsoptions, mkfslabel, 
mkfsuuid);
 }
 
-int ext4_mkfs(cdico *d, char *partition, char *fsoptions)
+int ext4_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
-    return extfs_mkfs(d, partition, EXTFSTYPE_EXT4, fsoptions);
+    return extfs_mkfs(d, partition, EXTFSTYPE_EXT4, fsoptions, mkfslabel, 
mkfsuuid);
 }
 
 int extfs_get_fstype_from_compat_flags(u32 compat, u32 incompat, u32 ro_compat)
@@ -137,7 +137,7 @@
     return 0;
 }
 
-int extfs_mkfs(cdico *d, char *partition, int extfstype, char *fsoptions)
+int extfs_mkfs(cdico *d, char *partition, int extfstype, char *fsoptions, char 
*mkfslabel, char *mkfsuuid)
 {
     cstrlist strfeatures;
     u64 features_tab[3];
@@ -185,7 +185,9 @@
     strlcatf(options, sizeof(options), " %s ", fsoptions);
     
     // ---- set the advanced filesystem settings from the dico
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " -L '%.16s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " -L '%.16s' ", buffer);
     
     if (dico_get_u64(d, 0, FSYSHEADKEY_FSEXTBLOCKSIZE, &temp64)==0)
@@ -288,7 +290,9 @@
     
     // ---- use tune2fs to set the other advanced options
     memset(options, 0, sizeof(options));
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 
&& strlen(buffer)==36)
+    if (strlen(mkfsuuid) > 0)
+        strlcatf(options, sizeof(options), " -U %s ", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0 && strlen(buffer)==36)
         strlcatf(options, sizeof(options), " -U %s ", buffer);
     
     if (dico_get_string(d, 0, FSYSHEADKEY_FSEXTDEFMNTOPT, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_ext2.h 
new/fsarchiver-0.8.0/src/fs_ext2.h
--- old/fsarchiver-0.6.23/src/fs_ext2.h 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_ext2.h  2016-08-09 21:33:52.000000000 +0200
@@ -23,13 +23,13 @@
 
 enum {EXTFSTYPE_EXT2, EXTFSTYPE_EXT3, EXTFSTYPE_EXT4};
 
-int ext2_mkfs(struct s_dico *d, char *partition, char *fsoptions);
-int ext3_mkfs(struct s_dico *d, char *partition, char *fsoptions);
-int ext4_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int ext2_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
+int ext3_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
+int ext4_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int extfs_getinfo(struct s_dico *d, char *devname);
 int extfs_get_fstype_from_compat_flags(u32 compat, u32 incompat, u32 
ro_compat);
 int extfs_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
-int extfs_mkfs(struct s_dico *d, char *partition, int extfstype, char 
*fsoptions);
+int extfs_mkfs(struct s_dico *d, char *partition, int extfstype, char 
*fsoptions, char *mkfslabel, char *mkfsuuid);
 int extfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int extfs_umount(char *partition, char *mntbuf);
 int extfs_test(char *partition, int extfstype);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_jfs.c 
new/fsarchiver-0.8.0/src/fs_jfs.c
--- old/fsarchiver-0.6.23/src/fs_jfs.c  2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_jfs.c   2016-08-09 21:33:52.000000000 +0200
@@ -35,7 +35,7 @@
 #include "strlist.h"
 #include "error.h"
 
-int jfs_mkfs(cdico *d, char *partition, char *fsoptions)
+int jfs_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, char 
*mkfsuuid)
 {
     char command[2048];
     char buffer[2048];
@@ -53,7 +53,9 @@
 
     strlcatf(options, sizeof(options), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " -L '%s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " -L '%s' ", buffer);
     
     if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, 
"mkfs.jfs -q %s %s", options, partition)!=0 || exitst!=0)
@@ -63,7 +65,9 @@
     
     // ---- use jfs_tune to set the other advanced options
     memset(options, 0, sizeof(options));
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 
&& strlen(buffer)==36)
+    if (strlen(mkfsuuid) > 0)
+        strlcatf(options, sizeof(options), " -U %s ", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0 && strlen(buffer)==36)
         strlcatf(options, sizeof(options), " -U %s ", buffer);
     
     if (options[0])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_jfs.h 
new/fsarchiver-0.8.0/src/fs_jfs.h
--- old/fsarchiver-0.6.23/src/fs_jfs.h  2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_jfs.h   2016-08-09 21:33:52.000000000 +0200
@@ -21,7 +21,7 @@
 struct s_dico;
 struct s_strlist;
 
-int jfs_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int jfs_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int jfs_getinfo(struct s_dico *d, char *devname);
 int jfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int jfs_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_ntfs.c 
new/fsarchiver-0.8.0/src/fs_ntfs.c
--- old/fsarchiver-0.6.23/src/fs_ntfs.c 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_ntfs.c  2016-08-09 21:33:52.000000000 +0200
@@ -34,7 +34,7 @@
 #include "strlist.h"
 #include "error.h"
 
-int ntfs_mkfs(cdico *d, char *partition, char *fsoptions)
+int ntfs_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
     char command[2048];
     char buffer[2048];
@@ -55,7 +55,9 @@
 
     strlcatf(options, sizeof(options), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " --label '%s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " --label '%s' ", buffer);
     
     if (dico_get_u16(d, 0, FSYSHEADKEY_NTFSSECTORSIZE, &temp16)==0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_ntfs.h 
new/fsarchiver-0.8.0/src/fs_ntfs.h
--- old/fsarchiver-0.6.23/src/fs_ntfs.h 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_ntfs.h  2016-08-09 21:33:52.000000000 +0200
@@ -33,7 +33,7 @@
     u64 uuid;
 };
 
-int ntfs_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int ntfs_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int ntfs_getinfo(struct s_dico *d, char *devname);
 int ntfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int ntfs_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_reiser4.c 
new/fsarchiver-0.8.0/src/fs_reiser4.c
--- old/fsarchiver-0.6.23/src/fs_reiser4.c      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_reiser4.c       2016-08-09 21:33:52.000000000 
+0200
@@ -35,7 +35,7 @@
 #include "strlist.h"
 #include "error.h"
 
-int reiser4_mkfs(cdico *d, char *partition, char *fsoptions)
+int reiser4_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
     char command[2048];
     char buffer[2048];
@@ -54,13 +54,17 @@
 
     strlcatf(options, sizeof(options), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " -L '%.16s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " -L '%.16s' ", buffer);
     
     if (dico_get_u64(d, 0, FSYSHEADKEY_FSREISER4BLOCKSIZE, &temp64)==0)
         strlcatf(options, sizeof(options), " -b %ld ", (long)temp64);
     
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 
&& strlen(buffer)==36)
+    if (strlen(mkfsuuid) > 0)
+        strlcatf(options, sizeof(options), " -U %s ", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0 && strlen(buffer)==36)
         strlcatf(options, sizeof(options), " -U %s ", buffer);
     
     if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, 
"mkfs.reiser4 -y %s %s", partition, options)!=0 || exitst!=0)
@@ -126,8 +130,8 @@
     temp16=le16_to_cpu(sb.blocksize);
     if (temp16!=4096)
     {   ret=-5;
-        goto reiser4_get_specific_close;
         errprintf("invalid reiser4 block-size: %ld, it should be 4096\n", 
(long)temp16);
+        goto reiser4_get_specific_close;
     }
     else
     {   dico_add_u64(d, 0, FSYSHEADKEY_FSREISER4BLOCKSIZE, temp16);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_reiser4.h 
new/fsarchiver-0.8.0/src/fs_reiser4.h
--- old/fsarchiver-0.6.23/src/fs_reiser4.h      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_reiser4.h       2016-08-09 21:33:52.000000000 
+0200
@@ -21,7 +21,7 @@
 struct s_dico;
 struct s_strlist;
 
-int reiser4_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int reiser4_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int reiser4_getinfo(struct s_dico *d, char *devname);
 int reiser4_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int reiser4_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_reiserfs.c 
new/fsarchiver-0.8.0/src/fs_reiserfs.c
--- old/fsarchiver-0.6.23/src/fs_reiserfs.c     2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_reiserfs.c      2016-08-09 21:33:52.000000000 
+0200
@@ -35,7 +35,7 @@
 #include "strlist.h"
 #include "error.h"
 
-int reiserfs_mkfs(cdico *d, char *partition, char *fsoptions)
+int reiserfs_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
 {
     char command[2048];
     char buffer[2048];
@@ -54,13 +54,17 @@
 
     strlcatf(options, sizeof(options), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(options, sizeof(options), " -l '%.16s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(options, sizeof(options), " -l '%.16s' ", buffer);
     
     if (dico_get_u64(d, 0, FSYSHEADKEY_FSREISERBLOCKSIZE, &temp64)==0)
         strlcatf(options, sizeof(options), " -b %ld ", (long)temp64);
     
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, sizeof(buffer))==0 
&& strlen(buffer)==36)
+    if (strlen(mkfsuuid) > 0)
+        strlcatf(options, sizeof(options), " -u %s ", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0 && strlen(buffer)==36)
         strlcatf(options, sizeof(options), " -u %s ", buffer);
     
     if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, 
"mkreiserfs -f %s %s", partition, options)!=0 || exitst!=0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_reiserfs.h 
new/fsarchiver-0.8.0/src/fs_reiserfs.h
--- old/fsarchiver-0.6.23/src/fs_reiserfs.h     2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fs_reiserfs.h      2016-08-09 21:33:52.000000000 
+0200
@@ -21,7 +21,7 @@
 struct s_dico;
 struct s_strlist;
 
-int reiserfs_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int reiserfs_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int reiserfs_getinfo(struct s_dico *d, char *devname);
 int reiserfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int reiserfs_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_vfat.c 
new/fsarchiver-0.8.0/src/fs_vfat.c
--- old/fsarchiver-0.6.23/src/fs_vfat.c 1970-01-01 01:00:00.000000000 +0100
+++ new/fsarchiver-0.8.0/src/fs_vfat.c  2016-08-09 21:33:52.000000000 +0200
@@ -0,0 +1,200 @@
+/*
+ * fsarchiver: Filesystem Archiver
+ *
+ * Copyright (C) 2008-2016 Francois Dupoux.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * Homepage: http://www.fsarchiver.org
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <uuid.h>
+
+#include "fsarchiver.h"
+#include "dico.h"
+#include "common.h"
+#include "filesys.h"
+#include "strlist.h"
+#include "fs_vfat.h"
+#include "error.h"
+
+int vfat_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, 
char *mkfsuuid)
+{
+    char stdoutbuf[2048];
+    char command[2048];
+    char buffer[2048];
+    char mkfsopts[2048];
+    int exitst;
+    u32 temp32;
+    u16 temp16;
+
+    memset(mkfsopts, 0, sizeof(mkfsopts));
+
+    // ---- check that mkfs.vfat is installed
+    if (exec_command(command, sizeof(command), NULL, stdoutbuf, 
sizeof(stdoutbuf), NULL, 0, "mkfs.vfat --help")!=0)
+    {   errprintf("mkfs.vfat not found. please install mkfs.vfat on your 
system or check the PATH.\n");
+        return -1;
+    }
+
+    // ---- set the correct type of FAT filesystem
+    if ((dico_get_u16(d, 0, FSYSHEADKEY_FSVFATTYPE, &temp16)==0) && 
(temp16==FAT_TYPE_FAT16))
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -F 16 ");
+    else
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -F 32 ");
+
+    // ---- filesystem label
+    if (strlen(mkfslabel) > 0)
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -n '%.11s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -n '%.11s' ", buffer);
+
+    // ---- filesystem serial
+    if (dico_get_u32(d, 0, FSYSHEADKEY_FSVFATSERIAL, &temp32)==0)
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -i '%08X' ", temp32);
+
+    // ---- create the new filesystem using mkfs.vfat
+    if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, 
"mkfs.vfat %s %s", mkfsopts, partition)!=0 || exitst!=0)
+    {   errprintf("command [%s] failed\n", command);
+        return -1;
+    }
+
+    return 0;
+}
+
+int vfat_getinfo(cdico *d, char *devname)
+{
+    struct vfat_superblock sb;
+    char label[512];
+    u32 serial;
+    u32 temp32;
+    u16 type;
+    int ret=0;
+    int fd;
+    int res;
+
+    memset(label, 0, sizeof(label));
+    memset(&sb, 0, sizeof(sb));
+
+    if ((fd=open64(devname, O_RDONLY|O_LARGEFILE))<0)
+    {   ret=-1;
+        goto vfat_read_sb_return;
+    }
+
+    res=read(fd, &sb, sizeof(sb));
+    if (res!=sizeof(sb))
+    {   ret=-1;
+        goto vfat_read_sb_close;
+    }
+
+    // make sure we can find the magic number
+    if (be16_to_cpu(sb.magic)!=VFAT_SB_MAGIC)
+    {   msgprintf(MSG_DEBUG1, "(be16_to_cpu(sb.magic)=%.2x) != 
(VFAT_SB_MAGIC=%.2x)\n", be16_to_cpu(sb.magic), VFAT_SB_MAGIC);
+        ret=-1;
+        goto vfat_read_sb_close;
+    }
+
+    // number of FATs must be 1 or 2
+    if (sb.num_fats != 1 && sb.num_fats != 2)
+    {   msgprintf(MSG_DEBUG1, "Invalid number of FAT tables: %d\n", 
(int)sb.num_fats);
+        ret=-1;
+        goto vfat_read_sb_close;
+    }
+
+    // num_root_dir_ents set to zero indicates a FAT32
+    if (sb.num_root_dir_ents == 0)
+    {   type=FAT_TYPE_FAT32;
+        msgprintf(MSG_DEBUG1, "FAT_TYPE_FAT32\n");
+        memcpy(label, ((char*)&sb)+0x047, 11);
+        memcpy(&temp32, ((char*)&sb)+0x043, 4);
+        serial=le32_to_cpu(temp32);
+    }
+    else
+    {   type=FAT_TYPE_FAT16;
+        msgprintf(MSG_DEBUG1, "FAT_TYPE_FAT16\n");
+        memcpy(label, ((char*)&sb)+0x02B, 11);
+        memcpy(&temp32, ((char*)&sb)+0x027, 4);
+        serial=le32_to_cpu(temp32);
+    }
+
+    // ---- type
+    dico_add_u16(d, 0, FSYSHEADKEY_FSVFATTYPE, type);
+
+    // ---- label
+    msgprintf(MSG_DEBUG1, "vfat_label=[%s]\n", label);
+    dico_add_string(d, 0, FSYSHEADKEY_FSLABEL, label);
+
+    // ---- serial
+    dico_add_u32(d, 0, FSYSHEADKEY_FSVFATSERIAL, serial);
+    msgprintf(MSG_DEBUG1, "vfat_serial=[%08X]\n", serial);
+
+    // ---- minimum fsarchiver version required to restore
+    dico_add_u64(d, 0, FSYSHEADKEY_MINFSAVERSION, FSA_VERSION_BUILD(0, 8, 0, 
0));
+
+vfat_read_sb_close:
+    close(fd);
+vfat_read_sb_return:
+    return ret;
+}
+
+int vfat_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo)
+{
+    return generic_mount(partition, mntbuf, fsbuf, "", flags);
+}
+
+int vfat_umount(char *partition, char *mntbuf)
+{
+    return generic_umount(mntbuf);
+}
+
+int vfat_test(char *devname)
+{
+    struct vfat_superblock sb;
+    int fd;
+
+    if ((fd=open64(devname, O_RDONLY|O_LARGEFILE))<0)
+    {
+        msgprintf(MSG_DEBUG1, "open64(%s) failed\n", devname);
+        return false;
+    }
+
+    memset(&sb, 0, sizeof(sb));
+    if (read(fd, &sb, sizeof(sb))!=sizeof(sb))
+    {   close(fd);
+        msgprintf(MSG_DEBUG1, "read failed\n");
+        return false;
+    }
+
+    // ---- check it is a VFAT file system
+    if (be16_to_cpu(sb.magic)!=VFAT_SB_MAGIC)
+    {   close(fd);
+        msgprintf(MSG_DEBUG1, "(be16_to_cpu(sb.magic)=%.2x) != 
(VFAT_SB_MAGIC=%.2x)\n", be16_to_cpu(sb.magic), VFAT_SB_MAGIC);
+        return false;
+    }
+
+    close(fd);
+    return true;
+}
+
+int vfat_get_reqmntopt(char *partition, cstrlist *reqopt, cstrlist *badopt)
+{
+    if (!reqopt || !badopt)
+        return -1;
+
+    return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_vfat.h 
new/fsarchiver-0.8.0/src/fs_vfat.h
--- old/fsarchiver-0.6.23/src/fs_vfat.h 1970-01-01 01:00:00.000000000 +0100
+++ new/fsarchiver-0.8.0/src/fs_vfat.h  2016-08-09 21:33:52.000000000 +0200
@@ -0,0 +1,55 @@
+/*
+ * fsarchiver: Filesystem Archiver
+ *
+ * Copyright (C) 2008-2016 Francois Dupoux.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * Homepage: http://www.fsarchiver.org
+ */
+
+#ifndef __FS_VFAT_H__
+#define __FS_VFAT_H__
+
+struct s_dico;
+struct s_strlist;
+
+int vfat_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
+int vfat_getinfo(struct s_dico *d, char *devname);
+int vfat_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
+int vfat_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
+int vfat_umount(char *partition, char *mntbuf);
+int vfat_test(char *devname);
+int vfat_check_compatibility(u64 compat, u64 ro_compat, u64 incompat, u64 
log_incompat);
+
+#define VFAT_SB_MAGIC 0x55AA
+enum fat_type {FAT_TYPE_FAT32=0, FAT_TYPE_FAT16};
+
+struct vfat_superblock
+{
+    u8  jump[3];
+    u8  oem_id[8];
+    u16 u8s_per_sector;
+    u8  sectors_per_cluster;
+    u16 num_boot_sectors;
+    u8  num_fats;
+    u16 num_root_dir_ents;
+    u16 total_sectors;
+    u8  media_id;
+    u16 sectors_per_fat;
+    u16 sectors_per_track;
+    u16 heads;
+    u32 hidden_sectors;
+    u32 total_sectors_large;
+    u8  boot_code[474];
+    u16 magic;
+} __attribute__((packed));
+
+#endif // __FS_VFAT_H__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_xfs.c 
new/fsarchiver-0.8.0/src/fs_xfs.c
--- old/fsarchiver-0.6.23/src/fs_xfs.c  2016-06-14 20:54:27.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_xfs.c   2016-08-09 21:33:52.000000000 +0200
@@ -65,7 +65,7 @@
     }
 }
 
-int xfs_mkfs(cdico *d, char *partition, char *fsoptions)
+int xfs_mkfs(cdico *d, char *partition, char *fsoptions, char *mkfslabel, char 
*mkfsuuid)
 {
     char stdoutbuf[2048];
     char command[2048];
@@ -105,7 +105,9 @@
 
     strlcatf(mkfsopts, sizeof(mkfsopts), " %s ", fsoptions);
 
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, sizeof(buffer))==0 
&& strlen(buffer)>0)
+    if (strlen(mkfslabel) > 0)
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -L '%.12s' ", mkfslabel);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSLABEL, buffer, 
sizeof(buffer))==0 && strlen(buffer)>0)
         strlcatf(mkfsopts, sizeof(mkfsopts), " -L '%.12s' ", buffer);
 
     if ((dico_get_u64(d, 0, FSYSHEADKEY_FSXFSBLOCKSIZE, &temp64)==0) && 
(temp64%512==0) && (temp64>=512) && (temp64<=65536))
@@ -171,12 +173,16 @@
         strlcatf(mkfsopts, sizeof(mkfsopts), " -m finobt=%d ", (int)optval);
     }
 
-    // ---- attempt to preserve UUID of the filesystem
+    // Attempt to preserve UUID of the filesystem
     // - the "-m uuid=<UUID>" option in mkfs.xfs was added in mkfs.xfs 4.3.0 
and is the best way to set UUIDs
     // - the UUID of XFSv4 can be successfully set using either xfs_admin or 
mkfs.xfs >= 4.3.0
     // - it is impossible to set both types of UUIDs of an XFSv5 filesystem 
using xfsprogs < 4.3.0
     //   for this reason the XFS version is forced to v4 if xfsprogs version < 
4.3.0
-    if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, uuid, sizeof(uuid))==0 && 
strlen(uuid)==36)
+    if (strlen(mkfsuuid) > 0)
+        snprintf(uuid, sizeof(uuid), "%s", mkfsuuid);
+    else if (dico_get_string(d, 0, FSYSHEADKEY_FSUUID, buffer, 
sizeof(buffer))==0)
+        snprintf(uuid, sizeof(uuid), "%s", buffer);
+    if (strlen(uuid)==36)
     {
         if (xfstoolsver >= PROGVER(4,3,0))
             strlcatf(mkfsopts, sizeof(mkfsopts), " -m uuid=%s ", uuid);
@@ -201,6 +207,16 @@
             strlcatf(mkfsopts, sizeof(mkfsopts), " -n ftype=0 ");
     }
 
+    // Determine if the "sparse" mkfs option should be enabled (sparse inode 
allocation)
+    // - starting with linux-4.2 XFS can allocate discontinuous inode chunks
+    // - this feature relies on the new v5 on-disk format but it is optional
+    // - this feature will be enabled if the original filesystem was XFSv5 and 
had it
+    if (xfstoolsver >= PROGVER(4,2,0)) // only use "sparse" option when it is 
supported by mkfs
+    {
+        optval = ((xfsver==XFS_SB_VERSION_5) && (sb_features_incompat & 
XFS_SB_FEAT_INCOMPAT_SPINODES));
+        strlcatf(mkfsopts, sizeof(mkfsopts), " -i sparse=%d ", (int)optval);
+    }
+
     // ---- create the new filesystem using mkfs.xfs
     if (exec_command(command, sizeof(command), &exitst, NULL, 0, NULL, 0, 
"mkfs.xfs -f %s %s", partition, mkfsopts)!=0 || exitst!=0)
     {   errprintf("command [%s] failed\n", command);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fs_xfs.h 
new/fsarchiver-0.8.0/src/fs_xfs.h
--- old/fsarchiver-0.6.23/src/fs_xfs.h  2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/fs_xfs.h   2016-08-09 21:33:52.000000000 +0200
@@ -47,7 +47,7 @@
 #define XFS_SB_VERSION_BORGBIT      0x4000  /* ASCII only case-insens. */
 #define XFS_SB_VERSION_MOREBITSBIT  0x8000
 
-int xfs_mkfs(struct s_dico *d, char *partition, char *fsoptions);
+int xfs_mkfs(struct s_dico *d, char *partition, char *fsoptions, char 
*mkfslabel, char *mkfsuuid);
 int xfs_getinfo(struct s_dico *d, char *devname);
 int xfs_mount(char *partition, char *mntbuf, char *fsbuf, int flags, char 
*mntinfo);
 int xfs_get_reqmntopt(char *partition, struct s_strlist *reqopt, struct 
s_strlist *badopt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fsarchiver.c 
new/fsarchiver-0.8.0/src/fsarchiver.c
--- old/fsarchiver-0.6.23/src/fsarchiver.c      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fsarchiver.c       2016-08-09 21:33:52.000000000 
+0200
@@ -46,20 +46,24 @@
 
 void usage(char *progname, bool examples)
 {
-    int lzo=false, lzma=false;
-    
+    int lzo, lzma;
+
 #ifdef OPTION_LZO_SUPPORT
     lzo=true;
+#else
+    lzo=false;
 #endif // OPTION_LZO_SUPPORT
 #ifdef OPTION_LZMA_SUPPORT
     lzma=true;
+#else
+    lzma=false;
 #endif // OPTION_LZMA_SUPPORT
     
     msgprintf(MSG_FORCE, "====> fsarchiver version %s (%s) - 
http://www.fsarchiver.org <====\n", FSA_VERSION, FSA_RELDATE);
     msgprintf(MSG_FORCE, "Distributed under the GPL v2 license (GNU General 
Public License v2).\n");
     msgprintf(MSG_FORCE, " * usage: %s [<options>] <command> <archive> 
[<part1> [<part2> [...]]]\n", progname);
     msgprintf(MSG_FORCE, "<commands>\n");
-    msgprintf(MSG_FORCE, " * savefs: save filesystems to an archive file 
(backup a partition to a file)\n");
+    msgprintf(MSG_FORCE, " * savefs: save filesystems to an archive file 
(backup a device to a file)\n");
     msgprintf(MSG_FORCE, " * restfs: restore filesystems from an archive 
(overwrites the existing data)\n");
     msgprintf(MSG_FORCE, " * savedir: save directories to the archive (similar 
to a compressed tarball)\n");
     msgprintf(MSG_FORCE, " * restdir: restore data from an archive which is 
not based on a filesystem\n");
@@ -70,18 +74,19 @@
     msgprintf(MSG_FORCE, " -v: verbose mode (can be used several times to 
increase the level of details)\n");
     msgprintf(MSG_FORCE, " -d: debug mode (can be used several times to 
increase the level of details)\n");
     msgprintf(MSG_FORCE, " -A: allow to save a filesystem which is mounted in 
read-write (live backup)\n");
-    msgprintf(MSG_FORCE, " -a: allow running savefs when partition mounted 
without the acl/xattr options\n");
+    msgprintf(MSG_FORCE, " -a: allow to save a filesystem when acls and xattrs 
are not supported\n");
+    msgprintf(MSG_FORCE, " -x: enable support for experimental features (they 
are disabled by default)\n");
     msgprintf(MSG_FORCE, " -e <pattern>: exclude files and directories that 
match that pattern\n");
     msgprintf(MSG_FORCE, " -L <label>: set the label of the archive (comment 
about the contents)\n");
-    msgprintf(MSG_FORCE, " -z <level>: compression level from 1 (very fast)  
to  9 (very good) default=3\n");
+    msgprintf(MSG_FORCE, " -z <level>: compression level from 1 (very fast) to 
9 (very good) default=3\n");
     msgprintf(MSG_FORCE, " -s <mbsize>: split the archive into several files 
of <mbsize> megabytes each\n");
-    msgprintf(MSG_FORCE, " -j <count>: create more than one compression 
thread. useful on multi-core cpu\n");
+    msgprintf(MSG_FORCE, " -j <count>: create more than one (de)compression 
thread. useful on multi-core cpu\n");
     msgprintf(MSG_FORCE, " -c <password>: encrypt/decrypt data in archive, 
\"-c -\" for interactive password\n");
     msgprintf(MSG_FORCE, " -h: show help and information about how to use 
fsarchiver with examples\n");
     msgprintf(MSG_FORCE, " -V: show program version and exit\n");
     msgprintf(MSG_FORCE, "<information>\n");
     msgprintf(MSG_FORCE, " * Support included for: lzo=%s, lzma=%s\n", 
(lzo==true)?"yes":"no", (lzma==true)?"yes":"no");
-    msgprintf(MSG_FORCE, " * support for ntfs filesystems is unstable: don't 
use it for production.\n");
+    msgprintf(MSG_FORCE, " * Support for ntfs filesystems is unstable: don't 
use it for production.\n");
     
     if (examples==true)
     {
@@ -98,6 +103,10 @@
         msgprintf(MSG_FORCE, "   fsarchiver restfs /data/arch2.fsa 
id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1\n");
         msgprintf(MSG_FORCE, " * \e[1mrestore a filesystem from an archive and 
convert it to reiserfs:\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver restfs /data/myarchive1.fsa 
id=0,dest=/dev/sda1,mkfs=reiserfs\n");
+        msgprintf(MSG_FORCE, " * \e[1mrestore a filesystem from an archive and 
specify extra mkfs options:\e[0m\n");
+        msgprintf(MSG_FORCE, "   fsarchiver restfs /data/myarchive1.fsa 
id=0,dest=/dev/sda1,mkfs=ext4,mkfsopt=\"-I 256\"\n");
+        msgprintf(MSG_FORCE, " * \e[1mrestore a filesystem from an archive and 
specify a new label and a new UUID:\e[0m\n");
+        msgprintf(MSG_FORCE, "   fsarchiver restfs /data/myarchive1.fsa 
id=0,dest=/dev/sda1,label=root,uuid=5f6e5f4f-dc2a-4dbd-a6ea-9ca997cde75e\n");
         msgprintf(MSG_FORCE, " * \e[1msave the contents of /usr/src/linux to 
an archive (similar to tar):\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver savedir /data/linux-sources.fsa 
/usr/src/linux\n");
         msgprintf(MSG_FORCE, " * \e[1msave a filesystem (/dev/sda1) to an 
archive split into volumes of 680MB:\e[0m\n");
@@ -110,11 +119,11 @@
         msgprintf(MSG_FORCE, "   fsarchiver savefs /data/myarchive.fsa 
--exclude=/usr/share\n");
         msgprintf(MSG_FORCE, " * \e[1msave a filesystem (/dev/sda1) to an 
encrypted archive:\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver savefs -c mypassword 
/data/myarchive1.fsa /dev/sda1\n");
-        msgprintf(MSG_FORCE, " * \e[1mSame as before but prompt for password 
in the terminal:\e[0m\n");
+        msgprintf(MSG_FORCE, " * \e[1msame as before but prompt for password 
in the terminal:\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver savefs -c - /data/myarchive1.fsa 
/dev/sda1\n");
         msgprintf(MSG_FORCE, " * \e[1mextract an archive made of simple files 
to /tmp/extract:\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver restdir /data/linux-sources.fsa 
/tmp/extract\n");
-        msgprintf(MSG_FORCE, " * \e[1mshow information about an archive and 
its file systems:\e[0m\n");
+        msgprintf(MSG_FORCE, " * \e[1mshow information about an archive and 
its filesystems:\e[0m\n");
         msgprintf(MSG_FORCE, "   fsarchiver archinfo /data/myarchive2.fsa\n");
     }
 }
@@ -134,6 +143,7 @@
     {"cryptpass", required_argument, NULL, 'c'},
     {"label", required_argument, NULL, 'L'},
     {"exclude", required_argument, NULL, 'e'},
+    {"experimental", no_argument, NULL, 'x'},
     {NULL, 0, NULL, 0}
 };
 
@@ -161,6 +171,7 @@
     // set default options
     g_options.overwrite=false;
     g_options.allowsaverw=false;
+    g_options.experimental=false;
     g_options.dontcheckmountopts=false;
     g_options.verboselevel=0;
     g_options.debuglevel=0;
@@ -173,7 +184,7 @@
     snprintf(g_options.archlabel, sizeof(g_options.archlabel), "<none>");
     g_options.encryptpass[0]=0;
     
-    while ((c = getopt_long(argc, argv, "oaAvdz:j:hVs:c:L:e:", long_options, 
NULL)) != EOF)
+    while ((c = getopt_long(argc, argv, "oaAvdz:j:hVs:c:L:e:x", long_options, 
NULL)) != EOF)
     {
         switch (c)
         {
@@ -186,6 +197,9 @@
             case 'A': // allows to backup read/write mounted partition
                 g_options.allowsaverw=true;
                 break;
+            case 'x': // enable support for experimental features
+                g_options.experimental=true;
+                break;
             case 'v': // verbose mode
                 g_options.verboselevel++;
                 break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/fsarchiver.h 
new/fsarchiver-0.8.0/src/fsarchiver.h
--- old/fsarchiver-0.6.23/src/fsarchiver.h      2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/fsarchiver.h       2016-08-08 00:20:26.000000000 
+0200
@@ -81,7 +81,8 @@
       FSYSHEADKEY_FSEXTEOPTRAIDSTRIPEWIDTH, FSYSHEADKEY_FSEXTEOPTRAIDSTRIDE,
       FSYSHEADKEY_FSINODEBLOCKSPERGROUP, FSYSHEADKEY_FSXFSVERSION,
       FSYSHEADKEY_FSXFSFEATURECOMPAT, FSYSHEADKEY_FSXFSFEATUREROCOMPAT,
-      FSYSHEADKEY_FSXFSFEATUREINCOMPAT, FSYSHEADKEY_FSXFSFEATURELOGINCOMPAT};
+      FSYSHEADKEY_FSXFSFEATUREINCOMPAT, FSYSHEADKEY_FSXFSFEATURELOGINCOMPAT,
+      FSYSHEADKEY_FSVFATTYPE, FSYSHEADKEY_FSVFATSERIAL};
 
 enum {DIRSINFOKEY_NULL=0, DIRSINFOKEY_TOTALCOST};
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/oper_restore.c 
new/fsarchiver-0.8.0/src/oper_restore.c
--- old/fsarchiver-0.6.23/src/oper_restore.c    2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/oper_restore.c     2016-08-09 21:33:52.000000000 
+0200
@@ -122,7 +122,7 @@
             return -1;
         
         // parse argument and write (key,value) pairs in the strdico object
-        if ((strdico_set_valid_keys(tmpdico, "id,dest,mkfs,mkfsopt")!=0) ||
+        if ((strdico_set_valid_keys(tmpdico, 
"id,dest,mkfs,mkfsopt,uuid,label")!=0) ||
             (strdico_parse_string(tmpdico, cmdargv[i])!=0))
         {   strdico_destroy(tmpdico);
             return -1;
@@ -168,7 +168,7 @@
 int extractar_listing_print_file(cextractar *exar, int objtype, char *relpath)
 {
     char strprogress[256];
-    u64 progress;
+    s64 progress;
     
     memset(strprogress, 0, sizeof(strprogress));
     if (exar->cost_global>0)
@@ -1179,6 +1179,8 @@
     char mountinfo[4096];
     char partition[1024];
     char mkfsoptions[1024];
+    char mkfslabel[1024];
+    char mkfsuuid[1024];
     char tempbuf[1024];
     cdico *dicobegin=NULL;
     cdico *dicoend=NULL;
@@ -1197,6 +1199,8 @@
     // init
     memset(magic, 0, sizeof(magic));
     memset(partition, 0, sizeof(partition));
+    memset(mkfslabel, 0, sizeof(mkfslabel));
+    memset(mkfsuuid, 0, sizeof(mkfsuuid));
     
     // read destination partition from dicocmdline
     if (strdico_get_string(dicocmdline, partition, sizeof(partition), 
"dest")!=0)
@@ -1254,7 +1258,15 @@
     {
         msgprintf(MSG_VERB2,"strdico_get_string(dicocmdline, 'mkfsopt') 
doesn't exist\n");
     }
-       
+    if (strdico_get_string(dicocmdline, mkfslabel, sizeof(mkfslabel), 
"label")!=0)
+    {
+        msgprintf(MSG_VERB2,"strdico_get_string(dicocmdline, 'label') doesn't 
exist\n");
+    }
+    if (strdico_get_string(dicocmdline, mkfsuuid, sizeof(mkfsuuid), "uuid")!=0)
+    {
+        msgprintf(MSG_VERB2,"strdico_get_string(dicocmdline, 'uuid') doesn't 
exist\n");
+    }
+
     if (dico_get_u64(dicofs, 0, FSYSHEADKEY_BYTESTOTAL, &fsbytestotal)!=0)
     {   errprintf("dico_get_string(FSYSHEADKEY_BYTESTOTAL) failed\n");
         return -1;
@@ -1265,10 +1277,12 @@
         return -1;
     }
     
-    msgprintf(MSG_VERB2, "filesystem=[%s]\n", filesystem);
-    msgprintf(MSG_VERB2, "filesystemoptions=[%s]\n", mkfsoptions);
-    msgprintf(MSG_VERB2, "fsbytestotal=[%s]\n", format_size(fsbytestotal, 
text, sizeof(text), 'h'));
-    msgprintf(MSG_VERB2, "fsbytesused=[%s]\n", format_size(fsbytesused, text, 
sizeof(text), 'h'));
+    msgprintf(MSG_VERB2, "filesystem_type=[%s]\n", filesystem);
+    msgprintf(MSG_VERB2, "filesystem_mkfsoptions=[%s]\n", mkfsoptions);
+    msgprintf(MSG_VERB2, "filesystem_mkfslabel=[%s]\n", mkfslabel);
+    msgprintf(MSG_VERB2, "filesystem_mkfsuuid=[%s]\n", mkfsuuid);
+    msgprintf(MSG_VERB2, "filesystem_space_total=[%s]\n", 
format_size(fsbytestotal, text, sizeof(text), 'h'));
+    msgprintf(MSG_VERB2, "filesystem_space_used=[%s]\n", 
format_size(fsbytesused, text, sizeof(text), 'h'));
     
     // get index of the filesystem in the filesystem table
     if (generic_get_fstype(filesystem, &fstype)!=0)
@@ -1277,8 +1291,8 @@
     }
     
     // ---- make the filesystem
-    if (filesys[fstype].mkfs(dicofs, partition, mkfsoptions)!=0)
-    {   errprintf("cannot format the filesystem %s on partition %s\n", 
filesystem, partition);
+    if (filesys[fstype].mkfs(dicofs, partition, mkfsoptions, mkfslabel, 
mkfsuuid)!=0)
+    {   errprintf("cannot make filesystem %s on partition %s\n", filesystem, 
partition);
         return -1;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/oper_save.c 
new/fsarchiver-0.8.0/src/oper_save.c
--- old/fsarchiver-0.6.23/src/oper_save.c       2016-06-14 20:51:22.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/oper_save.c        2016-08-09 21:00:59.000000000 
+0200
@@ -279,7 +279,7 @@
         len=strlen(buffer+pos)+1;
         attrsize=lgetxattr(fullpath, buffer+pos, NULL, 0);
         msgprintf(MSG_VERB2, "            xattr:file=[%s], attrid=%d, 
name=[%s], size=%ld\n", relpath, (int)attrcnt, buffer+pos, (long)attrsize);
-        if ((attrsize>0) && (attrsize>65535LL))
+        if (attrsize>65535LL)
         {   errprintf("file [%s] has an xattr [%s] with data too big 
(size=%ld, maxsize=64k)\n", relpath, buffer+pos, (long)attrsize);
             ret=-1;
             continue; // copy the next xattr
@@ -311,7 +311,7 @@
             free(valbuf);
             continue; // copy the next xattr
         }
-        else if (errno==ENOATTR) // if the attribute does not exist
+        else // errno==ENOATTR hence the attribute does not exist
         {
             msgprintf(MSG_VERB2, "            xattr:lgetxattr-win(%s,%s)=-1: 
errno==ENOATTR\n", relpath, buffer+pos);
             free(valbuf);
@@ -353,7 +353,7 @@
             continue; // ignore the current xattr
         }
         msgprintf(MSG_VERB2, "            winattr:file=[%s], attrcnt=%d, 
name=[%s], size=%ld\n", relpath, (int)attrcnt, winattr[i], (long)attrsize);
-        if ((attrsize>0) && (attrsize>65535LL))
+        if (attrsize>65535LL)
         {
             errprintf("file [%s] has an xattr [%s] with data size=%ld too big 
(max xattr size is 65535)\n", relpath, winattr[i], (long)attrsize);
             ret=-1;
@@ -384,15 +384,11 @@
             free(valbuf);
             continue; // ignore the current xattr
         }
-        else if (errno==ENOATTR) // if the attribute does not exist
+        else // errno==ENOATTR hence the attribute does not exist
         {
             msgprintf(MSG_VERB2, "            winattr:lgetxattr-win(%s,%s)=-1: 
errno==ENOATTR\n", relpath, winattr[i]);
             free(valbuf);
         }
-        else
-        {
-            free(valbuf);
-        }
     }
     
     return ret;
@@ -581,7 +577,7 @@
     cdico *dicoattr;
     int attrerrors=0;
     u64 filecost;
-    u64 progress;
+    s64 progress;
     int objtype;
     int res;
     
@@ -950,6 +946,7 @@
                 errprintf("filesystem of partition [%s] is not supported by 
fsarchiver: filesystem=[%s]\n", devinfo->devpath, fsbuf);
             return -1;
         }
+
         // check the filesystem is mounted with the right mount-options (to 
preserve acl and xattr)
         strlist_init(&reqmntopt);
         strlist_init(&badmntopt);
@@ -1039,12 +1036,18 @@
         devinfo->mountedbyfsa=true;
     }
 
+    // Make sure users are aware if they save filesystems with experimental 
support in fsarchiver
+    if ((g_options.experimental==false) && 
(filesys[devinfo->fstype].stable==false))
+    {   errprintf("You must enable support for experimental features in order 
to save %s filesystems with fsarchiver.\n", filesys[devinfo->fstype].name);
+        return -1;
+    }
+
     // Make sure support for extended attributes is enabled if this filesystem 
supports it
     if (g_options.dontcheckmountopts==false)
     {
         errorattr=false;
 
-        if (filesys[i].support_for_xattr==true)
+        if (filesys[devinfo->fstype].support_for_xattr==true)
         {   errno=0;
             res=lgetxattr(devinfo->partmount, "user.fsa_test_xattr", temp, 
sizeof(temp));
             msgprintf(MSG_DEBUG1, "lgetxattr(\"%s\", \"user.fsa_test_attr\", 
buf, bufsize)=[%d] and errno=[%d]\n", devinfo->partmount, (int)res, (int)errno);
@@ -1055,7 +1058,7 @@
             }
         }
 
-        if (filesys[i].support_for_acls==true)
+        if (filesys[devinfo->fstype].support_for_acls==true)
         {   errno=0;
             res=lgetxattr(devinfo->partmount, "system.posix_acl_access", temp, 
sizeof(temp));
             msgprintf(MSG_DEBUG1, "lgetxattr(\"%s\", 
\"system.posix_acl_access\", buf, bufsize)=[%d] and errno=[%d]\n", 
devinfo->partmount, (int)res, (int)errno);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/options.h 
new/fsarchiver-0.8.0/src/options.h
--- old/fsarchiver-0.6.23/src/options.h 2016-06-14 20:51:22.000000000 +0200
+++ new/fsarchiver-0.8.0/src/options.h  2016-08-08 20:34:22.000000000 +0200
@@ -27,6 +27,7 @@
 struct s_options
 {   bool     overwrite;
     bool     allowsaverw;
+    bool     experimental;
     bool     dontcheckmountopts;
     int      verboselevel;
     int      debuglevel;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/queue.c 
new/fsarchiver-0.8.0/src/queue.c
--- old/fsarchiver-0.6.23/src/queue.c   2016-06-14 20:56:06.000000000 +0200
+++ new/fsarchiver-0.8.0/src/queue.c    2016-08-09 21:00:59.000000000 +0200
@@ -509,8 +509,8 @@
         return FSAERR_ENDOFFILE;
     }
     
-    // should not happen since queuelocked_is_first_block_ready means there is 
at least one block in the queue
-    assert((cur=q->head)!=NULL);
+    cur=q->head;
+    assert(cur!=NULL); // queuelocked_is_first_block_ready means there is at 
least one block in the queue
     
     // test the first item
     if ((cur->type==QITEM_TYPE_BLOCK) && (cur->status==QITEM_STATUS_DONE))
@@ -581,8 +581,8 @@
         return FSAERR_ENDOFFILE;
     }
     
-    // should not happen since queuelocked_is_first_block_ready means there is 
at least one block in the queue
-    assert ((cur=q->head)!=NULL);
+    cur=q->head;
+    assert (cur!=NULL); // queuelocked_is_first_block_ready means there is at 
least one block in the queue
     
     // test the first item
     switch (cur->type)
@@ -712,8 +712,8 @@
         return FSAERR_ENDOFFILE;
     }
     
-    // should not happen since queuelocked_is_first_block_ready means there is 
at least one block in the queue
-    assert((cur=q->head)!=NULL);
+    cur=q->head;
+    assert(cur!=NULL); // queuelocked_is_first_block_ready means there is at 
least one block in the queue
     
     switch (cur->type)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsarchiver-0.6.23/src/thread_comp.c 
new/fsarchiver-0.8.0/src/thread_comp.c
--- old/fsarchiver-0.6.23/src/thread_comp.c     2016-06-14 20:56:06.000000000 
+0200
+++ new/fsarchiver-0.8.0/src/thread_comp.c      2016-08-09 21:00:59.000000000 
+0200
@@ -127,7 +127,7 @@
         }
         if ((res=crypto_blowfish(blkinfo->blkcompsize, &cryptsize, 
(u8*)bufcomp, (u8*)bufcrypt, 
             g_options.encryptpass, strlen((char*)g_options.encryptpass), 
1))!=0)
-        {   errprintf("crypt_block_blowfish() failed\n");
+        {   errprintf("crypt_block_blowfish() failed with res=%d\n", res);
             return -1;
         }
         free(bufcomp);


Reply via email to