338 Commits

Author SHA1 Message Date
Michel Machado
795424c873 f3brew: make output easier to read
The results are grouped, so the output is not too verbose.
2015-10-09 16:43:09 -04:00
Michel Machado
c77db3d9e0 f3brew: fixed bugs
f3brew were inverting the semantic of parameter --debug, and
it was calculating a wrong last block for drives.
2015-10-09 14:41:23 -04:00
Michel Machado
015facf8fe Merge pull request #23 from bor/fix/README
Adapt syntax of README.md for markdown
2015-09-14 15:29:49 -04:00
Michel Machado
fc4af9d255 Merge pull request #22 from bor/fix/Makefile
Add 'install -d' to create dirs in case they don't exists.

This fix helps creating packages under chroot/etc.
for example see
2015-09-14 15:24:23 -04:00
Sergiy Borodych
310eac5bae adapt syntax for markdown
to show it as more nicer at github
2015-09-14 12:54:50 +03:00
Sergiy Borodych
77c00662ab add 'install -d' for prepare dirs (ensure that dirs exists) 2015-09-14 12:25:11 +03:00
Michel Machado
bcf71585a8 f3brew: add --do-not-write and --do-not-read
These new options help with writing scripts and repeating tests.
2015-09-02 10:43:36 -04:00
Michel Machado
4b7d35951f f3brew: accept parameters from prompt 2015-09-02 10:43:36 -04:00
Michel Machado
bce2b9899b f3probe: --debug-block-order and --debug-keep-file
This patch just enables debugging mode when parameters
--debug-block-order and --debug-keep-file are used;
This is equivalent to automatically adding --debug.
It was an expected behavior that wasn't implemented.
2015-09-02 10:43:36 -04:00
Michel Machado
0121daf4af Edit a comment 2015-09-02 10:43:36 -04:00
Michel Machado
1114987783 Merge pull request #20 from davidknoll/install
Why not have a make install target?
2015-09-02 09:49:10 -04:00
David Knoll
bbdddb23c9 Why not have a make install target? 2015-09-02 00:15:42 +01:00
Michel Machado
64bb916977 Merge pull request #18 from brunetton/master
Renaming README to README.md to make Markdown used by Github
2015-08-25 14:24:52 -04:00
Bruno Duyé
ebccd66c5a Renaming README to README.md to make Markdown used by Github 2015-08-23 12:31:58 +02:00
Michel Machado
d47c05ed17 Merge pull request #17 from brammeleman/patch-1
Use f3read/write in the same directory as log-f3wr
2015-07-18 13:52:02 -04:00
brammeleman
6ff6c00f97 use f3read/write in the same directory as log-f3wr 2015-07-17 23:32:26 +02:00
Michel Machado
4d913c1442 f3probe: handle failures in usb_fd_from_block_dev()
Function usb_fd_from_block_dev() wasn't releasing resources
if any error happened.

Reported-by: Peter Skensved
2015-03-30 07:36:11 -04:00
Michel Machado
902db294ef f3probe: align buffers with devices' block sizes
This patch should address issue discussed here:
https://github.com/AltraMayor/f3/issues/13

Reported-by: Dingyuan Wang
2015-02-14 10:36:07 -05:00
Michel Machado
4f13815dfc f3probe: use physical block size
f3probe was using a kernel-recommended logical block size.
This patch allows f3probe to always find
the last good physical block of devices.

This patch also renames option --block-order to --debug-block-order
since f3probe detects the physical block size of devices.
2015-02-14 09:56:04 -05:00
Michel Machado
8ee3eaca71 f3fix: deal with sectors whose sizes are not 512B
See discussion on this issue here:
https://github.com/AltraMayor/f3/issues/13

Reported-by: Dingyuan Wang
2015-02-12 09:24:18 -05:00
Michel Machado
ea4b33e275 f3probe: fix segmentation fault during manual reset 2015-02-04 16:48:20 -05:00
Michel Machado
d74ef39bdd f3probe: rename a variable for readability 2015-02-04 16:37:46 -05:00
Michel Machado
c3db1edd7c f3probe: improve error handling during resets 2015-02-02 14:41:17 -05:00
Michel Machado
8001dfdadd f3probe: make read_all() return negative errors
bdev_read_block(), who calls read_all(), is
expected to return negative errors.
2015-02-02 13:31:00 -05:00
Michel Machado
ac2d89a0b9 f3probe: improve manual reset
This patch handles the edge case in wich
the drive changes its size after a reset.
2015-02-02 13:31:00 -05:00
Michel Machado
ca59ef530d f3probe: deal with USB devices that support multilple drives
During manual resets, the drive was being identified by
idVendor, idProduct, and serial, what is NOT enough when
the USB device combines two or more drives.
For example the card reader Kingston MobileLite G3
supports two memory cards at the same time.

