OSDN Git Service

android-x86/external-exfat.git
2 years agoMerge branch 'master' of git://github.com/relan/exfat into pie-x86 pie-x86
Chih-Wei Huang [Tue, 6 Jul 2021 08:30:40 +0000 (16:30 +0800)]
Merge branch 'master' of git://github.com/relan/exfat into pie-x86

3 years agoMove match_option() to libexfat/utils.c.
relan [Sat, 23 May 2020 15:34:51 +0000 (18:34 +0300)]
Move match_option() to libexfat/utils.c.

To be used in a later patch.

3 years agoCI: update osx image to macOS 10.15.7 (Xcode 12.2).
relan [Sat, 10 Apr 2021 07:15:49 +0000 (10:15 +0300)]
CI: update osx image to macOS 10.15.7 (Xcode 12.2).

The default macOS 10.13 (Xcode 9.4.1) doesn't work, it seems.

3 years agoCI: define the build matrix explicitly.
relan [Sat, 10 Apr 2021 07:14:04 +0000 (10:14 +0300)]
CI: define the build matrix explicitly.

3 years agoCI: add Ubuntu 18.04 (amd64, ppc64le) jobs.
dineshks1 [Wed, 30 Sep 2020 13:16:42 +0000 (13:16 +0000)]
CI: add Ubuntu 18.04 (amd64, ppc64le) jobs.

3 years agoAdd basic CI.
relan [Sat, 29 Feb 2020 15:20:03 +0000 (18:20 +0300)]
Add basic CI.

Build and run mkfs and fsck on:

* Ubuntu 18.04 (s390x) <https://docs.travis-ci.com/user/reference/bionic>
* macOS 10.13 (amd64) <https://docs.travis-ci.com/user/reference/osx>

3 years agoFix cluster bitmap traversal on big endian machines.
relan [Mon, 4 May 2020 12:11:22 +0000 (15:11 +0300)]
Fix cluster bitmap traversal on big endian machines.

We define bitmap_t to unsigned char on big endian systems to avoid byte
order conversions. But bitwise complement causes integer promotion and
makes the condition always false. Truncate the result after complementing
zero.

3 years agoFix format warning.
relan [Sat, 29 Feb 2020 18:16:25 +0000 (21:16 +0300)]
Fix format warning.

Found by clang 902.0.39.2.

3 years agoFix more comparisons between signed and unsigned values.
relan [Sat, 29 Feb 2020 15:25:57 +0000 (18:25 +0300)]
Fix more comparisons between signed and unsigned values.

Found by gcc 7.4.0.

3 years agoFix file contiguous judgement.
noctis [Sun, 19 Aug 2018 10:07:19 +0000 (18:07 +0800)]
Fix file contiguous judgement.

Signed-off-by: noctis <noctis.AKM@gmail.com>
3 years agoAdd platform macros for illumos.
relan [Mon, 4 May 2020 11:00:39 +0000 (14:00 +0300)]
Add platform macros for illumos.

With this change fuse-exfat reportedly works on OpenIndiana.

4 years agoValidate UTF-8 byte sequence.
relan [Sat, 7 Mar 2020 06:13:48 +0000 (09:13 +0300)]
Validate UTF-8 byte sequence.

The 2nd and subsequent bytes in a UTF-8 byte sequence must look like
10xxxxxx. The missing checks could lead to crash later.

4 years agoRename UTF-related functions.
relan [Sat, 29 Feb 2020 08:46:32 +0000 (11:46 +0300)]
Rename UTF-related functions.

Avoid conflicts with Android's libutils. Those functions should have had
the "exfat" prefix from the very beginning...

4 years agoFix comparisons between signed and unsigned values.
relan [Sat, 29 Feb 2020 07:13:46 +0000 (10:13 +0300)]
Fix comparisons between signed and unsigned values.

4 years agoSuppress warnings about unused parameters.
relan [Sat, 29 Feb 2020 07:30:59 +0000 (10:30 +0300)]
Suppress warnings about unused parameters.

4 years agoCheck offset in exfat_generic_pread()/exfat_generic_pwrite().
relan [Sat, 29 Feb 2020 07:51:32 +0000 (10:51 +0300)]
Check offset in exfat_generic_pread()/exfat_generic_pwrite().

A negative offset makes no sense for those functions.

