OSDN Git Service

android-x86/external-ntfs-3g.git
12 years agoAdded allocation data to output of "ntfsinfo -m"
Jean-Pierre André [Mon, 18 Jun 2012 10:19:27 +0000 (12:19 +0200)]
Added allocation data to output of "ntfsinfo -m"

Volume state and the level of allocation were added to the output
of "ntfsinfo -m", they are useful to identify the state of a volume.

12 years agoImplemented the fixing of the backup boot sector in ntfsfix
Jean-Pierre André [Wed, 21 Mar 2012 18:35:30 +0000 (19:35 +0100)]
Implemented the fixing of the backup boot sector in ntfsfix

This checks the backup boot sector and fixes it as needed.

12 years agoAvoided interpreting UTIME_NOW and UTIME_OMIT from external fuse
Jean-Pierre André [Wed, 21 Mar 2012 18:26:00 +0000 (19:26 +0100)]
Avoided interpreting UTIME_NOW and UTIME_OMIT from external fuse

UTIME_NOW and UTIME_OMIT are needed for implementing utimensat() and
futimens(2), but they cannot yet be used with external fuse.
This patch is to avoid errors if they cannot be used, even with fuse 4.9

12 years agoSet the hidden flag according to the latest name when hide_dot_files is set
Jean-Pierre André [Wed, 21 Mar 2012 18:19:39 +0000 (19:19 +0100)]
Set the hidden flag according to the latest name when hide_dot_files is set

When the hide_dot_files option is set, a file is marked hidden if the
first character in its name is a dot. This patch updates the hidden flag
when the file is renamed or hard linked (useful for text editors which
create files with a temporary name)

12 years agoKept the name of a deleted file in place for easier undeletion
Jean-Pierre André [Wed, 21 Mar 2012 18:14:03 +0000 (19:14 +0100)]
Kept the name of a deleted file in place for easier undeletion

When a file is deleted, there is no need to remove its last name in
the deleted MFT record. The name may be useful for undeleting the file
later (Windows also does not delete the name).

12 years agoCosmetic : moved the basename(3) redefinition to a better location
Jean-Pierre André [Wed, 21 Mar 2012 18:09:52 +0000 (19:09 +0100)]
Cosmetic : moved the basename(3) redefinition to a better location

basename(3) is not available on OpenIndiana and had to be redefined.
Just move the redefinition to a more standard location

12 years agoImplemented the check for already mounted device on OpenIndiana
Jean-Pierre André [Wed, 21 Mar 2012 18:01:33 +0000 (19:01 +0100)]
Implemented the check for already mounted device on OpenIndiana

This adds a variant for checking on OpenIndiana whether a device
is mentioned in /etc/mnttab as being mounted.

12 years agoReverted the workaround for ftruncate() and access(W_OK) on OpenIndiana
Jean-Pierre André [Wed, 21 Mar 2012 17:56:05 +0000 (18:56 +0100)]
Reverted the workaround for ftruncate() and access(W_OK) on OpenIndiana

The special tests for accepting ftruncate(2) and access(W_OK) applied
to a file being created read-only have been implemented in the fuse
kernel module, so there is no need to duplicate them in the file system.

12 years agoAvoided setuid/setgid removal by chown on OpenIndiana
Jean-Pierre André [Wed, 21 Mar 2012 17:52:07 +0000 (18:52 +0100)]
Avoided setuid/setgid removal by chown on OpenIndiana

On OpenIndiana, it is not customary to remove the setuid/setgid flags
when doing a chown, so comply with the local rules.

12 years agoMade sure directories are not hard linked
Jean-Pierre André [Wed, 21 Mar 2012 17:48:38 +0000 (18:48 +0100)]
Made sure directories are not hard linked

On OpenIndiana the fuse kernel module does not prevent link(2) from
hard linking directories, so this has to be done in the lowntfs-3g
driver.

