Commit Graph

1461 Commits

Author SHA1 Message Date
Jean-Pierre André
ca70766dc4 Fixed reporting action states when restart page appears outdated
If start buffer is more recent than restart, we update committed LSN
with last record LSN of block (last_end_lsn) while applying action but
forget about it while printing records with -f for investigation
purpose.

Note that while applying actions we use start_buffer to calculate
latest page out of block 2 and block 3 and then from latest take
committed LSN. For -f we don't need buffers so we just compare
directly with committed LSN from restart.

(contributed by Rakesh Pandit)
2015-12-01 11:10:48 +01:00
Jean-Pierre André
730776b0e5 Defined reparse tag for system compression
The new compression formats used by Windows 10 uses reparse data, and
a new reparse tag which it is useful to define even though these formats
is not yet supported by ntfs-3g.
2015-12-01 10:56:01 +01:00
Jean-Pierre André
f85b82c8e1 Fixed headers of log play functions in playlog
The functions were made static with a textual description.
2015-11-20 16:14:16 +01:00
Jean-Pierre André
aade4c46b6 Fixed missing error return in playlog
No error was returned from reading a protected record which is part of
an unreadable raw cluster.
2015-11-20 16:11:15 +01:00
Jean-Pierre André
3c964b6af3 Fixed truncating an extended bad cluster list in ntfsresize
This fixes the case where the original bad cluster list requires extents.
The list is processed globally, no relocation is done, and the list is
truncated, possibly fitting into fewer extents.
2015-11-20 16:04:47 +01:00
Jean-Pierre André
ede1808ba6 Removed obsolete code from playlog
The code for dealing with new MFT records had been made more general
2015-11-12 15:46:33 +01:00
Jean-Pierre André
22b59548d9 Subdivided the replay functions in playlog
Partially unnested play_redos() and play_undos()
2015-11-12 15:44:47 +01:00
Jean-Pierre André
fe3e16243a Fixed a memory leak in ntfsrecover
A buffer was left leaking memory in reset_logfile()
2015-11-12 15:41:44 +01:00
Jean-Pierre André
59c90f039d Defined the last logfile block as preceding block 4 in ntfsrecover
When block 2 or block 3 points backward to block 4, it is not clear
whether the log file only consists of block 2 or block 3 or the log
file has just wrapped around. The latter is now assumed.
2015-11-12 15:31:24 +01:00
Jean-Pierre André
fb0afd41c8 Decoded the full list of bad clusters in ntfsclone and ntfsresize
When the bad cluster list required extent, ntfsclone and ntfsresize
did not process the extents, leading to unexpected read errors and
unmatching bitmaps. This fix enables the full list to be taken into
account.
2015-11-09 16:16:39 +01:00
Jean-Pierre André
cba621e822 Silenced a compiler warning in ntfswipe (cosmetic)
Avoid a signed-to-unsigned compare warning
2015-11-09 15:58:00 +01:00
Jean-Pierre André
e736fea196 Fixed relocating the MFT runlists in ntfsresize
The MFT has two runlists which may be partially stored in extents.
When these runlists have to be relocated, the relocations must be done
after the old runlists are not needed any more to read the data of
standard files, but before the MFT may be needed to extend the runlists
of standard files. Before doing so the MFT runlists have to be refreshed
from device in order to collect the updates which cannot be done in
memory during the first stage.
2015-11-09 15:44:33 +01:00
Jean-Pierre André
0cb0173bbc Implemented recovery of updates committed by Windows
ntfsrecover applies to the metadata the updates which were requested on
Windows but could not be completed because they were interrupted by
some event such as a power failure, a hardware crash, a software crash
or the device being unplugged. Doing so, the file system is restored
to the latest consistent state.