4 years agoFix some signedness warnings.
relan [Sat, 17 Aug 2019 16:51:27 +0000 (19:51 +0300)]
Fix some signedness warnings.

4 years agoFix unaligned accesses to packed struct members.
relan [Thu, 25 Jul 2019 03:59:12 +0000 (06:59 +0300)]
Fix unaligned accesses to packed struct members.

4 years agoSoil super block after successful mount.
relan [Mon, 8 Jul 2019 17:55:19 +0000 (20:55 +0300)]
Soil super block after successful mount.

Leave volume state untouched until we are ready to serve writes.

4 years agoAndroid: add mount.exfat q-x86 r-x86 android-x86-9.0-r1 android-x86-9.0-r2
Chih-Wei Huang [Tue, 9 Apr 2019 10:55:12 +0000 (18:55 +0800)]
Android: add mount.exfat

The vold can use this to mount an exfat partition.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
4 years agoRevert "Use fuse_main() instead of lower level functions."
Chih-Wei Huang [Tue, 9 Apr 2019 10:25:18 +0000 (18:25 +0800)]
Revert "Use fuse_main() instead of lower level functions."

This reverts commit f61d4279d14582d56b039f3ed7b49f5989600c86.

4 years agoRevert "Split mount options into FUSE- and exFAT-specific."
Chih-Wei Huang [Tue, 9 Apr 2019 10:25:12 +0000 (18:25 +0800)]
Revert "Split mount options into FUSE- and exFAT-specific."

This reverts commit 78d28968cbcb7dcb856e153774fdb4ccb38b0fcf.

4 years agoRevert "Wrap platform-specific FUSE options."
Chih-Wei Huang [Tue, 9 Apr 2019 10:23:16 +0000 (18:23 +0800)]
Revert "Wrap platform-specific FUSE options."

This reverts commit 68524e0a51246bba984fce28fc5b23aee0dbd2e0.

4 years agoAndroid: change libexfat to be a shared library
Chih-Wei Huang [Wed, 3 Apr 2019 11:27:15 +0000 (19:27 +0800)]
Android: change libexfat to be a shared library

The library is used by several binaries so it should be shared.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
4 years agoDefine proper feature test macros for glibc.
relan [Sat, 20 Apr 2019 18:31:37 +0000 (21:31 +0300)]
Define proper feature test macros for glibc.

4 years agoAdd support for timezone offsets.
Nathan Hunsperger [Thu, 18 Apr 2019 23:12:49 +0000 (16:12 -0700)]
Add support for timezone offsets.

Timestamps are stored in local time. exFAT includes timezone offset
fields to allow timestamps to remain correct when mounted under a
different timezone. The timezone offset is now used to calculate the
correct timestamp on read, and set on write.

5 years agoAndroid: remove "tags" from Android.bp.
LongPing.WEI [Wed, 28 Nov 2018 06:37:40 +0000 (14:37 +0800)]
Android: remove "tags" from Android.bp.

Android's build system does not support "tags" anymore, remove this line
to fix compilation.

5 years agoBump version to 1.3.0 and update changelog.
relan [Sat, 15 Sep 2018 05:03:24 +0000 (08:03 +0300)]
Bump version to 1.3.0 and update changelog.

5 years agoRepairing: implement unknown entry type fix.
relan [Thu, 23 Mar 2017 05:34:21 +0000 (08:34 +0300)]
Repairing: implement unknown entry type fix.

5 years agoRepairing: implement invalid node checksum fix.
relan [Tue, 14 Mar 2017 05:15:57 +0000 (08:15 +0300)]
Repairing: implement invalid node checksum fix.

5 years agoRepairing: add nodes flushing to fsck.
relan [Tue, 14 Mar 2017 05:08:33 +0000 (08:08 +0300)]
Repairing: add nodes flushing to fsck.

Nodes can now be modified during fsck run, so they should be flushed.

5 years agoRepairing: implement invalid VBR checksum fix.
relan [Sat, 11 Mar 2017 06:52:30 +0000 (09:52 +0300)]
Repairing: implement invalid VBR checksum fix.

5 years agoRepairing: pass struct exfat to verify_vbr_checksum().
relan [Sat, 11 Mar 2017 06:48:36 +0000 (09:48 +0300)]
Repairing: pass struct exfat to verify_vbr_checksum().