12 years agoMade sure rmdir is only used for directories, and unlink otherwise
Jean-Pierre André [Wed, 21 Mar 2012 17:42:29 +0000 (18:42 +0100)]
Made sure rmdir is only used for directories, and unlink otherwise

On OpenIndiana the fuse kernel module does not prevent unlink(2)
from deleting directories, nor prevent rmdir(2) from deleting files,
so this has to be done in the lowntfs-3g driver.

12 years agoImplemented supplementary group checks for OpenIndiana
Jean-Pierre André [Wed, 21 Mar 2012 17:34:48 +0000 (18:34 +0100)]
Implemented supplementary group checks for OpenIndiana

Checking supplementary groups permissions to access a file relies on
a supplementary group list available in /proc/PID. This patch adds a
variant to implement the checks based on the specific format used
by OpenIndiana.

12 years agoImplemented an option to set a new serial number in ntfslabel
Jean-Pierre André [Mon, 23 Jan 2012 17:22:59 +0000 (18:22 +0100)]
Implemented an option to set a new serial number in ntfslabel

Defined new options --new-serial and --new-half-serial to set a new
serial number (either the given one or a random one) to a file system.
Useful for mounting the original and the cloned file system at the
same time.

12 years agoImplemented an option to set a new serial number in ntfsclone
Jean-Pierre André [Mon, 23 Jan 2012 17:19:17 +0000 (18:19 +0100)]
Implemented an option to set a new serial number in ntfsclone

Defined new options --new-serial and --new-half-serial to set a new
random serial number when cloning or restoring a file system.
Useful for mounting the original and the cloned file system at the
same time.

12 years agoFixed clearing user data when creating metadata images
Jean-Pierre André [Mon, 23 Jan 2012 17:13:59 +0000 (18:13 +0100)]
Fixed clearing user data when creating metadata images

Clearing of user data was wrong when extracting the metadata into a
special format image. In this situation the clearing has to be done
without mounting the file system.

12 years agoImplemented a new option -q to avoid updating the progress information (Matthew Boyle)
Jean-Pierre André [Mon, 23 Jan 2012 17:10:26 +0000 (18:10 +0100)]
Implemented a new option -q to avoid updating the progress information (Matthew Boyle)

The progress bars complexify the integration of ntfsclone into other
tools, the option -q (or --quiet) gets rid of them.

12 years agoFixed debug check for double opening after deleting an inode
Jean-Pierre André [Mon, 23 Jan 2012 17:05:27 +0000 (18:05 +0100)]
Fixed debug check for double opening after deleting an inode

A debug check could be defeated when a deleted inode number was reused.

12 years agoWorked around basename(3) not present on OpenIndiana
Jean-Pierre André [Mon, 23 Jan 2012 17:03:59 +0000 (18:03 +0100)]
Worked around basename(3) not present on OpenIndiana

12 years agoPut the device name as the last option
Jean-Pierre André [Mon, 23 Jan 2012 17:00:18 +0000 (18:00 +0100)]
Put the device name as the last option

On OpenIndiana the device names have commas, so put it as the last option
to prevent defeating the options parsing.

12 years agoMounted with an absolute mount point on OpenIndiana
Jean-Pierre André [Mon, 23 Jan 2012 16:56:15 +0000 (17:56 +0100)]
Mounted with an absolute mount point on OpenIndiana

OpenIndiana requires that the mount points be defined on a full
absolute patch. Give it what it needs.

12 years agoWorked around write checks for ftruncate() and access(W_OK) on OpenIndiana
Jean-Pierre André [Mon, 23 Jan 2012 16:49:38 +0000 (17:49 +0100)]
Worked around write checks for ftruncate() and access(W_OK) on OpenIndiana