No update to libntfs-3g is required by this implementation.
2015-11-09 13:18:58 +01:00
Jean-Pierre André
2f373dee56 ntfsprogs Builds on Windows use macroes to translate printing formats,
and these macroes redefined "buf" in a way which causes trouble when
"buf" has another meaning. Use "_b" instead.
2015-09-30 09:08:35 +02:00
Jean-Pierre André
800660f728 Displayed reparse point information in ntfsinfo
Added displaying of reparse point data and decode known formats.
2015-09-30 09:05:47 +02:00
Jean-Pierre André
94f8d2128e Fixed a wrong test report in ntfsfix
When used with the "no-action" option, the test for self-located MFT
still reported the partition to have been repaired. Adapt the report to
only tell repairing is possible.
2015-09-30 08:54:27 +02:00
Jean-Pierre André
4a4ec8c1c6 Fixed a bad sanity check in ntfsfix
Fix misordered checks to avoid potential segfaults on badly damaged partitions.
2015-09-30 08:51:20 +02:00
Jean-Pierre André
5ebe36f10a Mentioned the starting sector when it overflows in mkntfs
In an NTFS boot sector, the first sector of the partition is limited to
32 bits and it may overflow on large disks. This field is only used for
booting on the partition and it is ignored by ntfs-3g, but the warning
in mkntfs mislead users, so improve it.
2015-09-30 08:25:25 +02:00
Erik Larsson
78ad037c66 Make installing mkntfs /sbin symlinks dependent on ENABLE_MOUNT_HELPER.
We shouldn't install anything into /sbin unless ENABLE_MOUNT_HELPER is
on, which is only true for Linux (these are Linux-specific symlinks).
2015-06-23 06:26:52 +02:00
Jean-Pierre André
6a1c32e538 Fixed the DESX encryption/decryption in ntfsdecrypt
The DESX encryption/decryption algorithm was different from the Windows one.
2015-04-17 11:00:00 +02:00
Jean-Pierre André
baab4c287e Added a sanity check to ntfswipe
Unused entries in the MFT may have a bad length leading to fetch fixups
from unallocated memory. Check the condition, but do not wipe, leave it
to chkdsk to decide what should be fixed.
2015-04-17 10:49:23 +02:00
Jean-Pierre André
d96ae8d7da Removed the double try to unmount partition in ntfsfix
When the unmounting of the partition fails after running ntfsfix, a
second try was attempted. This cannot be done and leads to more errors
because some essential records have been freed, so better quit without
making a second try.
2015-04-17 10:27:24 +02:00
Jean-Pierre André
1e8ae121fc Rephrased a misleading report message in ntfswipe
When using the "--no-action" option, ntfswipe should display a count
of would-be wiped bytes without suggesting any has been wiped.
2015-04-17 09:42:19 +02:00
Jean-Pierre André
e43f58e0e4 Avoided logging meaningless fixup errors in ntfswipe
As ntfswipe examines all MFT entries, it may find uninitialized ones.
They should not be considered as erroneous ones even if the fixups
are wrong.
2015-04-17 09:37:11 +02:00
Jean-Pierre André
e7b71bb78d Avoided mentioning deleted inodes in non-verbose output of ntfswipe
In non-verbose ntfswipe, avoid displaying deleted inodes as erroneous
ones.
2015-04-17 09:33:04 +02:00
Jean-Pierre André
25eb7a710b Added clarifications about several options to the ntfswipe manual
Clarified the usage of fast wiping, info and verbose options.
2015-04-17 09:26:59 +02:00
Jean-Pierre André
4340df770e Supported the directory separator on Windows in ntfsprogs (cosmetic)
On Windows, when an ntfsprogs utility requests a path translation,
translate the '\'s to '/'s so that only '/' have to be interpreted
in libntfs.
2015-04-17 09:15:25 +02:00
Erik Larsson
82bb43eed3 ntfsclone.c: Compile fix for OS X.
OS X keeps the statfs declarations in sys/mount.h.
2015-03-13 08:59:20 +01:00
Jean-Pierre André
3bfff8ea3f Fixed reading the MFT bitmap when expanding downward
When expanding downward the MFT bitmap was wrongly read when fragmented,
leading to inconsistencies and cancellation of the process.
2014-10-20 08:58:04 +02:00
Jean-Pierre André
a7aa91d73d Developped an option --unused-fast for faster ntfswipe
When the new option --unused-fast is used, clusters which appear as wiped
are not written again. This is useful for avoiding virtual partitions to
be extended to their full size.

