Logging of fixup errors for uninitialized inodes cause unnecessary
worries and suspicion of malfunctions in ntfs-3g. This patch silences
these loggings in ntfsclone and ntfsresize which have to analyze all
inodes, including the uninitialized ones.
The label changing code in ntfslabel was cleaned up and modified to use the more
advanced functionality of libntfs-3g instead of using older custom code to
resize and create resident attributes.
The core label changing functionality was also moved into the library so it can
be reused by other programs.
When clearing a volume name in Windows, $VOLUME_NAME is set to size 0, even if
the standard $AttrDef says that the minimum size is 2.
So the definition in $AttrDef doesn't reflect actual Windows behaviour in this
particular case, and to clear volume names ourselves the way Windows does it,
we must must add a special rule to permit us to truncate the $VOLUME_NAME
attribute to 0 even when $AttrDef specifies a higher value as minimum size.
When an attribute is truncated and made resident, the NAttrFullyMapped
flags has to be cleared, otherwise the attribute cannot be properly
mapped when the attribute is later made non-resident again.
When getting extents of MFT, we must be sure they are in the MFT part which
has already been mapped, otherwise we fall into an endless recursion.
Situations have been met where extents locations are described in themselves,
as a consequence of a bug, probably unrelated to ntfs-3g.
This is a severe error which chkdsk cannot fix.
After the '--enable-extras' patch, EXTRA_PROGRAMS and bin_PROGRAMS were both defined when ENABLE_EXTRAS was enabled.
This created a conflict, where at least automake 1.10 attempted to emit targets for the binaries twice, resulting in failure when running 'autogen.sh'.
Conflict was resolved by defining the names of the binaries in a non-reserved variable EXTRA_PROGRAM_NAMES, which is then included either in EXTRA_PROGRAMS or bin_PROGRAMS but never in both.
The binaries 'ntfs-3g', 'lowntfs-3g', 'ntfs-3g.probe' 'ntfs-3g.usermap' and 'ntfs-3g.secaudit' will not be built when this option is passed to 'configure'.
When specifying both '--disable-ntfsprogs' and '--disable-ntfs-3g', only libntfs-3g will be built (no executable binaries).
For some reason, when the monted device is "/dev/mapper/*", a record
in the form "/dev/dm-*" ends up in /etc/mtab and the device cannot be
unmounted.
The reason is unclear, the /dev/mapper name is not a symlink, and the
function doing the name change is not known. No detailed feedback from
the users having met the issue.
The patch changes the name back to the /dev/mapper name after realpath()
is called, and, if there is an actual change, both the name passed to
ntfs-3g and the one passed to fuse and mount are logged in the hope
of getting a clue about what is happening.
But ntfs-3g is probably not the right place for a fix.