Repair hooks need struct exfat.

5 years agoRepairing: document new fsck options.
relan [Sat, 11 Mar 2017 06:46:16 +0000 (09:46 +0300)]
Repairing: document new fsck options.

5 years agoRepairing: add new fsck options.
relan [Sat, 11 Mar 2017 06:43:36 +0000 (09:43 +0300)]
Repairing: add new fsck options.

5 years agoRepairing: prepare fsck.
relan [Sat, 11 Mar 2017 06:40:51 +0000 (09:40 +0300)]
Repairing: prepare fsck.

5 years agoRepairing: add repair hooks file.
relan [Sat, 11 Mar 2017 06:33:46 +0000 (09:33 +0300)]
Repairing: add repair hooks file.

5 years agoRepairing: add "repair=n" option.
relan [Sat, 11 Mar 2017 06:20:01 +0000 (09:20 +0300)]
Repairing: add "repair=n" option.

Values:
  0 = do not repair
  1 = ask
  2 = repair automatically

5 years agoFix last updated dates in man pages.
relan [Sat, 15 Sep 2018 04:17:37 +0000 (07:17 +0300)]
Fix last updated dates in man pages.

5 years agoUpdate copyright years in man pages.
relan [Sat, 15 Sep 2018 04:14:01 +0000 (07:14 +0300)]
Update copyright years in man pages.

5 years agoPass stat to filler in readdir for dirent->d_type.
Mark Browning [Thu, 28 Jun 2018 15:30:59 +0000 (15:30 +0000)]
Pass stat to filler in readdir for dirent->d_type.

We have SD card reading code that iterates over the file system using
opendir() and readdir() recursively by checking the struct
dirent::d_type field, which is technically non-portable but works in
ext2, ext3, ext4, and vfat. However, it wasn't working with exfat.

Allows fuse to fill in the d_type field.

5 years agoAndroid: rename binaries to mkfs.exfat and fsck.exfat.
Pierre-Hugues Husson [Thu, 16 Aug 2018 14:56:29 +0000 (16:56 +0200)]
Android: rename binaries to mkfs.exfat and fsck.exfat.

Android Pie now supports exFAT, see

    https://android.googlesource.com/platform/system/vold/+/android-9.0.0_r3/fs/Exfat.cpp#33

6 years agoAndroid: convert Android.mk to Android.bp.
LongPingWEI [Thu, 28 Dec 2017 15:05:09 +0000 (23:05 +0800)]
Android: convert Android.mk to Android.bp.

6 years agoAndroid: fix logcat support building in AOSP.
Pablo Mendez Hernandez [Wed, 24 May 2017 11:23:39 +0000 (11:23 +0000)]
Android: fix logcat support building in AOSP.

Building failed this way:

log.c:51:51: error: use of undeclared identifier fmt
        __android_log_vprint(ANDROID_LOG_FATAL, PACKAGE, fmt, aq);
                                                         ^
log.c:79:51: error: use of undeclared identifier fmt
        __android_log_vprint(ANDROID_LOG_ERROR, PACKAGE, fmt, aq);
                                                         ^
log.c:105:50: error: use of undeclared identifier fmt
        __android_log_vprint(ANDROID_LOG_WARN, PACKAGE, fmt, aq);
                                                        ^

6 years agoAndroid: print log messages to logcat.
relan [Thu, 16 Mar 2017 08:01:54 +0000 (11:01 +0300)]
Android: print log messages to logcat.

Android does not have syslog.

6 years agoAndroid: support building exfat-utils.
liminghao [Fri, 3 Mar 2017 06:23:53 +0000 (14:23 +0800)]
Android: support building exfat-utils.

Build mkexfatfs, exfatfsck, dumpexfat and exfatlabel for Android.

Signed-off-by: liminghao <liminghao@xiaomi.com>
6 years agoFix predefined macro for DragonFlyBSD.
Tomohiro Kusumi [Sun, 1 Apr 2018 05:50:58 +0000 (14:50 +0900)]
Fix predefined macro for DragonFlyBSD.

__DragonFlyBSD__ is not defined in DragonFlyBSD. It's __DragonFly__
without "BSD".

6 years agoFix FreeBSD support, add UBLIO support.
Oleksii Samorukov [Sun, 18 Mar 2018 15:38:44 +0000 (16:38 +0100)]
Fix FreeBSD support, add UBLIO support.

