Jean-Pierre André
e87c853551
Fixed collecting the label argument in mkntfs
...
The label argument could be wrongly interpreted, depending on the syntax
use to state the options.
2018-08-22 09:46:30 +02:00
Jean-Pierre André
f862fcee00
Extended the allowed cluster size to 2MB
...
From Windows 10 Creators edition, the cluster size limit has been
extended to 2MB. This has implied redefining the boot sector field
"sectors_per_cluster" so that values greater than 128 can be recorded.
2018-06-01 16:29:01 +02:00
Erik Larsson
62b5c91420
Fix compiler warnings about mismatching printf format / argument type.
...
For 64-bit (e.g. x86_64) Linux the 64-bit wide types resolve to long,
not long long as is the case in 32-bit (e.g. i386) Linux. So we need an
explicit cast to long long for 64-bit types since the format string must
specify the 'll' modifier in order to print 64-bit values.
2016-02-16 09:30:49 +01:00
Erik Larsson
9893ea9ee6
Merge endianness fixes.
...
Conflicts:
libntfs-3g/attrib.c
2016-01-28 09:22:42 +01:00
Erik Larsson
75da0ce302
Fix inverted usage of endian conversion macros.
...
This is mostly a semantic issue since the end result would be the same.
2016-01-04 10:08:15 +01:00
Erik Larsson
9cf04fd2cd
Fix incorrect usage of native/little-endian types, signed types, etc.
...
This is harmless with regard to code generation but if we turn on strict
type checking these type mismatches will result in errors.
2015-12-21 23:55:31 +01:00
Erik Larsson
dfa4a6647f
Fix code to use const_cpu_to_X/const_X_to_cpu macros for constants.
...
This enables the compiler to optimize this code in cases where compiler
support for endianness swapping is not present.
2015-12-21 23:21:00 +01: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
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é
1120b9c0b0
Removed duplicated code in mkntfs
...
Removed a meaningless duplicated test.
2013-07-30 11:22:34 +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
Jean-Pierre André
f793ead700
Cosmetic : avoided having a hardcoded knowledge of upcase table size in mkntfs
2012-08-20 13:53:48 +02:00
Jean-Pierre André
37ae85a9d5
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
2012-03-21 19:09:52 +01:00
Jean-Pierre André
a5e656751d
Worked around basename(3) not present on OpenIndiana
2012-01-23 18:03:59 +01:00
Jean-Pierre André
b76883dc84
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.
2011-11-04 11:01:11 +01:00
Jean-Pierre André
3c03e056f1
Fixed the size limits for the volume label set by mkntfs
2011-09-14 08:32:28 +02:00
Erik Larsson
c3e651047a
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.
2011-09-13 09:51:55 +02:00
Jean-Pierre André
c6043ec2c9
Set the same timestamp per file in all attributes in mkntfs
...
mkntfs did not set the same timestamp in inode and index.
2011-03-23 09:43:13 +01:00
Jean-Pierre André
2594a6c983
Fixed allocated size for resident unnamed data in mkntfs
...
The recorded allocated size depends on unnamed data being non resident,
which depends on MFT record size, hence on sector size.
The allocated size was wrong for $AttrDef when sector size is 4K bytes
(chkdsk silently fixes it).
2011-03-23 09:14:55 +01:00
Jean-Pierre André
7ac015451c
Fixed allocated size to MFT in mkntfs
...
mkntfs stored a different value for allocated size in inode and index.
2011-03-23 09:06:27 +01:00
Jean-Pierre André
8034e9be25
Fixed the location of the backup boot sector
2011-02-16 12:20:46 +01:00
Jean-Pierre André
b3d62451e8
Silenced compiler warnings on the use of aggregates
2011-01-10 11:18:55 +01:00
Jean-Pierre André
5b03804c73
Set a volume UUID unless option -U
2010-12-21 15:51:07 +01:00
Jean-Pierre André
fd22595518
Avoided storing the full logfile in memory
2010-12-21 15:51:07 +01:00
Jean-Pierre André
94cab92a24
Avoided storing the full bitmap in memory
2010-12-21 15:51:07 +01:00
Jean-Pierre André
8f4aa0883b
Strengthened variable types
2010-12-21 15:51:07 +01:00
Jean-Pierre André
1ca4a556b2
Silenced warnings for unmatching printf-type formats
2010-12-21 15:51:07 +01:00
Erik Larsson
bcdc76f12d
Merge remote branch 'linux-ntfs/libntfs-3g_port-v2_0_0' into PERMISSION_HANDLING_BRANCH
...
Conflicts:
.cvsignore
AUTHORS
CREDITS
ChangeLog
NEWS
README
TODO.libntfs
autogen.sh
configure.ac
include/ntfs/Makefile.am
libntfs-3g/misc.c
libntfs/Makefile.am
libntfs/gnome-vfs-method.c
libntfs/gnome-vfs-module.c
ntfsprogs.spec.in
ntfsprogs/.cvsignore
ntfsprogs/mkntfs.c
ntfsprogs/ntfscat.8.in
ntfsprogs/ntfsclone.c
ntfsprogs/ntfscp.8.in
ntfsprogs/ntfsinfo.c
ntfsprogs/ntfsprogs.8.in
ntfsprogs/ntfsresize.c
ntfsprogs/ntfsrm.c
ntfsprogs/ntfsundelete.h
ntfsprogs/upcase.c
ntfsprogs/utils.c
test/Makefile.am
2010-12-17 09:04:01 +01:00
Erik Larsson
16dbcbec0c
Restored 'local' includes for all the ntfsprogs instead of using system includes (e.g. #include "yada.h" instead of #include <ntfs-3g/yada.h>).
2010-12-16 09:59:42 +01:00
Erik Larsson
78b40e4b4c
mkntfs.c: Fixed two references to missing member 'guid' in 'ntfs_volume'.
2010-12-03 07:52:31 +01:00
Erik Larsson
2acadfd360
mkntfs.c: Fixed reference to 'guid' member of ntfs_volume which does not exist in libntfs-3g.
2010-12-02 22:35:20 +01:00
Erik Larsson
41e27e116a
Added 'misc.h' as an include to some source files because of missing ntfs_malloc / ntfs_calloc signatures.
2010-12-02 22:31:56 +01:00
Erik Larsson
713fbb390e
Merge commit 'v2_0_0' into libntfs-3g_port-v2_0_0
...
Conflicts:
configure.ac
include/ntfs/Makefile.am
include/ntfs/attrib.h
include/ntfs/bitmap.h
include/ntfs/collate.h
include/ntfs/debug.h
include/ntfs/dir.h
include/ntfs/endians.h
include/ntfs/index.h
include/ntfs/inode.h
include/ntfs/layout.h
include/ntfs/logfile.h
include/ntfs/logging.h
include/ntfs/mft.h
include/ntfs/ntfstime.h
include/ntfs/runlist.h
include/ntfs/support.h
include/ntfs/types.h
include/ntfs/unistr.h
include/ntfs/volume.h
libntfs/Makefile.am
libntfs/attrib.c
libntfs/attrlist.c
libntfs/bitmap.c
libntfs/bootsect.c
libntfs/collate.c
libntfs/compress.c
libntfs/debug.c
libntfs/device.c
libntfs/device_io.c
libntfs/dir.c
libntfs/index.c
libntfs/inode.c
libntfs/lcnalloc.c
libntfs/logfile.c
libntfs/logging.c
libntfs/mft.c
libntfs/mst.c
libntfs/runlist.c
libntfs/security.c
libntfs/unistr.c
libntfs/unix_io.c
libntfs/volume.c
libntfs/win32_io.c
ntfsprogs/Makefile.am
ntfsprogs/mkntfs.c
ntfsprogs/ntfscat.c
ntfsprogs/ntfsclone.c
ntfsprogs/ntfscmp.c
ntfsprogs/ntfscp.c
ntfsprogs/ntfsinfo.c
ntfsprogs/ntfsmount.8.in
ntfsprogs/ntfsmount.c
ntfsprogs/ntfsundelete.c
ntfsprogs/upcase.c
2010-12-02 22:31:21 +01:00
Erik Larsson
5b9b4c7e49
Removing all references to the libntfs library version until we have such functionality in libntfs-3g.
2010-12-02 16:38:16 +01:00
Erik Larsson
3e34aebfc3
Temporary fix while the ntfs_file_values_compare situation is resolved.
...
Revert if ntfs_file_values_compare is re-added to libntfs-3g, and clean up otherwise.
2010-12-02 16:36:18 +01:00
Erik Larsson
4a641c85e0
Adapted code to latest libntfs-3g, based on PERMISSION_HANDLING_BRANCH. Now requires libntfs-3g version 2010.5.22 minimum.
2010-12-02 16:35:27 +01:00
Erik Larsson
9b6523ab42
mkntfs.c: Signature of 'ntfs_boot_sector_is_ntfs' has changed in libntfs-3g (unused variable 'silent' has been removed).
2010-12-02 16:13:25 +01:00
Erik Larsson
058e47afbd
Updated references to members of INDEX_HEADER and INDEX_ENTRY that have been renamed in libntfs-3g.
...
INDEX_HEADER: flags -> ih_flags
INDEX_ENTRY: flags -> ie_flags
2010-12-02 16:10:18 +01:00
Erik Larsson
b538215ddb
Replaced all occurrences of ntfs_mbstoucs with a compatibility wrapper function (ntfs_mbstoucs_libntfscompat).
...
The interface and semantics of ntfs_mbstoucs differ between libntfs and libntfs-3g, so this compatibility wrapper tries to address the differences.
2010-12-02 16:05:22 +01:00
Erik Larsson
f03d683fa0
Commented out all references to 'version.h' (which doesn't exist in libntfs-3g) and added a stub implementation of ntfs_libntfs_version in utils.h to allow things to compile.
2010-12-02 15:58:14 +01:00
Erik Larsson
1860eff1da
Updated all includes in the basic ntfsprogs utilities for libntfs-3g.
2010-12-02 15:57:58 +01:00
Yura Pakhuchiy
ea4d352f7e
Fix sparse warnings from git HEAD version
2007-07-21 22:01:57 +03:00
Yura Pakhuchiy
0d264b7d25
Introduce sparse endian annotations. Adopt library (also fix 2 real bugs) and progs (lots of bugs).
2007-06-08 13:47:57 +03:00
aia21
62d49cb175
Minor updates for OSX compatibility, i.e. glibtoolize not libtoolize, and
...
automake 1.10 fix, etc.
2007-03-19 14:39:44 +00:00
aia21
f6adc3fc78
- mkntfs: Create more Vista like volumes. We now match the security
...
descriptor attributes (but not yet the security descriptors stored in
$Secure). (Anton)
- libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista
compatible upcase table ($UpCase). (Anton)
- mkntfs: Remove own generation of upcase table, i.e. delete
ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by
libntfs. (Anton)
2006-12-19 16:31:52 +00:00
aia21
0911eb8b0d
Make volumes created with mkntfs more compliant with Vista (still not finished).
2006-12-15 14:52:43 +00:00
aia21
19257df7f0
Update version to 2.0.0, update NEWS, update mkntfs man page and mkntfs itself.
...
- mkntfs: As announced, remove the deprecated support for creation of
NTFS 1.2/3.0 volumes. We now create NTFS 3.1 volumes only. (Anton)
- mkntfs: Remove lots of unused/unneeded debugging code. (Anton)
2006-12-13 10:46:49 +00:00
aia21
78c46fd3c3
- Do not create object id attribute on NTFS 1.2 volumes.
...
- Create object id attribute after volume flags attribute.
2006-12-13 09:17:14 +00:00
aia21
1a4fb3431c
- mkntfs: Generate a random DCE compliant UUID for the created volume
...
and include --with-uuid[=PFX] and --without-uuid options. (Anton)
- configure.ac: Set language to C. (Anton)
- mkntfs: Always set default cluster size to 4096 bytes regardless of
volume size. This is what Windows Vista does and it makes perfect
sense from a performance point of view. (Anton)
2006-12-13 00:11:50 +00:00