Contributed by michael
2014-09-02 09:55:53 +02:00
Jean-Pierre André
9325fa3ca6 Enabled new manual entries for ntfsprogs utilities
There were no manual entries so far for ntfswipe, ntfsdecrypt, ntfstruncate
and ntfsfallocate.
2014-06-25 12:50:45 +02:00
Jean-Pierre André
5d5d9f5b98 Added a manual entry for ntfsfallocate 2014-06-25 12:48:35 +02:00
Jean-Pierre André
fbf18a2953 Added a manual entry for ntfstruncate 2014-06-25 12:47:33 +02:00
Jean-Pierre André
781c97cb76 Added a manual entry for ntfsdecrypt 2014-06-25 12:46:36 +02:00
Jean-Pierre André
a42b52ea61 Added a manual entry for ntfswipe 2014-06-25 12:45:15 +02:00
Jean-Pierre André
21f6d9d0a3 Included ntfsfallocate in the quarantined ntfsprogs
ntfsfallocate is the equivalent of fallocate(1) :
Usage : ntfsfallocate [-n] [-p] [-o offset] -l length filename
For now, it is only released as a quarantined ntfsprogs because it can
produce configurations which cause subsequent updates of the file by
Windows to hang.
2014-06-23 10:33:22 +02:00
Jean-Pierre André
6abf81721c Defined the configure option --enable-quarantined for non functional utilities
Distributions have complained about releasing a non-functional ntfsck.
Actually, ntfsck and a few other developer-oriented utilities were not
meant to be released by distributions and are only compiled in if the
configure option --enable-extra is set, and, for some reason, this
option is set by most distributions.