When a file is created with no write permissions, ftruncate and
access(W_OK) should be allowed, but this check has to be made by the
file system on OpenIndiana.
This patch is not active on Linux (#ifdef'ed)

12 years agoStrengthened sanity checks on readdir/closedir
Jean-Pierre André [Mon, 23 Jan 2012 16:45:12 +0000 (17:45 +0100)]
Strengthened sanity checks on readdir/closedir

Be more defensive against readdir() on closed directories.

12 years agoPreferred access control by file system on OpenIndiana
Jean-Pierre André [Mon, 23 Jan 2012 16:39:47 +0000 (17:39 +0100)]
Preferred access control by file system on OpenIndiana

ntfs-3g cannot reliably use the access control made by the kernel on
OpenIndiana, so do it at the file system level until this is solved.

12 years agoReturned unmount errors in ntfs-3g.probe (Diego Elio Petteno)
Jean-Pierre André [Mon, 23 Jan 2012 16:34:19 +0000 (17:34 +0100)]
Returned unmount errors in ntfs-3g.probe (Diego Elio Petteno)

ntfs-3g.probe is used to get information about mounting errors, this
extends the use for unmounting errors.

12 years agoAccepted multiple read-only mounts
Jean-Pierre André [Mon, 23 Jan 2012 16:31:15 +0000 (17:31 +0100)]
Accepted multiple read-only mounts

Multiple mounts of a partition is now allowed provided they are all
in read-only mode.

12 years agochanged error return for user access to trusted xattr
Jean-Pierre André [Mon, 23 Jan 2012 16:25:55 +0000 (17:25 +0100)]
changed error return for user access to trusted xattr

When a user queries an extended attribute in the trusted namespace,
the traditional error return was EPERM. This has been recently changed
to ENODATA. See https://lkml.org/lkml/2011/5/27/199

12 years agooutput the numbers of runs and fragments in ntfsinfo
Jean-Pierre André [Mon, 23 Jan 2012 16:20:20 +0000 (17:20 +0100)]
output the numbers of runs and fragments in ntfsinfo

It is difficult to identify whether a file from a user complaining about
bad throughput is over-fragmented, so get the information from ntfsinfo.

12 years agofixed checking whether Windows 7 was hibernated
Jean-Pierre André [Mon, 23 Jan 2012 16:16:07 +0000 (17:16 +0100)]
fixed checking whether Windows 7 was hibernated

On Windows XP and Vista, the system hibernation is identified by the
sequence "hibr" at the beginning of hiberfil.sys. This had been changed
to "HIBR" in Windows 7, so both sequences have to be accepted as
hibernation criteria.

12 years agofixed clearing the end of extents when extracting metadata
Jean-Pierre André [Mon, 23 Jan 2012 16:11:46 +0000 (17:11 +0100)]
fixed clearing the end of extents when extracting metadata

When extracting the metadata, unused data at the end of MFT records is
supposed to be cleared. This was done for the base record of each file,
but not for the extent records.

12 years agoCosmetic : fixed an indentation in unistr
Jean-Pierre André [Mon, 23 Jan 2012 16:09:19 +0000 (17:09 +0100)]
Cosmetic : fixed an indentation in unistr

12 years agoFixed clearing the bad cluster list in ntfsfix
Jean-Pierre André [Mon, 23 Jan 2012 15:59:49 +0000 (16:59 +0100)]
Fixed clearing the bad cluster list in ntfsfix

Clearing the bad cluster list was done by truncating $BadClus:$Bad,
this turned out not to be reliable because chkdsk does not adjust
the size of $BadClus:$Bad when declaring a cluster bad.

12 years agoAllowed building for kfreebsd (Robert Millan)
Jean-Pierre André [Mon, 23 Jan 2012 15:55:04 +0000 (16:55 +0100)]
Allowed building for kfreebsd (Robert Millan)

Extended several #ifdef's to account for "FreeBSD kernel"

12 years agoUsed ENOENT instead of ENODATA when the latter is not defined (Robert Millan)
Jean-Pierre André [Mon, 23 Jan 2012 15:50:25 +0000 (16:50 +0100)]
Used ENOENT instead of ENODATA when the latter is not defined (Robert Millan)

ENODATA is not defined by Posix and is lacking on FreeBSD

12 years agoVersion 2012.1.15
Szabolcs Szakacsits [Sun, 15 Jan 2012 13:21:52 +0000 (15:21 +0200)]
Version 2012.1.15

12 years agoPrefix all functions and macros in ntfsprogs/list.h with 'ntfs_/NTFS_'.
Erik Larsson [Wed, 11 Jan 2012 10:44:09 +0000 (11:44 +0100)]
Prefix all functions and macros in ntfsprogs/list.h with 'ntfs_/NTFS_'.

This avoids name collisions with Mac OS X system headers (specifically
/usr/include/sys/queue.h). It's quite possible that other operating
systems also have similarly named macros in their system headers since
the function/macro names are very generic.

12 years agontfswipe.c: Deduplicated MFT write code in wipe_mft.
Erik Larsson [Mon, 9 Jan 2012 11:57:26 +0000 (12:57 +0100)]
ntfswipe.c: Deduplicated MFT write code in wipe_mft.

12 years agontfswipe.c: Code cleanup.
Erik Larsson [Mon, 9 Jan 2012 03:48:21 +0000 (04:48 +0100)]
ntfswipe.c: Code cleanup.

Changed the code to use the structs in layout.h instead of addressing
byte addresses directly. This makes the code a lot more readable.

12 years agontfswipe.c: Big endian fix for wipe_mft.
Erik Larsson [Mon, 9 Jan 2012 02:54:11 +0000 (03:54 +0100)]
ntfswipe.c: Big endian fix for wipe_mft.

The 'bytes_in_use' member was not byteswapped after being read from the
buffer and used in a calculation.

12 years agontfswipe.c: Write newly manufactured MFT entries to $MFTMirr if needed.
Erik Larsson [Mon, 9 Jan 2012 02:44:44 +0000 (03:44 +0100)]
ntfswipe.c: Write newly manufactured MFT entries to $MFTMirr if needed.

'wipe_mft' didn't write any $MFTMirr entries for newly manufactured
entries (i.e. entries that were unused and therefore competely wiped and
replaced with a newly initialized copy).

12 years agontfswipe.c: Fixed writing incorrect $MFTMirr entries in wipe_mft.
Erik Larsson [Mon, 9 Jan 2012 02:41:02 +0000 (03:41 +0100)]
ntfswipe.c: Fixed writing incorrect $MFTMirr entries in wipe_mft.

The dereferencing of 'offset' and 'usa' from the MFT record wasn't an
le16* dereference but a u8* dereference, leading to only the least
significant byte (little-endian systems) or the most significant byte
(big-endian systems) being part of the value. (So while this bug could
go unnoticed on little-endian systems for volumes with small values of
'usa', it caused even more significant problems on big-endian systems.)

Fixed by properly casting the address to le16* before dereferencing.

12 years agontfswipe.c: Fix support for non-1024 byte MFT record sizes in wipe_mft.
Erik Larsson [Mon, 9 Jan 2012 02:30:51 +0000 (03:30 +0100)]
ntfswipe.c: Fix support for non-1024 byte MFT record sizes in wipe_mft.

'wipe_mft' was hardcoded to use the USA size of a 1024 byte MFT record
when creating new blank MFT entries. It now calculates the USA size
based on vol->mft_record_size.

12 years agoutils.c: Fixed apparently incorrect initial value of 'bmpmref'.
Erik Larsson [Mon, 9 Jan 2012 02:27:29 +0000 (03:27 +0100)]
utils.c: Fixed apparently incorrect initial value of 'bmpmref'.

This bug led 'utils_mftrec_in_use' to use 'cached' data before it had
been initialized (i.e. its contents was undefined), producing incorrect
results for the first 3584 MFT entries.

12 years agosecaudit : minor : fixed a false memory leak detection
Jean-Pierre André [Thu, 10 Nov 2011 20:34:39 +0000 (21:34 +0100)]
secaudit : minor : fixed a false memory leak detection

12 years agosecaudit : prefixed owner and group SID in ACL display
Jean-Pierre André [Thu, 10 Nov 2011 20:33:06 +0000 (21:33 +0100)]
secaudit : prefixed owner and group SID in ACL display

12 years agoNew : implemented an option -d to clear the dirty flag if ntfsfix is successful
Jean-Pierre André [Fri, 4 Nov 2011 10:15:01 +0000 (11:15 +0100)]
New : implemented an option -d to clear the dirty flag if ntfsfix is successful

12 years agoMinor : fixed a test of volume dirty flag in ntfsfix
Jean-Pierre André [Fri, 4 Nov 2011 10:11:40 +0000 (11:11 +0100)]
Minor : fixed a test of volume dirty flag in ntfsfix

12 years agomajor : Fixed computation of index block size (Anton Altaparmakov)
Jean-Pierre André [Fri, 4 Nov 2011 10:01:11 +0000 (11:01 +0100)]
major : Fixed computation of index block size (Anton Altaparmakov)

When the cluster size is bigger than the index block size, the index
block size unit is 512 (not the sector size) instead of the cluster size.
The partitions formatted by mkntfs and used by ntfs-3g were not
interoperable with Windows when the cluster size is bigger than 4K
and the sector size is not 512.

12 years agomanual : Added a warning against checks at boot time
Jean-Pierre André [Thu, 20 Oct 2011 17:11:38 +0000 (19:11 +0200)]
manual : Added a warning against checks at boot time

The booting process has recently been changed so that partitions
which are requested to be checked at mount time with no checker
available, cause a specific user interaction while booting.
The patch warns users against requesting such a check, as there
is no known open-source ntfs file system checker.

12 years agoFixed huge data writes
Jean-Pierre André [Thu, 20 Oct 2011 17:05:27 +0000 (19:05 +0200)]
Fixed huge data writes

When computing the runlist for the first non-resident write to an
attribute, an inconsistency was created between the attribute image
and the ntfs_attr structure, which could cause an MFT record overflow
when the first write is huge and fragmented (reported by Vito Caputo).

12 years agonew : allow compression in default setup
Jean-Pierre André [Thu, 20 Oct 2011 16:55:32 +0000 (18:55 +0200)]
new : allow compression in default setup

With the default mount options, compression of new files are now done
if the parent directory is marked for compression. The mount option
"compression" is not needed any more, but the option "nocompression"
can be used to disable compression of new files.

The default option also applies to applications using libntfs-3g with
no mount command.

12 years agofix : fed in the available space in ntfscp
Jean-Pierre André [Thu, 20 Oct 2011 16:51:15 +0000 (18:51 +0200)]
fix : fed in the available space in ntfscp

12 years agonew : allowed compression in ntfscp
Jean-Pierre André [Thu, 20 Oct 2011 16:49:58 +0000 (18:49 +0200)]
new : allowed compression in ntfscp

12 years agoRelease 2011.10.9-RC
Szabolcs Szakacsits [Sun, 9 Oct 2011 08:29:41 +0000 (11:29 +0300)]
Release 2011.10.9-RC

12 years agoInserted the inode number when naming unnamed undeleted files
Jean-Pierre André [Fri, 7 Oct 2011 09:52:21 +0000 (11:52 +0200)]
Inserted the inode number when naming unnamed undeleted files

When undeleting a file whose name cannot be recovered, this patch
defines a name to which the inode number is appended to facilitate
a bulk recovery (recovering the unwanted deletion of a subtree).

12 years agoAdded to ntfsundelete an attempt to recover the name of a deleted file
Jean-Pierre André [Fri, 7 Oct 2011 09:45:47 +0000 (11:45 +0200)]
Added to ntfsundelete an attempt to recover the name of a deleted file

When a file is deleted, ntfs-3g deletes the name from the MFT record,
so the name is not available when the file has to be undeleted.
This patch tries to recover the name when it has not been overwritten.
This is mostly possible when data is non-resident and not fragmented.

12 years agoDevelopped creating a metadata image in ntfsclone
Jean-Pierre André [Fri, 7 Oct 2011 09:42:08 +0000 (11:42 +0200)]
Developped creating a metadata image in ntfsclone

With this patch a metadata image can be created without creating
an intermediate file. Use both option -m and -s.

12 years agoDevelopped fixing of a self-located MFT data bug in ntfsfix
Jean-Pierre André [Fri, 7 Oct 2011 09:33:22 +0000 (11:33 +0200)]
Developped fixing of a self-located MFT data bug in ntfsfix

Under some rare and obscure circumstances probably unrelated to ntfs-3g,
a part of the runlist of MFT describes its own location, therefore
it cannot be loaded. This patch relocates the MFT extent to inode 15
to fix this. Note : chkdsk cannot fix it and destroys all the files.

12 years agoDevelopped expanding an NTFS volume downwards in ntfsresize
Jean-Pierre André [Fri, 7 Oct 2011 09:26:58 +0000 (11:26 +0200)]
Developped expanding an NTFS volume downwards in ntfsresize

When the lower bound of an ntfs partition is moved down this patch
recreated new metadata in the expanded space without copying the
actual data. The existing code for moving the upper bound of the
partition has been kept unchanged.

12 years agoDefined option delay_mtime to delay updates of mtime+ctime
Jean-Pierre André [Fri, 7 Oct 2011 09:16:23 +0000 (11:16 +0200)]
Defined option delay_mtime to delay updates of mtime+ctime

This patch avoid updating the time stamps whenever a file is modified,
by delaying the time stamps updating until the file is closed.
This is mostly useful when the ntfs file system hosts another loop-monted
file system to avoid frequent updates of the time stamps in the outer
file system.

12 years agoCosmetic : fixed an error message (hggdh2)
Jean-Pierre André [Fri, 30 Sep 2011 07:06:42 +0000 (09:06 +0200)]
Cosmetic : fixed an error message (hggdh2)

12 years agocosmetic : fixed improper wordings (hggdh2)
Jean-Pierre André [Wed, 28 Sep 2011 14:41:12 +0000 (16:41 +0200)]
cosmetic : fixed improper wordings (hggdh2)

12 years agoFixed a bug when undeleting a sparse file
Jean-Pierre André [Mon, 26 Sep 2011 13:03:38 +0000 (15:03 +0200)]
Fixed a bug when undeleting a sparse file

An old typo leading to a badly recovered file and sometimes to a segfault

12 years agoAvoided logging meaningless fixup errors in ntfsclone and ntfsresize
Jean-Pierre André [Fri, 23 Sep 2011 09:28:42 +0000 (11:28 +0200)]
Avoided logging meaningless fixup errors in ntfsclone and ntfsresize

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.

12 years agoEnabled getting the sector size from an ioctl on FreeBSD and MacOSX (Erik Larsson)
Jean-Pierre André [Tue, 1 Mar 2011 11:04:43 +0000 (12:04 +0100)]
Enabled getting the sector size from an ioctl on FreeBSD and MacOSX (Erik Larsson)

The sector size is needed for formatting a volume unless forced through
an option or using the traditional sector size.

12 years agoFixed the size limits for the volume label set by mkntfs
Jean-Pierre André [Wed, 14 Sep 2011 06:32:28 +0000 (08:32 +0200)]
Fixed the size limits for the volume label set by mkntfs

12 years agoReplaced some usages of ntfs_mbstoucs_libntfscompat with ntfs_mbstoucs.
Erik Larsson [Tue, 13 Sep 2011 07:51:55 +0000 (09:51 +0200)]
Replaced some usages of ntfs_mbstoucs_libntfscompat with ntfs_mbstoucs.

Some calls to ntfs_mbstoucs_libntfscompat were unnecessary as they only used
functionality that can be provided by ntfs_mbstoucs.

12 years agoCleaned up and moved label changing functionality into libntfs-3g.
Erik Larsson [Tue, 13 Sep 2011 07:43:30 +0000 (09:43 +0200)]
Cleaned up and moved label changing functionality into libntfs-3g.

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.

12 years agoFixed the setting of attributes by secaudit
Jean-Pierre André [Mon, 12 Sep 2011 16:41:25 +0000 (18:41 +0200)]
Fixed the setting of attributes by secaudit

The setting of attributes was done in the "standard information",
it must also be propagated to the indexes in parent directories.

12 years agoPermit $VOLUME_NAME to be 0-sized, even when $AttrDef says otherwise.
Erik Larsson [Mon, 12 Sep 2011 07:07:00 +0000 (09:07 +0200)]
Permit $VOLUME_NAME to be 0-sized, even when $AttrDef says otherwise.

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.

12 years agoFixed the truncation of dos file names
Jean-Pierre André [Thu, 8 Sep 2011 07:52:51 +0000 (09:52 +0200)]
Fixed the truncation of dos file names

Truncate dos file names to 12 ntfschars instead of 12 utf-8 bytes

13 years agoFixed the FullyMapped flag when making an attribute resident
Jean-Pierre André [Tue, 30 Aug 2011 14:02:32 +0000 (16:02 +0200)]
Fixed the FullyMapped flag when making an attribute resident

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.

13 years agoAvoid endless recursion when MFT extents are described in themselves
Jean-Pierre André [Tue, 30 Aug 2011 13:56:36 +0000 (15:56 +0200)]
Avoid endless recursion when MFT extents are described in themselves

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.

13 years agocosmetic : Removed a pointless store in ntfs_attr_make_resident() (Fabian Keil)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:36 +0000 (15:49 +0200)]
cosmetic : Removed a pointless store in ntfs_attr_make_resident() (Fabian Keil)

