When measure() fails at the very last end of a file,
@remaining is zero.
Since @saved_errno is not ENOSPC, but @remaining is zero,
the code was considering that the file was properly written.
This parameter is useful to test cards that overheat.
Daniel Otero (@danielotero) pointed out the overheat problem, and
suggested the parameter as a solution in the following issue:
https://github.com/AltraMayor/f3/issues/37
This patch adds support to non-USB devices when reset is disabled
with parameter --reset-type=2
This patch address the following issue:
https://github.com/AltraMayor/f3/issues/62
This patch combines many calls to system call write() into
a single call.
This lower number of calls, and the combined buffer should enable
the kernel to speed up f3write to match H2testw' performance as
reported in the following issue:
https://github.com/AltraMayor/f3/issues/55
When f3read is called without parameters --start-at and --end-at,
and a F3 file is missing, f3read shows the following warning:
WARNING: Not all F3 files in the range 1 to 9223372036854775807 are available
This message surprises users, see issue below:
https://github.com/AltraMayor/f3/issues/53
This patch adopts the number of the last file available to compose
the message, so in the example of the issue above, it would be 1741.
Although unexpected, some fake cards do recover blocks after a reset!
This behavior is not consistent, though.
The first reported case is found here:
https://github.com/AltraMayor/f3/issues/50
The code of the applications f3probe, f3brew, and f3fix is now
mature, and they have not received any significant bug report for
about six months.
From now on, one needs to compile these applications with
```make extra```
Replace parse_args() with argp_parse() from argp.h
it also adda option "--show-progress" to force program displaying the progress even when STDOUT is not a TTY (see #21).
When using -O2, GCC was issuing the following warning:
cc -O2 -std=c99 -Wall -Wextra -pedantic -MMD -ggdb -c -o f3probe.o f3probe.c
f3probe.c: In function ‘main’:
f3probe.c:446:13: warning: ‘sdev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
sdev_flush(sdev);
^
f3probe.c:369:30: note: ‘sdev’ was declared here
struct device *dev, *pdev, *sdev;
^
NOTE: The warning was wrong.
GCC could not follow that @args->save being true implied
@sdev to not be NULL.
This patch addresses one of the issues discussed here:
https://github.com/AltraMayor/f3/issues/34
When using -O2, GCC was issuing the following warning:
cc -O2 -std=c99 -Wall -Wextra -pedantic -MMD -ggdb -c -o f3read.o f3read.c
f3read.c: In function ‘validate_file’:
f3read.c:95:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
offset = *((uint64_t *) sector);
^