In order to get distributions to not complain, though making the source
code available for candidate developers to improve it, the non functional
or developer-oriented utilities (ntfsck, ntfsdump_logfile, ntfsmftalloc
and ntfsmove) are now only compiled in if the configure option
--enable-quarantined is set.
2014-06-23 10:15:24 +02:00
Jean-Pierre André
c0287870e1 Returned success from ntfsprogs utilities with options --version and --help
The ntfsprogs used to return failure when option --version or --help
was used, and this has triggered complains from distribution packagers
who use these options in packaging scripts.
With this patch, success is returned (same behavior as gcc).
2014-04-23 10:13:27 +02:00
Jean-Pierre André
89de050c94 Fixed $Bitmap size in the root index in ntfsresize
When the partition is resized, the global bitmap size is adjusted accordingly,
however so far the new size was not set into the parent index (only minor
consequences).
2014-04-23 09:47:21 +02:00
Jean-Pierre André
ae459dd7b3 Implemented an extended attribute to get/set EAs
The new extended attribute "system.ntfs_ea" can now be used to get or
set the set of EAs of a file or directory.
2014-04-12 09:22:17 +02:00
Jean-Pierre André
f3c4c6c604 Fixed ioctl() error return for ntfsclone on Windows
The ioctl() function is not implemented in the Windows variant. By forcing
a negative apparent return, an alternative is triggered to get the
partition size which is normally obtained from an ioctl().
2014-04-12 09:14:08 +02:00
Jean-Pierre André
fd93d8e840 Switched to the relocated bitmap for delayed relocations in ntfsresize
In some rare situations relocated runlists are longer than the original
ones and do not fit into the same extent. When this happens the runlist
updating is delayed and done globally. Be sure to use the updated global
bitmap for making the needed allocations.
2014-03-11 11:15:59 +01:00
Jean-Pierre André
fb88692394 Implemented updating an encrypted file in ntfsdecrypt
Existing encrypted files can be updated provided the encryption method
and key can be extracted from the LOGGED_UTILITY_STREAM attribute.
2014-03-11 11:10:33 +01:00
Jean-Pierre André
700015c289 Accepted encryption keys whose EFS purpose is not the first one
X509 certificates have a purpose field restricting what the certificate
can be used for, and EFS encryption is such a purpose. Allow EFS encryption
to be at any position in the list.
2014-03-11 11:06:21 +01:00
Jean-Pierre André
e5ea399ee6 Added a summary of inodes found by ntfscluster
Output the number of inodes found.
2014-03-11 10:51:47 +01:00
Jean-Pierre André
9636ac058f Improved the warning for analyzing an extent in ntfscluster
When analyzing an extent in ntfscluster, mention its base record
2014-03-11 10:47:48 +01:00
Jean-Pierre André
977abdefa2 Fixed endianness bugs in ntfscluster
ntfscluster was not suitable for big-endian CPUs
2014-03-11 10:43:31 +01:00
Jean-Pierre André
ddd3a8a329 Reset the output file to favour appending to image in ntfsclone
When ntfsclone'ing to a file, the target file was truncated to the volume
size. This is not useful on file systems which support sparse files. In
the case of ntfs-3g this leads to prevent optimizations specific to
appending data. So when a sparse output file is detected, it is emptied
to benefit from subsequent appending of data.
2014-03-11 09:54:53 +01:00
Jean-Pierre André
7e38a29656 Avoided double opening of parent directory name in ntfscp
Double openings of a file or directory lead to double memory copies and
may lead to inconsistencies. On such situation could occur in ntfscp.
2014-03-11 09:50:02 +01:00
Jean-Pierre André
1d2fc42593 Avoided unnormalized parent directory name in ntfscp
Avoid leading '/' in directory names and use in ntfscp the same rule as fuse.
2014-03-11 09:44:50 +01:00
Jean-Pierre André
0f892b92d6 Added option --min-fragments to reduce fragmentation in ntfscp
When copying a file through ntfscp, the file size is known, hence the
space allocation can be optimized to get minimal fragmentation.
2014-03-11 09:24:34 +01:00
Jean-Pierre André
8520af7f7d Avoided displaying sync errors in ntfscp with --no-action
Do not loop on displaying errors when nothing is to be done
2014-03-11 09:19:06 +01:00
Jean-Pierre André
fb4a2a6292 Fixed an endianness error in ntfsundelete
Name matching was wrong on big endian CPUs when not using regex
2014-03-11 09:12:41 +01:00
Jean-Pierre André
44d74a5b22 Allowed setting the serial number to 0x8000000000000000 or greater
The serial number of an ntfs volume should be processed as an unsigned
number (fix by E. Talsma)
2014-03-11 09:07:59 +01:00
Jean-Pierre André
d2daead832 Updated copyright claims 2014-02-16 18:25:09 +01:00
Jean-Pierre André
b921b09fb8 Made ntfsdecrypt compatible with libgrypt-1.6
The upcoming libgrypt-1.6 drops the "module" interface which was used
by ntfsdecrypt for decrypting files which were encrypted with the "DESX"
algorithm. This algorithm is a Microsoft variant of DES with a key size
of 128 bits, and is not natively supported by libgrypt. The module interface
made possible to declare an external algorithm so that all the encryption
modes could be processed the same way whether the algorithm was internal
or external.
This patch makes DESX a specific case, so that the module interface is
not needed any more. It is compatible with current libgrypt and upcoming
libgrypt-1.6
2014-01-13 15:21:51 +01:00
Jean-Pierre André
e9a2d29b33 Fixed memory leak while comparing attributes with bad sectors
When bad sectors were found when comparing attributes, the attribute
descriptors were not closed and freed (fixed by Rakesh Pandit)
2013-09-09 19:46:00 +02:00
Jean-Pierre André
5e18e97d0b Silenced warnings by gcc >= 4.8 about aliasing
Added intermediate variables to avoid warnings by gcc >= 4.8
2013-09-09 15:34:14 +02:00
Jean-Pierre André
50db448f02 Fixed format translations for Windows
Translating "%ll" print formats to "%I64" for Windows was wrong.
2013-07-30 11:27:16 +02:00
Jean-Pierre André
1120b9c0b0 Removed duplicated code in mkntfs
Removed a meaningless duplicated test.
2013-07-30 11:22:34 +02:00
Jean-Pierre André
ad40849149 Forced 64-bit computation of inode number in ntfsundelete
An inode number computation was done with 32 bits, and could (theoretically)
lead to truncation.
2013-07-30 11:07:12 +02:00
Jean-Pierre André
bcbd157cfc Output the modification time when scanning files by ntfsundelete
When trying to undelete a file which was modified several times the
same day, it is difficult to tell which one is the latest unless the
modification time is displayed.
2013-07-30 11:00:46 +02:00
Jean-Pierre André
c8a43e3f9f Improved the manual description of the size option of ntfsresize
Tried to make clear an NTFS file system size is smaller than the
partition size, and the size wanted by ntfsresize is the partition
size.
2013-07-30 10:45:22 +02:00
Jean-Pierre André
397848e21d Reserved a single sector for the backup boot sector
Reserve a single sector, instead of a full cluster, for the backup boot
sector.
2013-07-30 10:35:13 +02:00
Jean-Pierre André
9d730b0da1 Set the backup boot sector in ntfsresize when the size is reliable
Traditionally the backup boot sector is not set by ntfsresize because
the exact partition size is not yet known. A chkdsk is triggered to
subsequently insert it.
However ntfsresize is frequently activated by a partition editor which
has an exact knowledge of the wanted layout, and the backup boot sector
can be inserted by ntfsresize. This is only done if the target partition
size is defined with no unit suffix, and it is a multiple of the sector
size. Anyway the backup boot sector cannot overwrite useful data as it
is inserted between the file system size and the target partition size.
2013-07-30 10:17:28 +02:00
Jean-Pierre André
be58b3b1f6 Fixed usa checking by ntfsck on 4K sectors
The usa sequence is used to make sure the sectors containing metadata
are fully written. The values are always put at the end of 512-byte
chunks even if the sectors are greater.
2013-04-22 19:14:48 +02:00
Jean-Pierre André
baf13fe555 Fixed updating all the MFT runs in a relocated MFT in ntfsresize
When the MFT is partially located beyond the end of a resized partition,
it has to be relocated after the other files have been processed
because the MFT data is needed to do the relocations. When the MFT runlist
is split over extents, all of them have to be processed.
2013-04-22 18:55:26 +02:00
Jean-Pierre André
28cacf40b0 Fixed trying to update the MFT and Bitmap on a test run of ntfsresize
When the beginning of the MFT is beyond the end of the resized
partition, a specific procedure has to be used to relocate this part
of the MFT and adjust the bitmap accordingly. On a test run, these
updates should not be done.
2013-04-22 18:45:48 +02:00
Jean-Pierre André
b35a204d01 Increased the maximum format size on Windows
The long long printing formats (such as %lld or %llx) have to be
translated to %I64 on older Windows systems, and the buffers to
receive the translated format must be able to hold the tool banners
which can be quite lengthy.
2013-04-22 18:31:16 +02:00
Jean-Pierre André
0e91e1a9ae Made compilation with --enable-really-static option to ./configure work
Author: Anton Altaparmakov
Date:   Wed Feb 13 02:29:47 2013 +0000

