Due to a change in error handling behaviour in ntfsresize version
2.011.4.12AR.4 (libntfs-3g) GParted would fail to properly resize ntfs
file systems if the file system was marked for consistency check.
The current maintainer of ntfsprogs provided the following advice:
"Well, though I am reverting back to the old behavior, you should
add -ff instead of relying on an unspecified behavior when
ntfsresize gets an error when trying to read the reply. I suppose
you do not connect the stdin of ntfsresize, hence the error. With
-ff no question is asked (I stress : even with the old
ntfsresize)."
Hence I have added a second "--force" option to the ntfsresize command
for resizing NTFS file systems.
Closes Bug #655215 - NTFS partition resize fails
Enhance code to pass compiler warning. Prior to this change the
compiler would complain with the following message:
error: ISO C++ says that these are ambiguous, even though the worst
conversion for the first is better than the worst conversion for the
second: /usr/include/c++/4.5/bits/postypes.h:192:7: note: candidate 1:
std::fpos<_StateT> std::fpos<_StateT>::operator-(std::streamoff) const
[with _StateT = __mbstate_t, std::fpos<_StateT> =
std::fpos<__mbstate_t>, std::streamoff = long int] Utils.cc:443:27:
note: candidate 2: operator-(std::streamoff, long long int) <built-in>
Add code to handle situation where realpath might return a NULL value.
Prior to this change the compiler would complain with the following
message:
error: ignoring return value of ‘char* realpath(const char*, char*)’,
declared with attribute warn_unused_result
Removed expression that is always true. Prior to this change the
compiler would complain with the following message:
error: comparison of unsigned expression >= 0 is always true
Add code to handle situation where mkdtemp(char*) function returns
with a NULL value. Prior to this code the compiler would complain
with the following message:
error: ignoring return value of ‘char* mkdtemp(char*)’, declared with
attribute warn_unused_result
Some classes contained private attributes which were used only by a single
member function. Such items were moved to the corresponding function implementations
to stress their limited usage scope.
A few unused variables were also deleted.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>