6 years agoExclude OpenBSD from the list of supported operating systems.
relan [Sat, 31 Mar 2018 17:53:12 +0000 (20:53 +0300)]
Exclude OpenBSD from the list of supported operating systems.

OpenBSD's fuse_main() fails with "unknown option ..." when options string
is non-empty. We could live with this if it accepted at least "ro", but it
doesn't.

6 years agoPass "ro" option to FUSE when FS is read-only.
relan [Mon, 4 Dec 2017 06:46:58 +0000 (09:46 +0300)]
Pass "ro" option to FUSE when FS is read-only.

No matter the reason why FS is read-only (requested by user or device is
write-protected), we should inform FUSE about this.

6 years agoWrap platform-specific FUSE options.
relan [Thu, 4 May 2017 06:25:39 +0000 (09:25 +0300)]
Wrap platform-specific FUSE options.

fuse_main() fails on unrecognized options.

6 years agoSplit mount options into FUSE- and exFAT-specific.
relan [Wed, 3 May 2017 15:10:40 +0000 (18:10 +0300)]
Split mount options into FUSE- and exFAT-specific.

fuse_main() fails on unrecognized options.

6 years agoUse fuse_main() instead of lower level functions.
relan [Thu, 2 Apr 2015 09:11:53 +0000 (12:11 +0300)]
Use fuse_main() instead of lower level functions.

This significantly simplifies FUSE-related code.

6 years agoUnite code that forms options for FUSE.
relan [Thu, 2 Apr 2015 09:13:01 +0000 (12:13 +0300)]
Unite code that forms options for FUSE.

6 years agoBump version to 1.2.8 and update changelog.
relan [Sat, 3 Feb 2018 07:59:38 +0000 (10:59 +0300)]
Bump version to 1.2.8 and update changelog.

6 years agoUpdate copyright years.
relan [Sat, 3 Feb 2018 07:29:39 +0000 (10:29 +0300)]
Update copyright years.

6 years agoFix searching for free slots in the root directory.
m4rkusxxl [Fri, 19 Jan 2018 06:44:43 +0000 (09:44 +0300)]
Fix searching for free slots in the root directory.

When we need to place n entries and slot at position x is occupied, we
should check x+1 instead of jumping to x+n. Otherwise we may end up
putting new entries beyond a 0x00 entry, which Windows 10 interprets as
an end-of-directory mark and does not look farther.

6 years agoFix compilation on GNU/HURD.
relan [Sat, 16 Dec 2017 12:46:13 +0000 (15:46 +0300)]
Fix compilation on GNU/HURD.

6 years agoUpdate exfatlabel man page.
relan [Tue, 5 Sep 2017 14:39:15 +0000 (17:39 +0300)]
Update exfatlabel man page.

Add sentence about how to remove volume name.

6 years agoCorrect spelling mistake in a comment.
Edward Betts [Wed, 30 Aug 2017 10:13:31 +0000 (11:13 +0100)]
Correct spelling mistake in a comment.

6 years agoBump version to 1.2.7 and update changelog.
relan [Mon, 5 Jun 2017 07:05:16 +0000 (10:05 +0300)]
Bump version to 1.2.7 and update changelog.

6 years agoFix clusters bitmap size.
relan [Tue, 2 May 2017 17:19:57 +0000 (20:19 +0300)]
Fix clusters bitmap size.

The last two clusters were erroneously considered invalid. Note that
clusters numbering starts with 2.

7 years agoClean up unused parameters in libexfat.
relan [Sat, 1 Apr 2017 06:39:47 +0000 (09:39 +0300)]
Clean up unused parameters in libexfat.

7 years agoFix crash when started with stdin, stdout or stderr closed.
relan [Sat, 25 Mar 2017 06:24:09 +0000 (09:24 +0300)]
Fix crash when started with stdin, stdout or stderr closed.

7 years agoCheck clusters count validity.
relan [Tue, 21 Mar 2017 06:56:25 +0000 (09:56 +0300)]
Check clusters count validity.

Other checks heavily depend on clusters count value.

7 years agoCheck that file or directory size does not exceed clusters heap.
relan [Mon, 20 Mar 2017 06:04:57 +0000 (09:04 +0300)]
Check that file or directory size does not exceed clusters heap.