This is a fix to the use of hd library to get the legacy BIOS geometry.
2013-02-13 08:51:47 +01:00
Jean-Pierre André
1e625a9563 Made the meaning of the size argument of ntfsresize more clear in the manual
The size argument of ntfsresize is the target partition size. This is
not the file system size as returned by df(1) or statvfs(3) because a
sector is reserved for the backup boot sector, and the remaining sector
count might not be a multiple of clusters per sector.
2013-02-09 15:19:34 +01:00
Jean-Pierre André
a6b765c824 Fixed rescuing clusters by physical sectors in ntfsclone
When a sector is unreadable, consider the whole sector as bad, instead
of trying to find which 512-byte parts of it are bad. This was causing
unwanted retries for devices with 4K sectors.
2013-02-09 15:07:06 +01:00
Jean-Pierre André
a086683ece Fixed setting a magic header to unreadable sectors in ntfsclone
The magic header of an unreadable sectors should have the size of
"BadSectoR", not the size of a pointer to it.
2013-02-09 15:04:41 +01:00
Jean-Pierre André
c73b805062 Rejected reading a volume from stdin in ntfsclone
Reading a volume must be done in a seekable way. Better throw a proper
error.
2013-02-09 15:01:36 +01:00
Jean-Pierre André
c72b569da1 Ported ntfsundelete to Windows
Made a few adaptations to what is available on Windows.
2013-02-09 14:56:46 +01:00
Jean-Pierre André
c17512cde5 Translated %ll print editing formats to %I64 on Windows
Older msvcrt.dll (on XP and earlier) did not support "%ll" print editing
formats frequently used by ntfsclone. So translate them to "%I64" when
running on Windows. This format appears to be supported by all Windows
versions. Error messages from libntfs-3g are still not translated.
2013-02-09 12:57:22 +01:00
Jean-Pierre André
e6eae9fa16 Ported ntfsclone to Windows
This mainly means using the functions in win32_io.c instead of the
standard msvcrt.dll ones in order to be able to truncate files and
create sparse ones.
2013-02-09 12:54:44 +01:00
Jean-Pierre André
88de9987a0 Fixed bad copying of the backup boot sector in ntfsclone
This patch fixes the sector offset to the backup boot sector when creating
a metadata image.
2013-02-09 12:53:38 +01:00
Jean-Pierre André
d32c593521 Revert "Ported ntfsclone to Windows", should be "Fixed bad copying of the backup boot sector"
This reverts commit 92cd41b6e5.

