314 Commits

Author SHA1 Message Date
ilovezfs
f10263dd89 Add ARGP to Makefile
Allow the prefix of argp-standalone to be passed to `make` so that the
CFLAGS and LDFLAGS for argp-standalone don't have to be set manually.
2017-12-21 15:28:24 -08:00
Michel Machado
b8864dac2d Bump version to 7.0 v7.0 2017-12-21 14:32:02 -05:00
Michel Machado
865c44f21c f3write: fix saved_error bug
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.
2017-12-19 15:22:48 -05:00
Michel Machado
485b81ceb0 f3write: suggest --max-write-rate for error EIO 2017-12-19 11:46:32 -05:00
Michel Machado
2544c80ab0 f3write: add parameter --max-write-rate
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
2017-12-19 10:50:40 -05:00
Michel Machado
7172cff4b9 f3write: gracefully handle failures of fdatasync(2)
This patch solves the following issue:

https://github.com/AltraMayor/f3/issues/37
2017-12-18 16:04:45 -05:00
Michel Machado
74028104f6
Merge pull request #66 from anarcat/rst
convert documentation and website to Sphinx
2017-11-16 15:39:54 -05:00
Antoine Beaupré
5d946689b7
add local TOC for the long usage page 2017-11-16 13:13:31 -05:00
Antoine Beaupré
b35ff562c9
show prev/next links
Otherwise there is no obvious way to go back up to other sections
2017-11-16 13:13:21 -05:00
Antoine Beaupré
d0523b7d5f
split webpage in different documents 2017-11-16 12:43:58 -05:00
Antoine Beaupré
6a2591a463
add sphinx boilerplate 2017-11-16 12:37:48 -05:00
Antoine Beaupré
4324c1cc44
convert webpage into RST 2017-11-16 12:36:45 -05:00
Antoine Beaupré
2e8a6e601e
convert README into a RST file 2017-11-16 11:24:53 -05:00
Michel Machado
6450f07bdf Merge pull request #64 from anarcat/patch-1
README improvements
2017-07-19 11:46:33 -04:00
anarcat
d98c65edf5 add table of contents
generated with emacs `markdown-toc` module
2017-07-19 08:54:35 -04:00
anarcat
bc9c711b88 group instructions under common headings
we regroup compilation instructions together and the last two misc sections.
2017-07-19 08:52:17 -04:00
anarcat
2419fb247d move examples up in the README, add intro
this is inspired by the art of readme
2017-07-19 08:49:41 -04:00
Michel Machado
83f6c0523a f3probe: add support to non-USB devices
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
2017-06-25 08:41:45 -04:00
Michel Machado
abd7ae0785 Merge pull request #61 from sgerwk/master
Fix starting time in f3read, and adding DESTDIR variable to Makefile
2017-06-10 09:44:28 -04:00
sgerwk
1526d8a996 add DESTDIR to Makefile 2017-06-07 13:47:46 +02:00
sgerwk
9a39351d92 fix starting time of reading 2017-06-07 13:30:05 +02:00
Michel Machado
53772d3a99 Merge pull request #56 from kalsan/master
Update README.md
2017-01-18 08:26:49 -05:00
Sandro Kalbermatter
179c6e31af Update README.md
Added quick introduction to f3probe and f3fix
2017-01-18 08:29:11 +01:00
Michel Machado
eabf001f69 README: add specific steps to compile on Windows/Cygwin
This patch includes feedback from the following issues:

https://github.com/AltraMayor/f3/issues/51

https://github.com/AltraMayor/f3/issues/55
2016-11-16 16:25:59 -05:00
Michel Machado
8c33abff6a f3write: reduce the number of write() system calls
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
2016-11-15 16:57:11 -05:00
Michel Machado
f1a7eead90 f3read: avoid surprising warning message
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.
2016-11-04 10:01:22 -04:00
Michel Machado
98a2ea77ec Merge pull request #54 from ocroquette/macports
Update README.md with information about MacPorts
2016-10-28 15:27:23 -04:00
Olivier Croquette
6935b5a0ea Update README.md 2016-10-28 20:40:37 +02:00
Michel Machado
f3d067b270 f3probe: deal with recovered blocks after a reset
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
2016-08-23 09:49:21 -04:00
Michel Machado
d00b9f2cf8 Improve documentation for Mac users
This commit is based on the following issue:
https://github.com/AltraMayor/f3/issues/49
2016-06-27 14:49:57 -04:00
Michel Machado
d9b205930f Document how to compile on OS X
The documented steps are a lightly-edited version of
the steps @jksinton provided here:
https://github.com/AltraMayor/f3/issues/42#issuecomment-221746635
2016-06-25 11:52:19 -04:00
Michel Machado
a754e9cf29 f3read: add "#include <limits.h>" to f3read.c
This addresses a compiling issue on Macs.

@jksinton found and solved this problem:
https://github.com/AltraMayor/f3/issues/44
2016-05-19 08:39:36 -04:00
Michel Machado
2cd7e41494 Mention make install and install-extra in Makefile 2016-04-26 08:05:05 -04:00
Michel Machado
64d169e248 Mark experimental applications as stable
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```
2016-03-29 12:56:43 -04:00
Michel Machado
abf811f04b General review of @zwpwjwtz's patch 2016-03-29 12:35:22 -04:00
Michel Machado
01a1be7933 Merge pull request #40 from zwpwjwtz/master
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).
2016-03-29 09:50:36 -04:00
zwpwjwtz
fb187b4c71 Replace parse_args() with argp_parse() from argp.h 2016-03-29 15:37:13 +08:00
Michel Machado
599a79a7e4 Merge pull request #38 from notaz/ldflags
allow users to specify linker flags
2016-03-14 08:59:01 -04:00
Grazvydas Ignotas
70962dcfaa allow users to specify linker flags
Traditionally LDFLAGS is used for this, it's what I've tried first
but it wasn't accepted.
2016-03-12 17:39:05 +02:00
Michel Machado
cbe8d6167a Merge pull request #36 from oreinert/master
man page: Add reference to F3 web page
2016-01-21 08:20:42 -05:00
Olav Reinert
8ab3d878b5 man page: Add reference to F3 web page 2016-01-20 21:21:20 +01:00
Michel Machado
b8e825a331 f3write: polish fill_buffer()
This commit was inspired by the following commit:
52e252f5d6dc6d10fd85a45b0774bb0b29d5f989
f3read: avoid compiler warning
2016-01-05 10:06:08 -05:00
Michel Machado
77d2ceb374 f3probe: avoid compiler warning
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
2016-01-04 13:49:05 -05:00
Michel Machado
52e252f5d6 f3read: avoid compiler warning
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);
   ^
2016-01-04 13:30:01 -05:00
Michel Machado
2811fb27f5 libutils: fix a typo in a comment 2016-01-04 09:57:38 -05:00
Michel Machado
0079634a08 libutils: make ceiling_log2() inline v6.0 2015-12-22 13:46:23 -05:00
Michel Machado
d8694268a6 f3probe: warn about how much time probing takes
This patch addresses issue discussed here:
https://github.com/AltraMayor/f3/issues/33
2015-12-21 09:37:43 -05:00
Michel Machado
69d696090c f3probe: deal with drives that do not report their size
This patch addresses issue discussed here:
https://github.com/AltraMayor/f3/issues/30
2015-12-09 10:55:56 -05:00
Michel Machado
bac59102da f3probe: present time in a friendly format 2015-11-29 14:48:15 -05:00
Michel Machado
0e6729d97b Highlight the dependencies in README.md 2015-11-25 15:29:48 -05:00