7 years agoRefactor error handling in exfat_mount().
relan [Sun, 19 Mar 2017 18:22:50 +0000 (21:22 +0300)]
Refactor error handling in exfat_mount().

Free struct exfat members in a separate function that can be called both
from exfat_unmount() and exfat_mount().

7 years agoRemove excessive check in free_cluster().
relan [Fri, 17 Mar 2017 06:41:47 +0000 (09:41 +0300)]
Remove excessive check in free_cluster().

Cluster validity has already been checked.

7 years agoImprove upper bound check in CLUSTER_INVALID() macro.
relan [Fri, 17 Mar 2017 05:31:43 +0000 (08:31 +0300)]
Improve upper bound check in CLUSTER_INVALID() macro.

Check that cluster value does not exceed actual number of clusters. Note
that clusters numbering starts with 2.

7 years agoPass struct exfat to check_node().
relan [Fri, 17 Mar 2017 05:17:45 +0000 (08:17 +0300)]
Pass struct exfat to check_node().

Future version of CLUSTER_INVALID() macro will need it.

7 years agoBump version to 1.2.6 and update changelog.
relan [Sat, 28 Jan 2017 18:57:08 +0000 (21:57 +0300)]
Bump version to 1.2.6 and update changelog.

7 years agoUpdate copyright years.
relan [Sat, 28 Jan 2017 18:30:31 +0000 (21:30 +0300)]
Update copyright years.

7 years agoAdd tail entries support.
relan [Tue, 10 Jan 2017 07:02:14 +0000 (10:02 +0300)]
Add tail entries support.

Tail entries are optional continuations that can appear after the name
entries. Their type is in 0xe0-0xff range. Sony uses them to save some
metadata along with video clips files.

Those entries can be safely ignored but must be included into checksum
calculations.

7 years agoGeneric I/O for directories: switch readdir().
relan [Thu, 29 Dec 2016 07:47:49 +0000 (10:47 +0300)]
Generic I/O for directories: switch readdir().

7 years agoGeneric I/O for directories: switch find_slot().
relan [Thu, 29 Dec 2016 07:24:04 +0000 (10:24 +0300)]
Generic I/O for directories: switch find_slot().

7 years agoGeneric I/O for directories: switch exfat_flush_node().
relan [Sat, 24 Dec 2016 08:38:31 +0000 (11:38 +0300)]
Generic I/O for directories: switch exfat_flush_node().

7 years agoGeneric I/O for directories: switch rename_entry().
relan [Sat, 24 Dec 2016 07:05:09 +0000 (10:05 +0300)]
Generic I/O for directories: switch rename_entry().

7 years agoGeneric I/O for directories: switch erase_entry().
relan [Fri, 23 Dec 2016 18:34:09 +0000 (21:34 +0300)]
Generic I/O for directories: switch erase_entry().

7 years agoGeneric I/O for directories: switch commit_entry().
relan [Fri, 23 Dec 2016 17:59:43 +0000 (20:59 +0300)]
Generic I/O for directories: switch commit_entry().

7 years agoGeneric I/O for directories: switch find_label().
relan [Thu, 22 Dec 2016 05:52:59 +0000 (08:52 +0300)]
Generic I/O for directories: switch find_label().

7 years agoGeneric I/O for directories: switch exfat_set_label().
relan [Thu, 22 Dec 2016 05:50:42 +0000 (08:50 +0300)]
Generic I/O for directories: switch exfat_set_label().

7 years agoGeneric I/O for directories: do not update times.
relan [Sat, 24 Dec 2016 08:10:10 +0000 (11:10 +0300)]
Generic I/O for directories: do not update times.

7 years agoGeneric I/O for directories: add [read|write]_entries().
relan [Thu, 22 Dec 2016 05:46:34 +0000 (08:46 +0300)]
Generic I/O for directories: add [read|write]_entries().

Begin conversion to exfat_generic_pread()/exfat_generic_pwrite()
functions for manipulations with directories contents. This simplifies
code a lot.

7 years agoRename node field flags to attrib.
relan [Tue, 27 Dec 2016 06:18:58 +0000 (09:18 +0300)]
Rename node field flags to attrib.

Now it contains only exFAT attributes (from meta2).