The title and description were wrong
2013-02-09 12:50:16 +01:00
Jean-Pierre André
92cd41b6e5 Ported ntfsclone to Windows
This mainly means using the functions in win32_io.c instead of the
standard msvcrt.dll ones in order to be able to truncate files and
create sparse ones.
2013-02-09 12:14:19 +01:00
Jean-Pierre André
c4f65e05c4 Cleaned selecting stdout or stderr for messages from ntfsclone
Depending on the options selected, ntfsclone messages are output on
stdout or stderr. This is now done through standard logging procedures.
2013-02-09 12:12:02 +01:00
Jean-Pierre André
2e2550026e Avoided displaying in non-verbose mode information which is not computed
The summary of 'runcount.runs' and 'runcount.fragments' was displayed in
non-verbose mode. However these variables are not updated in non-verbose
mode, so they would always be 0.
We now only display this summary in verbose mode.
2013-02-09 12:08:58 +01:00
Jean-Pierre André
aebfcf3d27 Enabled relocating the MFT when shrinking a volume
This patch makes it possible to shrink a volume to a small size such that
the existing $MFT is beyond the new size.
2013-02-09 12:00:02 +01:00
Jean-Pierre André
b2e1dbbf38 Made possible to run ntfsundelete on systems with no regex.h
The filtering of files to undelete is usually done through the regex
library. This patch offers an alternate way when such a library is
not readily available (typically on Windows).
2013-02-09 11:56:09 +01:00
Jean-Pierre André
c972652876 Avoided meaningless errors logging during ntfsundelete scans
When ntfsundelete scans the $MFT for possible deleted files, it may
examine extries which have never been used, producing error messages
which most users do not understand. This patch silences such messages.
2013-02-09 11:51:40 +01:00
Jean-Pierre André
61eceb2fe5 Cosmetic : use symbolic names for ntfsclone control codes
Defining symbolic names makes it easier to identify where they are used.
2013-02-09 11:48:54 +01:00
Jean-Pierre André
81eb7baf88 Allowed cloning a file system despite allocation errors
Allow the "--ignore-fs-check" option to be used when cloning a file system
which has allocation errors. This is useful when there is a fear that
repairing the file system might create further damage, or when the repair
has to be made on another computer.
2013-02-09 11:41:39 +01:00
Jean-Pierre André
c820cb6d76 Added a display of the location of an inconsistency in an image
When an ntfsclone image appears to be corrupted, show at which position
the error happens. This is useful for providing support.
2013-02-09 11:37:31 +01:00
Jean-Pierre André
412f09d87d Fixed the ntfsfix option for testing in the manual
The option for checking the behavior of ntfsfix without writing anything
is "--no-action", not "--do-nothing".
2013-02-09 11:33:17 +01:00
Jean-Pierre André
7c83060553 Added a new option for testing the consistency of an ntfsclone image
This patch adds a new option -n to ntfsclone for simulating a restore
without writing anything. This is useful for checking the consistency
of an image without destroying the original partition.
2013-02-09 11:29:21 +01:00
Jean-Pierre André
44fbf02a97 Upgraded the Win32 interface for use with ntfsprogs
Upgrade the Win32 interface (win32_io.c) which was designed for Cygwin
so that it can be used for using the ntfsprogs utilities on native Windows.
Two new entries are added for truncating a file and creating a sparse
file, both of which not being supported through msvcrt.dll.
2013-02-09 11:22:41 +01:00
Jean-Pierre André
7cb4b99627 Fixed wiping fragmented metadata when creating a metadata image
When creating a metadata image, all user data is supposed to be wiped off,
but this was wrong for $MFT and directory indexes when they were
fragmented. This patch cleans the tails of metadata fragments.
2013-02-09 11:12:45 +01:00
Erik Larsson
7506d8b80b Rename legacy MS_* flags for ntfs_mount with NTFS_MNT_* flags.
The MS_* flags originated from system constants. However the flags
passed to ntfs_mount were really unrelated to the system constants and
many new MS_* flags had to be introduced as different features were
added to the library. Those flags had no counterparts in any system
APIs, so using the same naming scheme is inappropriate.