13 years agocosmetic : Removed a redundant store in utils_is_metadata() (Fabian Keil)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:36 +0000 (15:49 +0200)]
cosmetic : Removed a redundant store in utils_is_metadata() (Fabian Keil)

13 years agocosmetic : Removed two dead stores in remove_object_id_index() (Fabian Keil)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:36 +0000 (15:49 +0200)]
cosmetic : Removed two dead stores in remove_object_id_index() (Fabian Keil)

13 years agocosmetic : Removed a pointless variable initialization in upgrade_secur_desc() (Fabia...
Jean-Pierre André [Thu, 4 Aug 2011 13:49:36 +0000 (15:49 +0200)]
cosmetic : Removed a pointless variable initialization in upgrade_secur_desc() (Fabian Keil)

13 years agofix : Fixed ntfs_rl_extend() returning garbage in error case (Fabian Keil)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:36 +0000 (15:49 +0200)]
fix : Fixed ntfs_rl_extend() returning garbage in error case (Fabian Keil)

13 years agominor : Fixed ntfs_fuse_read() returning garbage in error case (Fabian Keil)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
minor : Fixed ntfs_fuse_read() returning garbage in error case (Fabian Keil)

13 years agominor : Fixed ntfs_upcase_build_default() returning garbage in error case (Fabian...
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
minor : Fixed ntfs_upcase_build_default() returning garbage in error case (Fabian Keil)

13 years agorevert : Reverted to old behavior for errored reply in ntfsresize
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
revert : Reverted to old behavior for errored reply in ntfsresize

13 years agodocumentation : Improved the description of the -f option in the manual for ntfsresize
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
documentation : Improved the description of the -f option in the manual for ntfsresize

13 years agocosmetic : Removed an unneeded function in fuse_lowlevel.c (and a gcc 4.6 warning)
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
cosmetic : Removed an unneeded function in fuse_lowlevel.c (and a gcc 4.6 warning)

13 years agocosmetic : Removed more unneeded variables warned by gcc 4.6
Jean-Pierre André [Thu, 4 Aug 2011 13:49:35 +0000 (15:49 +0200)]
cosmetic : Removed more unneeded variables warned by gcc 4.6

13 years agoFix: Forgot to update state bits after last change.
Erik Larsson [Wed, 3 Aug 2011 13:49:40 +0000 (15:49 +0200)]
Fix: Forgot to update state bits after last change.

13 years agoBugfix: ntfs_mft_load didn't fill in the size fields in the $MFT inode.
Erik Larsson [Wed, 3 Aug 2011 09:02:33 +0000 (11:02 +0200)]
Bugfix: ntfs_mft_load didn't fill in the size fields in the $MFT inode.

13 years agontfsprogs/Makefile.am: Fix for conflicting usage of EXTRA_PROGRAMS.
Erik Larsson [Wed, 6 Jul 2011 10:41:19 +0000 (12:41 +0200)]
ntfsprogs/Makefile.am: Fix for conflicting usage of EXTRA_PROGRAMS.

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.

13 years agoAdded a new configure option '--disable-ntfs-3g'.
Erik Larsson [Wed, 6 Jul 2011 07:48:45 +0000 (09:48 +0200)]
Added a new configure option '--disable-ntfs-3g'.

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).