7 years agoReplace node flags with bit fields.
relan [Tue, 27 Dec 2016 05:53:38 +0000 (08:53 +0300)]
Replace node flags with bit fields.

Bit fields are safer and more readable.

7 years agoRename write_entry() to commit_entry().
relan [Fri, 23 Dec 2016 17:34:59 +0000 (20:34 +0300)]
Rename write_entry() to commit_entry().

This function doesn't just write an entry, it also constructs a new node
and adds it into the tree.

7 years agoUse ROUND_UP() macro instead of DIV_ROUND_UP().
relan [Sun, 15 Jan 2017 17:52:39 +0000 (20:52 +0300)]
Use ROUND_UP() macro instead of DIV_ROUND_UP().

7 years agoPropagate ENOSPC on write.
relan [Tue, 27 Dec 2016 14:22:12 +0000 (17:22 +0300)]
Propagate ENOSPC on write.

Return -errno from exfat_generic_pread()/exfat_generic_pwrite()
functions to distinguish between I/O error and out-of-space error.

7 years agoReduce the sizes of name buffers.
relan [Mon, 26 Dec 2016 06:41:57 +0000 (09:41 +0300)]
Reduce the sizes of name buffers.

EXFAT_NAME_MAX is the number of 16-bit code units, not Unicode
characters. When converting to UTF-8, 3 bytes are enough to keep any
Unicode character encoded by a 16-bit code unit.

7 years agoChange output buffer size semantics for UTF functions.
relan [Tue, 20 Dec 2016 08:26:52 +0000 (11:26 +0300)]
Change output buffer size semantics for UTF functions.

Make them consistent with other string functions: now output buffer size
includes potential null terminator, i.e. this is total size. This change
also means that if output buffer isn't large enough it can be left
unterminated (indicated by the -ENAMETOOLONG return value).

7 years agoRemove buffer size argument for exfat_get_name().
relan [Tue, 20 Dec 2016 08:22:32 +0000 (11:22 +0300)]
Remove buffer size argument for exfat_get_name().

The output buffer is always UTF8_BYTES(EXFAT_NAME_MAX)+1 characters. No
need to repeat this every time.

7 years agoAvoid name length calculation in exfat_calc_name_hash().
relan [Fri, 16 Dec 2016 05:52:32 +0000 (08:52 +0300)]
Avoid name length calculation in exfat_calc_name_hash().

We always know it when exfat_calc_name_hash() is called, so pass file
name length as an argument.

7 years agoRefactor file entry checksum calculation.
relan [Thu, 15 Dec 2016 05:19:52 +0000 (08:19 +0300)]
Refactor file entry checksum calculation.

Move actual algorithm implementation into add_checksum_byte() function.
Avoid utf16_length() call: we already have valid file name length.
Avoid extra data copying: take it from the name buffer instead of making
a temporary file name entry.

7 years agoFix max file name length.
relan [Thu, 15 Dec 2016 05:14:30 +0000 (08:14 +0300)]
Fix max file name length.

In exFAT file name limit is 255 16-bit code units, not 256. That's
because name length field size is 1 byte.

7 years agoBump version to 1.2.5 and update changelog.
relan [Mon, 5 Dec 2016 10:53:19 +0000 (13:53 +0300)]
Bump version to 1.2.5 and update changelog.

7 years agoMove meta2 fields checking into check_node().
relan [Tue, 19 Jul 2016 15:47:28 +0000 (18:47 +0300)]
Move meta2 fields checking into check_node().

There we know node name and print it if an error is detected.

7 years agoAdd node start cluster checks.
relan [Tue, 19 Jul 2016 15:29:25 +0000 (18:29 +0300)]
Add node start cluster checks.

7 years agoRun all checks in check_node().
relan [Tue, 19 Jul 2016 10:34:46 +0000 (13:34 +0300)]
Run all checks in check_node().

Do not stop node validation on the first error.

7 years agoImprove error messages in opendir().
relan [Sat, 12 Nov 2016 07:22:51 +0000 (10:22 +0300)]
Improve error messages in opendir().

7 years agodumpexfat: print version number only when requested.
Daniel Drake [Wed, 20 Jul 2016 18:13:56 +0000 (12:13 -0600)]
dumpexfat: print version number only when requested.

If the version number is printed only when the -V arg is given,
it's easier to use the output of this tool in external scripts.