Instead, let's namespace these flags similarly to what has already been
done in ntfsprogs/libntfs earlier. This avoids any possible conflicts
with system constants.
The values of the flags themselves are kept the same as earlier, so
backward compatibility is retained.
2012-11-07 16:29:48 +01:00
Erik Larsson
11a7e8297d ntfsclone.c: Cleanup in error message. 2012-11-06 08:23:04 +01:00
Erik Larsson
e85f9305c1 ntfsclone.c: Fix missing space in error message. 2012-11-06 02:07:53 +01:00
Erik Larsson
7c600754dd ntfsinfo.c: Fix printing all the flags in hex in 'ntfs_dump_flags'.
The variable 'flags' was modified along the way and did not contain the
original flags at the end as assumed by the last printout. Fixed by
storing the original state of the flags in a temporary const variable.
2012-08-27 21:26:57 +02:00
Jean-Pierre André
3461acd0c2 Changed "blocks" to "sectors" in the mkntfs manual
The last (optional) argument in mkntfs was described as a block count,
which may be confusing because in ext[123] a block means a cluster.
2012-08-20 14:17:09 +02:00
Jean-Pierre André
eecc700df1 Inserted in the manual an explanation for the $Info stream in $UpCase 2012-08-20 14:14:15 +02:00
Jean-Pierre André
9d22736044 Inserted an $Info stream in $UpCase to comply with Windows 8
Since Windows 8 a new stream is added to the upper case file to record
a CRC of the upper case data. This way, if the file does not match the
one defined on the current Windows system, chkdsk can tell whether the
file is damaged or just out of date, and an error is only displayed if
the file is damaged.

The $Info data has been checked to be ignored by Windows XP, Windows
Vista and Windows 7. If not present, chkdsk for Windows 8 complains about
a wrong upper case file.
2012-08-20 14:01:53 +02:00
Jean-Pierre André
262a0559ac Fixed the computation of named attributes sizes in mkntfs
The named attributes sizes were wrongly computed in mkntfs. This did not
lead to visible errors so far owing to 8-byte alignments in attribute
records (current names $SDS, $R, $O, etc).
2012-08-20 13:57:00 +02:00