Discussion on the fixed issue is available here:
https://github.com/AltraMayor/f3/issues/10

User @derekchal was the first to report this problem.
2015-02-01 16:59:02 -05:00
Michel Machado
85d15520d4 f3probe: fix manual reset when card is removed
When the memory card in a card reader is removed,
the device is kept, not removed like in the case
the reader itself is unplugged.

This patch handles the `change' events that are generated in
the card-removal case.
2015-02-01 15:56:43 -05:00
Michel Machado
172f19373a f3probe: drop `Last good sector:' from geometry
The field `Last good sector:' does not make sense
when the device is damaged, and
the geometry should be indepedent of the condition or
type of the drive.

The information is not lost because when the device "fixable",
f3fix is recommended with the correct parameter.
2015-01-31 20:42:25 -05:00
Michel Machado
b70b9ce914 f3probe: improve I/O error handling 2015-01-31 20:35:26 -05:00
Michel Machado
7c0306ca6f f3probe: avoid hanging before the second reset
f3probe was writing too many blocks between
the first and the second reset due to
a poor estimate of the writing and reseting times.
v5.0
2014-12-24 12:10:47 -03:00
Michel Machado
755fdc29ff Update folder where drives are mounted in README
At least Ubuntu has added the username after /media/.
2014-12-24 12:00:02 -03:00
Michel Machado
79f7e7a339 f3fix: report success to user 2014-12-24 11:52:10 -03:00
Michel Machado
21e26faa0f Add f3fix to this release 2014-12-24 11:11:26 -03:00
Michel Machado
05eff6e76c f3probe: suggest f3fix when the drive is fake 2014-12-24 11:10:21 -03:00
Michel Machado
6fbe096089 f3probe: report if the device changes its filename
Due to the resets, the device might move its filename.
For example, from `/dev/sdb' to `/dev/sdc'.
2014-12-24 10:54:44 -03:00
Michel Machado
7f37ff5efb f3probe: rename block device to disk device
f3probe really cares about disk devices.
2014-12-24 09:55:53 -03:00
Michel Machado
3f02ab9ac6 f3fix: add proper support to parameters 2014-12-24 09:54:01 -03:00
Michel Machado
5df999a767 f3fix: improve error handling 2014-12-24 08:06:11 -03:00
Michel Machado
423777ee6b f3fix: functional but not polished version 2014-12-23 13:25:16 -03:00
Michel Machado
8e25afa42b Add stub version of f3fix 2014-12-23 11:15:33 -03:00
Michel Machado
f8797d8b7c Minor fixes 2014-12-23 11:12:37 -03:00
Michel Machado
da939f2d7d f3probe: fix parameter --block-order
Parameter --block-order was forcing debug mode.
This directive is expected to work for both modes: debug and test.
2014-12-18 08:38:57 -03:00
Michel Machado
919451abb9 f3probe: improve messages to users 2014-12-18 08:34:17 -03:00
Michel Machado
263ea4f68e f3probe: reduce code of the manual reset
One doesn't have to wait for the remove event,
only for the add event.
2014-12-18 08:30:55 -03:00
Michel Machado
1caeff3205 Bump version to 5.0 2014-12-17 11:35:22 -05:00
Michel Machado
506730b83f f3probe: ignore return of udev_device_unref()
It is not predictable how udev library handles
its reference counters.
2014-12-17 11:15:15 -05:00
Michel Machado
95c3f8110d f3probe: use unit blocks instead of sectors
f3proble is block aware, so there's no reason to use sectors.
Moreover, thanks to the last-good-sector field,
sector numbers are no longer useful.
2014-12-17 11:15:15 -05:00
Michel Machado
d603f2e90a f3probe: rebrand --debug-block-order to --block-order
The new parameter allows users to test drives with
forced block sizes.

This parameter is only meant to help testing drives whose
*real* sizes are not multiples of their block sizes;
this should be rather rare!
2014-12-17 11:15:15 -05:00
Michel Machado
490bf780a3 f3probe: report last good sector of the drive
This information is useful to fix fake drives using fdisk, or
another partition tool.
2014-12-17 09:13:56 -05:00
Michel Machado
662fbf3db7 f3probe: add a message after the last reset
This message is supposed to help the user to avoid
removing the drive after the last reset.
After a sequence of manual resets, it's almost automatic to unplug
the drive and lose all the save blocks; I've done it myself.
2014-12-17 09:00:22 -05:00