13 years agoFixed compiling ntfsfix.c for a Sparc
Jean-Pierre André [Wed, 6 Jul 2011 15:46:31 +0000 (17:46 +0200)]
Fixed compiling ntfsfix.c for a Sparc

13 years agoImplemented a new option to clear the list of bad sectors
Jean-Pierre André [Tue, 5 Jul 2011 10:17:31 +0000 (12:17 +0200)]
Implemented a new option to clear the list of bad sectors

13 years agoImproved compression (faster)
Jean-Pierre André [Tue, 5 Jul 2011 10:17:30 +0000 (12:17 +0200)]
Improved compression (faster)

13 years agoProvided support for big writes
Jean-Pierre André [Tue, 5 Jul 2011 10:17:30 +0000 (12:17 +0200)]
Provided support for big writes

13 years agoImplemented expanding runlists in ntfsresize (Fedora 689275)
Jean-Pierre André [Tue, 5 Jul 2011 10:17:30 +0000 (12:17 +0200)]
Implemented expanding runlists in ntfsresize (Fedora 689275)

13 years agoOptionally closed volume and cleaned memory when leaving ntfsresize (kept disabled)
Jean-Pierre André [Tue, 5 Jul 2011 10:17:30 +0000 (12:17 +0200)]
Optionally closed volume and cleaned memory when leaving ntfsresize (kept disabled)

13 years agoFixed dead http links in ntfsprogs manuals (Daniel Baumann)
Jean-Pierre André [Tue, 5 Jul 2011 10:17:30 +0000 (12:17 +0200)]
Fixed dead http links in ntfsprogs manuals (Daniel Baumann)

13 years agoAccepted the backup bootsector not be to accounted for when cloning
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Accepted the backup bootsector not be to accounted for when cloning

13 years agoSilenced apparent out-of-range subscripts warned by gcc 4.6
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Silenced apparent out-of-range subscripts warned by gcc 4.6

13 years agoRemoved unneeded variables as warned by gcc 4.6
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Removed unneeded variables as warned by gcc 4.6

13 years agoFixed use of uninitialized variable in ntfsfix
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Fixed use of uninitialized variable in ntfsfix

13 years agoFixed relatime as a default mount option (had become atime)
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Fixed relatime as a default mount option (had become atime)

13 years agoFixed a too restrictive consistency check in attrib.c
Jean-Pierre André [Tue, 5 Jul 2011 10:17:29 +0000 (12:17 +0200)]
Fixed a too restrictive consistency check in attrib.c