On Linux, the functions in the dlopen API are in libdl. However, on
FreeBSD, libdl doesn't exist and the functions are instead in libc.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Switch to the standard autoconf AC_HEADER_MAJOR macro which takes care
of the ugly details like when to use mkdev.h and when to use sysmacros.h.
(requires <sys/types.h> to be included)
Also include these in all files that use major/minor/makedev funcs.
(Contributed by Mike Frysinger)
These tools were originally developed for running on Windows and later
ported to libntfs-3g. This patch makes them similar to other ntfsprogs
tools, dropping the native Windows interfaces and using libntfs-3g on
all platforms.
There is no change in usage or supported features, only the command
names have changed.
The new "system compression" files used by Windows 10 make use of reparse
points to record the compression parameters, and a specific named data
stream is used to store the compressed data. With this patch, processing
of reparse points can be done by an external plugin only loaded as needed.
Junctions and symlinks, which are also based on reparse points, are now
processed by "internal plugins".
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.
fstrim(8) discards unused blocks on a mounted filesystem. It is useful for
solid-state drives (SSDs) and thinly-provisioned storage.
Only trimming the full device (with no option) is supported.
Contributed by Richard W.M. Jones
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.
Author: Anton Altaparmakov <anton@tuxera.com>
Date: Tue Feb 12 10:33:55 2013 +0000
Modify libntfs-3g to make use of hd library to get the legacy BIOS geometry
from EDD. We scan all whole disk devices on the system and check if they
match the open ntfs device and if not we scan all partition devices on the
system and check if they match the open ntfs device.
If we find a partition device to match then we find its parent device again
using the hd library.
Once we have the parent of the partition device or we matched a whole disk
device we get the legacy EDD sectors per track and heads again using the hd
library.
Use of the hd library is auto detected (based on finding <hd.h> header file,
being able to link against libhd and finding the hd_list symbol in libhd.
Use can also be disabled/enabled/libhd prefix specified at ./configure time.
See ./configure --help for details.
Note this obviously requires libhd to be installed. On Ubuntu 12/04 systems
the relevant packages needed are libhd-dev and libhd16 (on older Ubuntu
versions it will be libhdN where N is some number <= 16 but an easy way to
get the right package is to simply install libhd-dev which by dependency
pulls in the correct libhdN package) whilst on SLES systems the relevant
packages needed are hwinfo and hwinfo-devel.
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).
The 'uuid' library functionality may be located in a separate 'uuid'
library, but it may also be included in the standard C library. This is
the case on Mac OS X.
Instead of relying on the uuid code being located in a 'uuid' library,
we restructure the code so that it checks different libraries, in order
for the 'uuid_generate' function. This code is easy to extend if we
would find a new configuration where uuid_generate is located in a
different library.
The OpenSolaris port of libfuse, from which our Solaris-port of
libfuse-lite originated, had to be supplied with some additional
compiler flags in order to compile.
The configure script now detects whether it is running on a Solaris
system. If that is the case it passes the proper compiler flags to
libfuse-lite, so it can compile properly.
Tested on:
- OpenIndiana oi_151a3 / gcc 3.4.3
- OpenIndiana oi_151a7 / gcc 4.3.3
- Solaris 11.1 / gcc 4.5.2
When we aren't building ntfs-3g but only the tools, then there's no need
for libfuse. Still the configure script checked for libfuse availability
and wouln't proceed unless either libfuse was detected or libfuse-lite
was enabled.
This commit fixes this issue by running the libfuse checks only when
ntfs-3g is built, meaning that we can now build the ntfsprogs even when
libfuse library or headers aren't available.
The libfuse used by OpenIndiana has the same features as libfuse-lite
though requiring some code variants. Merging them simplifies supporting
both.
Variants for OpenIndiana are selected when defining __SOLARIS__
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).
It contains interesting information but this information is available elsewhere and we want to stay as close to ntfs-3g as possible. No unnecessary added files.