This commit marks the fix of multiple issues made in the previous
commit. The most important one was not to restore the pointer associated
with the file into its original place, leading to 2 subsequent reads not
to be properly handled.
FreeBSD drives are character devices, which can be read only one block
at a time. What a block is isn't fully understood yet, but it seems like
a multiple of 512 bytes is accepted.
This is the first try to fix the #81 issue.
It doesn't seem possible anymore to install osxfuse through a brew
formula, we have to pass through another step. This step is a cask,
whatever that means in the homebrew world.
It doesn't seem possible to currently make a formula depends on a
cask[1], thus the added command in the INSTALL.md.
[1] https://github.com/Homebrew/legacy-homebrew/issues/49778
During the execution of dislocker-find, the loader will call the first
ruby binary in the PATH, which can have a different ruby version against
which dislocker has been build with.
The problem is due to rvm being installed in the ubuntu VM of travis-ci,
but not fully installed.
Thus this commit to try and fix the path from which ruby will be called.
The VERSION_DBG preprocessor token is used in order to try and reproduce
potential errors during execution by taking the git branch and commit.
It is then displayed in the firsts lines of dislocker.
When doing an out-of-tree build, the git commands to take the branch and
the commit are run from the build directory, not the source one, which
then results in an empty VERSION_DBG token, which is then rendered
useless.
This commit fixes this behavior by setting the WORKING_DIRECTORY of the
project's source during the execution of both of these git commands.
When compiling with ruby-compatibility enabled, warnings appear in the
ruby.h header file. As we're compiling with -Werror, which transforms
warnings in errors, the build is failing for no actual reason.
Thus this patch to remove the -Werror compilation flag.
Before having the --options parameter (only partially advertised as -o),
we didn't need to check if the verbosity was too low. Now that verbosity
can be set at whatever level (even negative ones), this check becomes
necessary.
On Intel 32b platforms, size_t is on 32b only. When casting an off_t in
a size_t, this would overflow and wreak havok.
Thanks go to Christian Schaubschläger for spotting this bug.